/programs- Program management/program-executions- Execution management
Types
Type Definitions
Type Definitions
Program Endpoints
Create a new program
Example (batch mode — default):
Mode-specific validation:
mode: 'batch'(default) —audienceIdrequired,triggerConditionmust not be setmode: 'live'—triggerConditionrequired,audienceIdoptional (auto-created if not provided)triggerCondition.attributeNamemust reference an existing date-type custom attribute in the org
List all programs
Get program details
Error Responses:Update a program
Delete a program
Error Responses:Launch a new execution of the program
Batch mode: Snapshots the audience and starts calling contacts immediately. Live mode: The output audience was auto-created when the program was created. Launch pre-computes triggers for all org contacts with the matching attribute and starts the trigger evaluation cron. Contacts are called as their triggers become due.List all executions for a program
List contact triggers for a live program
Program Execution Endpoints
List all active executions
Get execution details
Error Responses:Pause a running execution
Notes:- Already-queued calls will continue to completion
- New contacts will not be pulled until resumed
- Only valid for executions in
runningstatus
Resume a paused execution
Optional Request Body:- Valid for executions in
paused,paused_no_credits, orpaused_thresholdstatus - When resuming from
paused_threshold, counters withresetOnResume: trueare reset to zero - If
autoPauseRulesis provided in the body, the execution’s rules are updated before resuming
Cancel an execution
Notes:- Remaining pending contacts are marked as
skipped - Already-queued calls will continue to completion
- Sets execution status to
cancelled
Notes
Retry Strategy Examples
No retries:- Retries failed calls after 30 minutes
- Maximum 3 retries (4 total attempts)
- Retries at specific dates/times
- Number of entries = number of retry attempts
Pause Windows
Pause windows define time ranges when calls should NOT be made. The orchestrator respects these windows and skips pulling contacts during paused periods. Weekly pause (lunch break):Execution Lifecycle
Progress Counters
totalContacts: Snapshot of audience size at launch (batch), or incremented as triggers fire (live)contactsCompleted: Successfully answered callscontactsFailed: Exhausted all retriescontactsPending: Waiting to be called (includes pending_retry)contactsInProgress: Currently queued or in-call
totalContacts = contactsCompleted + contactsFailed + contactsPending + contactsInProgress
Live mode note: totalContacts starts at 0 and grows as triggers become due. The execution never auto-completes — it runs until manually stopped or stopAt is reached.
Auto-Pause Rules
Auto-pause rules allow automatic pausing of an execution when a node has been executed a certain number of times across all calls. Counters are execution-scoped, Redis-backed, and atomic. How it works:- Define
autoPauseRuleson the program (snapshotted to execution at launch) - Each rule specifies a
nodeIdand athreshold— every time that node executes in any call, the counter increments implicitly - When a counter reaches its threshold, the execution is automatically paused with status
paused_threshold - Resume via
PATCH /program-executions/:id/resume— counters withresetOnResume: trueare reset to zero. Optionally pass updatedautoPauseRulesin the request body.
- Multiple rules are supported; any single rule reaching its threshold triggers the pause
- Counting is implicit: no flow changes needed — just specify the node ID in the rules
- Counter state is cleaned up when executions reach terminal states (completed, stopped, cancelled)