Skip to main content

Phases (Base Entity)

EntityDatastoreDatastore.Phase

Phases define the workflow stages that activities progress through. Each activity type has its own set of phases — for example, an invoice moves through Draft, Sent, and Paid, while a sales opportunity moves through Qualification, Proposal, Negotiation, Won, or Lost.

The Datastore_Phase endpoint provides a unified view across all phase types. Use the subtype-specific endpoints (e.g., Datastore_Phase_ActivityInvoice) when you need phases for a single activity type.

Base Entity

Datastore_Phase is a base entity. Use the subtype-specific endpoints to query phases for a particular activity type. See Subtypes for the full list.

Endpoints

List All Phases

Retrieve all phases across all activity types.

GET/v1/odata/Datastore_Phase

Single Phase

GET/v1/odata/Datastore_Phase({id})

Subtypes

Each activity type has its own phase entity set:

SubtypeOData Entity SetDescription
Appointment PhasesDatastore_Phase_ActivityAppointmentAppointment phases
Campaign PhasesDatastore_Phase_ActivityCampaignCampaign phases
Document PhasesDatastore_Phase_ActivityDocumentDocument phases
Email PhasesDatastore_Phase_ActivityEmailEmail phases
Event PhasesDatastore_Phase_ActivityEventEvent phases
Invoice PhasesDatastore_Phase_ActivityInvoiceInvoice phases (Draft, Sent, Paid)
LinkedIn Message PhasesDatastore_Phase_ActivityLinkedInMessageLinkedIn message phases
Offer PhasesDatastore_Phase_ActivityOfferQuote/offer phases
Project PhasesDatastore_Phase_ActivityProjectProject phases
Sales Opportunity PhasesDatastore_Phase_ActivitySalesOpportunityOpportunity pipeline stages
Sales Order PhasesDatastore_Phase_ActivitySalesOrderSales order phases
Subscription PhasesDatastore_Phase_ActivitySubscriptionSubscription phases
Support Ticket PhasesDatastore_Phase_ActivitySupportTicketSupport ticket phases
Task PhasesDatastore_Phase_ActivityTaskTask phases
Work Order PhasesDatastore_Phase_ActivityWorkOrderWork order phases
tip

To get the available phases for a specific activity type, query the subtype endpoint directly:

GET /v1/odata/Datastore_Phase_ActivityInvoice?$select=Name,Code
GET /v1/odata/Datastore_Phase_ActivitySalesOpportunity?$select=Name,Code,IsTerminal

Fields

Datastore Fields (inherited)

FieldTypeDescription
NameStringPhase name (e.g., "Draft", "Sent", "Paid")
CodeStringPhase code identifier
LocalizedNameStringLocalized phase name
IsDefaultBooleanWhether this is the default phase

Phase Fields

FieldTypeDescription
IconStringIcon identifier for the phase
ActionNameStringAction name to transition to this phase (e.g., "Send", "Pay")
LocalizedActionNameStringLocalized action name
IsAssignableBooleanWhether the phase can be manually assigned
IsTerminalBooleanWhether this is an end state (e.g., Won, Lost, Paid)

Relationships

RelationshipTarget EntityCardinalityDescription
PipelinePipelineN:1Pipeline this phase belongs to

Expanding Relationships

GET/v1/odata/Datastore_Phase({id})?$expand=Pipeline
GET/v1/odata/Datastore_Phase({id})/Pipeline

Usage

Changing an Activity Phase

To change the phase of an activity, update it with the phase ID:

POST /v1/odata/Activity_Invoice
{
"ID": "453ee597-6208-4b54-b511-da18fd31569d",
"Phase": {
"ID": "f0aed36c-2132-400f-92ac-e141a893cf0a"
}
}

Finding Terminal Phases

To find which phases represent an end state (e.g., Won/Lost for opportunities):

GET /v1/odata/Datastore_Phase_ActivitySalesOpportunity?$filter=IsTerminal eq true

Filtering Examples

:::warning Filtering by _Type is not supported To narrow by phase subtype, query that subtype's own entity set instead (e.g. /v1/odata/Datastore_Phase_ActivityInvoice, /v1/odata/Datastore_Phase_ActivitySalesOpportunity). See Filtering by Type. :::

GET/v1/odata/Datastore_Phase?$filter=Name eq '{Name}'&$top={top}
GET/v1/odata/Datastore_Phase?$filter=Code eq '{Code}'&$top={top}
GET/v1/odata/Datastore_Phase?$filter=IsTerminal eq {IsTerminal}&$top={top}
GET/v1/odata/Datastore_Phase?$filter=IsAssignable eq {IsAssignable}&$top={top}