Enrollment programs: cancel, pause, resume
The Enrollment Verbs cancel, pause, resume as MCP do programs, with inputs, result, refusals and an example.
Reference for Enrollment, one group of Enrollment programs.
Enrollment.cancel
Cancel ends one Contact’s run through a Sequence for good, with the reason it records as exitReason. Verb page.
do: return await $.Enrollment.cancel(input)Emits Enrollment.canceled.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
enrollment | Enrollment | required | The Enrollment to end. |
reason | string | required | Why it ends. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
enrollment | Enrollment | required | The Enrollment, now exited. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Enrollment.cancel({ enrollment: 'enrollment_t2LKaLorKn', reason: 'replied' })"
}
}Enrollment.pause
Pause stops one Contact’s run through a Sequence at its current step, without ending it. Verb page.
do: return await $.Enrollment.pause(input)Emits Enrollment.paused.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
enrollment | Enrollment | required | The Enrollment to pause. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
enrollment | Enrollment | required | The Enrollment, now paused. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Enrollment.pause({ enrollment: 'enrollment_t2LKaLorKn' })"
}
}Enrollment.resume
Resume restarts a paused run at the step it stopped on and sets when that step fires. Verb page.
do: return await $.Enrollment.resume(input)Emits Enrollment.resumed.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
enrollment | Enrollment | required | The paused Enrollment. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
enrollment | Enrollment | required | The Enrollment, active again. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Enrollment.resume({ enrollment: 'enrollment_t2LKaLorKn' })"
}
}