Skip to main content

Field Reference

BETA

The Contact Center Campaigns API is currently in Beta. See the Overview for details.

This page documents the full schema for every object and enum used in the Contact Center Campaigns API.

Objects

Campaign

Returned in the response body of every PATCH /campaigns/{campaignId} call.

FieldTypeDescriptionExample
idUUIDCampaign unique identifier123e4567-e89b-12d3-a456-426614174000
tenantIdstringTenant identifiertenant-123
integrationTypestringIntegration typecontactual
startTimetimestampScheduled start time (ISO 8601)2026-04-22T10:00:00Z
endTimetimestampScheduled end time (ISO 8601)2026-04-22T18:00:00Z
stateCampaignStateCurrent campaign stateRUNNING
displayStatusCampaignDisplayStatusUI-oriented derived statusRUNNING
recordCountnumberTotal number of records1500
recordCountsarray of RecordCountBreakdown of record counts by type, state, and resultsee example
lastBuildTimetimestampLast time campaign records were built (ISO 8601)2026-04-22T09:55:00Z
lastPurgedTimetimestampLast time campaign was purged (ISO 8601)2026-04-21T23:00:00Z
startedTimetimestampTime campaign actually started (ISO 8601)2026-04-22T10:00:05Z
completedTimetimestampTime campaign completed (ISO 8601)2026-04-22T17:45:00Z

Fields whose value is unknown or not applicable are omitted from the response rather than included with a null value.

RecordCount

A single entry in Campaign.recordCounts, aggregating record counts by the combination of type, state, and result.

FieldTypeDescriptionExample
typeRecordTypeRecord typeDYNAMIC
stateRecordStateRecord stateREADY
resultRecordResultRecord resultSUCCESS
countnumberCount of matching records45

Record

Returned as part of the response to POST /campaigns/{campaignId}/records.

FieldTypeDescriptionExample
idUUIDRecord unique identifier789e4567-e89b-12d3-a456-426614174000
typeRecordTypeRecord typeDYNAMIC
crmRecordIdstringCRM record identifier (1-32 characters)CRM-12345
priorityRecordPriorityPriority for dialing orderHIGH
ranknumberRanking within priority group1.5
nextAttemptAftertimestampEarliest time the record may be attempted next2026-04-23T11:30:00Z
retryCountnumberNumber of retry attempts so far2
stateRecordStateCurrent record statePENDING
stateReasonstringReason for the current state (if any)Scheduled for retry
resultRecordResultFinal result of record processing, once completeSUCCESS

AddRecordRequest

Sent as each item inside the records array on POST /campaigns/{campaignId}/records.

FieldTypeRequiredConstraintsDescription
crmRecordIdstring1-32 characters; unique in campaignCRM record identifier
scheduleAttimestampnoISO 8601Earliest time the record may be attempted. Records are ordered by earliest scheduleAt first.
priorityRecordPrioritynodefault HIGHDialing priority
ranknumbernoauto-assigned if omittedOrdering within the priority group. If omitted, the server assigns a rank equal to the current number of records in that priority group plus one.

Enums

CampaignState

The 11 possible states of a campaign. Used in Campaign.state and as the precondition for every action.

ValueDescription
CREATEDThe campaign has just been created and is not yet active. You can edit or delete the campaign in this state.
BUILDINGThe system is querying CRM data and preparing the campaign for use. The CRM query and filter can be edited and the campaign rebuilt as many times as needed before it is started.
READYThe campaign is fully built and ready to be started. You can still edit or delete the campaign at this stage.
PENDINGThe campaign has been started and is waiting for its scheduled start time. No further edits are allowed.
STARTINGThe campaign is in the process of starting, which may include final preparations before it becomes active.
RUNNINGThe campaign is currently active and dialing records as agents become available. No edits or deletions are allowed.
PAUSEDNew records are no longer being added to the dialing queue, but records already queued will still be dialed. The campaign can be resumed.
COMPLETEThe campaign has finished running, either because it reached its end time or was cancelled. A completed campaign cannot be restarted, but it can be deleted.
BUILD_ERRORAn error occurred while building the campaign. You can edit or delete the campaign to resolve the issue.
RUN_ERRORAn error occurred while running the campaign. The campaign cannot be edited or deleted until the error is resolved.
DELETEDThe campaign has been removed from active use. It is retained for record-keeping but cannot be modified or restored.

See the State Machine for transitions.

CampaignAction

The 8 actions that can be sent as the action field of a PATCH /campaigns/{campaignId} request.

ValueDescription
BUILDPrepares a newly created campaign for use.
RESETResets a campaign that is READY or has a BUILD_ERROR, allowing you to rebuild it.
STARTStarts a campaign that is READY, moving it to the next phase.
PAUSETemporarily stops a RUNNING campaign. Can be resumed later.
RESUMEResumes a PAUSED campaign, returning it to RUNNING.
RETRYRetries a campaign that encountered a RUN_ERROR.
CANCELCancels a campaign that is PENDING, RUNNING, PAUSED, or in RUN_ERROR.
PURGEClears all queued interactions for a campaign that is PAUSED, RUN_ERROR, or COMPLETE.

For the full valid-from-states matrix, see the State Machine.

CampaignDisplayStatus

A UI-oriented derived status attached to every Campaign. Each value is derived from the campaign's state and enabled flag. Use state for automation logic; displayStatus is only intended for human-readable display.

ValueDerived from
NEWstate = CREATED
BUILDINGstate = BUILDING or state = STARTING
BUILD_FAILEDstate = BUILD_ERROR
READY_TO_RUNstate = READY
SCHEDULEDstate = PENDING
RUNNINGstate = RUNNING
PAUSEDstate = PAUSED with no pending purge
PURGEDstate = PAUSED and the campaign has been purged
ERRORstate = RUN_ERROR with no pending purge
ERROR_PURGEDstate = RUN_ERROR and the campaign has been purged
COMPLETEDstate = COMPLETE or state = DELETED
STOPPEDstate = COMPLETE or state = DELETED when the campaign was cancelled via CANCEL
DISABLEDenabled = false (regardless of state)

RecordType

ValueDescription
CRM_QUERYRecord derived from a CRM query configured on the campaign.
DYNAMICRecord added dynamically (e.g. through this API).

RecordState

The 9 possible states of a record.

ValueDescription
PENDINGWaiting to be processed.
REQUESTEDAn interaction has been requested.
QUEUEDAn interaction is queued for routing.
CANCEL_REQUESTEDCancellation is in progress.
AGENT_ACCEPTEDAn agent has accepted the interaction.
COMPLETEProcessing completed successfully.
REJECTEDRecord was rejected as not valid (for example, no valid phone numbers).
DELETEDRecord has been soft-deleted.
ERRORAn error occurred during processing.

RecordResult

The final outcome of a record's processing, set once the record reaches a terminal state.

ValueDescription
SUCCESSCompleted with a successful interaction.
NO_VALID_NUMBERRejected — no valid phone numbers were found in CRM.
SCHEDULE_COMPLETESchedule has no future active date.
INTERACTION_FAILEDThe interaction was not successful and no retries are configured.
MAX_ATTEMPTS_REACHEDThe interaction was not successful after the configured number of retries.
INTERACTION_SKIPPEDThe interaction was skipped by the agent.
CALLBACK_SCHEDULEDA callback was scheduled by the agent.

RecordPriority

Dialing priority. Records are dialed HIGH first, then MEDIUM, then LOW. Within a priority group, records are ordered by rank.

ValueDescription
HIGHHighest priority (default)
MEDIUMMedium priority
LOWLowest priority

Next steps