Skip to main content

Workflows Executions

Service for Workflow Executions which covers executions of processes defined in an Organization

Quick Startโ€‹

# List available operations
epilot workflow

# Call an operation
epilot workflow getExecutions

Common Flagsโ€‹

FlagDescription
-p key=valueSet a named parameter
-d '{...}'Request body JSON
-H 'Key: Value'Custom header
-t, --token <token>Bearer token for authentication
--profile <name>Use a named profile
-s, --server <url>Override server base URL
-i, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operationsโ€‹

Workflow Executions

  • getExecutions โ€” Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are
  • createExecution โ€” Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template).
  • getExecution โ€” Get a full workflow execution, included steps information, by execution id.
  • updateExecution โ€” Patches updates like assignees, status, closingReason for a single Workflow Execution.
  • deleteExecution โ€” Delete workflow execution by id. Workflow contexts will NOT be deleted.

Workflow Steps

  • createStep โ€” Create a new step in current workflow execution.
  • updateStep โ€” Patches various changes to a workflow execution step.
  • deleteStep โ€” Deletes a step from a workflow execution.

Closing Reasons

Flows V2

  • startFlowExecution โ€” Starts a new Flow Execution based on a flow template.
  • getFlowExecution โ€” Get a full flow execution, included tasks, phases, edges & analytics.
  • patchFlowExecution โ€” Patch flow execution with new assignees, status, analytics & other changes.
  • deleteFlowExecution โ€” Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.
  • searchFlowExecutions โ€” Search Flow Executions for a specific Entity.
  • patchTask โ€” Changes various attributes of a flow task, like assignees, status, due date, etc.
  • runTaskAutomation โ€” Runs configured automation for a flow task
  • executeTask โ€” Executes any kind of flow task immediately.
  • patchPhase โ€” Apply updates to a phase within flow execution
  • addTask โ€” Create a new task in current workflow execution.
  • cancelTaskSchedule โ€” Cancels a scheduled task, deleting the schedule and marking the task as skipped.

getExecutionsโ€‹

Retrieve Workflow Executions. Optionally, you can filter them by context & schema. Please be aware, these executions are

GET /v1/workflows/executions

Parameters

NameInTypeRequiredDescription
contextquerystringNoId of an Entity
schemaquerystringNoSchema of an Entity

Sample Call

epilot workflow getExecutions

With JSONata filter:

epilot workflow getExecutions --jsonata '$'
Sample Response
[
{
"id": "8gja72h6kas6h",
"name": "Lead Qualification",
"trigger": "MANUAL",
"status": "STARTED",
"creationTime": "2021-04-27T12:01:13.000Z",
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:01:13.000Z",
"flow": [
{
"id": "sectionId1",
"definitionId": "section_definition_id_1",
"name": "Initial Information Gathering",
"type": "SECTION",
"steps": [
{
"id": "sada5641f3a21",
"definitionId": "step_definition_id_1",
"name": "Call client"
},
{
"id": "sada5641f3a22",
"definitionId": "step_definition_id_2",
"name": "Check product availability"
}
]
},
{
"id": "firstLevelStepId1",
"definitionId": "step_definition_id_4",
"name": "Print and send catalog",
"type": "STEP"
}
]
}
]

createExecutionโ€‹

Create a Workflow Execution. Start a new workflow execution, based on a workflow definition (template).

POST /v1/workflows/executions

Request Body (required)

Sample Call

epilot workflow createExecution

With request body:

epilot workflow createExecution \
-d '{
"workflowId": "j3f23fh23uif98",
"trigger": "AUTOMATIC",
"contexts": [
{
"id": "3fa3fa86-0907-4642-a57e-0fe30a19874d",
"schema": "contact"
},
{
"id": "3a6d42fa-5070-4723-b90f-41ead4303e33",
"schema": "opportunity"
}
]
}'

Using stdin pipe:

cat body.json | epilot workflow createExecution

With JSONata filter:

epilot workflow createExecution --jsonata '$'
Sample Response
{
"id": "8gja72h6kas6h",
"name": "Lead Qualification",
"trigger": "MANUAL",
"status": "STARTED",
"creationTime": "2021-04-27T12:01:13.000Z",
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:01:13.000Z",
"assignedTo": ["252", "29052"],
"flow": [
{
"id": "sectionId1",
"name": "Initial Information Gathering",
"steps": [
{
"id": "sada5641f3a21",
"name": "Call client and confirm address and product",
"definitionId": "step_definition_id_1",
"status": "ASSIGNED",
"assignedTo": ["11"]
},
{
"id": "sada5641f3a22",
"name": "Check product availability",
"status": "UNASSIGNED",
"definitionId": "step_definition_id_2"
}
]
},
{
"id": "firstLevelStepId1",
"definitionId": "step_definition_id_4",
"name": "Print and send catalog",
"status": "SKIPPED",
"dueDate": "2023-01-15T20:00:00"
}
]
}

getExecutionโ€‹

Get a full workflow execution, included steps information, by execution id.

GET /v1/workflows/executions/{executionId}

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution

Sample Call

epilot workflow getExecution \
-p executionId=wd561

Using positional args for path parameters:

epilot workflow getExecution wd561

With JSONata filter:

epilot workflow getExecution -p executionId=wd561 --jsonata '$'
Sample Response
{
"id": "8gja72h6kas6h",
"name": "Lead Qualification",
"trigger": "MANUAL",
"status": "STARTED",
"creationTime": "2021-04-27T12:01:13.000Z",
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:01:13.000Z",
"assignedTo": ["252", "29052"],
"flow": [
{
"id": "sectionId1",
"name": "Initial Information Gathering",
"steps": [
{
"id": "sada5641f3a21",
"name": "Call client and confirm address and product",
"definitionId": "step_definition_id_1",
"status": "ASSIGNED",
"assignedTo": ["11"]
},
{
"id": "sada5641f3a22",
"name": "Check product availability",
"status": "UNASSIGNED",
"definitionId": "step_definition_id_2"
}
]
},
{
"id": "firstLevelStepId1",
"definitionId": "step_definition_id_4",
"name": "Print and send catalog",
"status": "SKIPPED",
"dueDate": "2023-01-15T20:00:00"
}
]
}

updateExecutionโ€‹

Patches updates like assignees, status, closingReason for a single Workflow Execution.

PATCH /v1/workflows/executions/{executionId}

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution

Request Body (required)

Sample Call

epilot workflow updateExecution \
-p executionId=wd561

With request body:

epilot workflow updateExecution \
-p executionId=wd561 \
-d '{
"status": "STARTED",
"assignedTo": ["string"],
"selectedClosingReasons": [
{
"id": "string",
"title": "string"
}
],
"closingReasonDescription": "string",
"dueDate": "string",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"closedBy": "string",
"contexts": [
{
"id": "string",
"title": "string",
"schema": "string"
}
],
"completedTime": "string"
}'

Using positional args for path parameters:

epilot workflow updateExecution wd561

Using stdin pipe:

cat body.json | epilot workflow updateExecution -p executionId=wd561

With JSONata filter:

epilot workflow updateExecution -p executionId=wd561 --jsonata '$'

deleteExecutionโ€‹

Delete workflow execution by id. Workflow contexts will NOT be deleted.

DELETE /v1/workflows/executions/{executionId}

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution to de deleted.

Sample Call

epilot workflow deleteExecution \
-p executionId=CustomerRequest

Using positional args for path parameters:

epilot workflow deleteExecution CustomerRequest

With JSONata filter:

epilot workflow deleteExecution -p executionId=CustomerRequest --jsonata '$'

createStepโ€‹

Create a new step in current workflow execution.

POST /v1/workflows/executions/{executionId}/steps

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution

Request Body (required)

Sample Call

epilot workflow createStep \
-p executionId=wd56125gah

With request body:

epilot workflow createStep \
-p executionId=wd56125gah \
-d '{
"insertionIndex": 0,
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"status": "UNASSIGNED",
"sectionId": "string",
"executionType": "MANUAL",
"automationConfig": {
"flowId": "string",
"executionId": "string",
"executionStatus": "string"
}
}'

Using positional args for path parameters:

epilot workflow createStep wd56125gah

Using stdin pipe:

cat body.json | epilot workflow createStep -p executionId=wd56125gah

With JSONata filter:

epilot workflow createStep -p executionId=wd56125gah --jsonata '$'
Sample Response
{
"id": "string",
"definitionId": "string",
"entityRefId": "string",
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"type": "STEP",
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"enabled": true,
"requirements": [
{
"definitionId": "string",
"type": "STEP",
"condition": "CLOSED"
}
],
"executionType": "MANUAL",
"sectionId": "string",
"executionId": "string",
"userIds": [0],
"assignedTo": ["string"],
"assignedToInProgress": "string",
"status": "UNASSIGNED",
"created": "string",
"lastUpdated": "string",
"statusLastUpdated": "string",
"startedTime": "string",
"completedTime": "string",
"dueDate": "string",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"manuallyCreated": true,
"automationConfig": {
"flowId": "string",
"executionId": "string",
"executionStatus": "string"
},
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
},
"taxonomies": ["string"]
}

updateStepโ€‹

Patches various changes to a workflow execution step.

PATCH /v1/workflows/executions/{executionId}/steps/{stepId}

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution
stepIdpathstringYesShort uuid (length 6) to identify the Workflow Execution Step.

Request Body (required)

Sample Call

epilot workflow updateStep \
-p executionId=wd56125gah \
-p stepId=7hj28a

With request body:

epilot workflow updateStep \
-p executionId=wd56125gah \
-p stepId=7hj28a \
-d '{
"stepId": "string",
"entityRefId": "string",
"userIds": [0],
"assignedTo": ["string"],
"assignedToInProgress": "string",
"status": "UNASSIGNED",
"dueDate": "string",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"position": {
"index": 0,
"sectionId": "string"
},
"automationConfig": {
"flowId": "string",
"executionId": "string",
"executionStatus": "string"
},
"startedTime": "string",
"completedTime": "string"
}'

Using positional args for path parameters:

epilot workflow updateStep wd56125gah 7hj28a

Using stdin pipe:

cat body.json | epilot workflow updateStep -p executionId=wd56125gah -p stepId=7hj28a

With JSONata filter:

epilot workflow updateStep -p executionId=wd56125gah -p stepId=7hj28a --jsonata '$'
Sample Response
{
"id": "string",
"definitionId": "string",
"entityRefId": "string",
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"type": "STEP",
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"enabled": true,
"requirements": [
{
"definitionId": "string",
"type": "STEP",
"condition": "CLOSED"
}
],
"executionType": "MANUAL",
"sectionId": "string",
"executionId": "string",
"userIds": [0],
"assignedTo": ["string"],
"assignedToInProgress": "string",
"status": "UNASSIGNED",
"created": "string",
"lastUpdated": "string",
"statusLastUpdated": "string",
"startedTime": "string",
"completedTime": "string",
"dueDate": "string",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"manuallyCreated": true,
"automationConfig": {
"flowId": "string",
"executionId": "string",
"executionStatus": "string"
},
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
},
"taxonomies": ["string"]
}

deleteStepโ€‹

Deletes a step from a workflow execution.

DELETE /v1/workflows/executions/{executionId}/steps/{stepId}

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution
stepIdpathstringYesShort uuid (length 6) to identify the Workflow Execution Step.

Sample Call

epilot workflow deleteStep \
-p executionId=wd56125gah \
-p stepId=7hj28a

Using positional args for path parameters:

epilot workflow deleteStep wd56125gah 7hj28a

With JSONata filter:

epilot workflow deleteStep -p executionId=wd56125gah -p stepId=7hj28a --jsonata '$'

getClosingReasonExecutionโ€‹

Shows all Closing Reasons defined at the moment of starting the Workflow Execution.

GET /v1/workflows/executions/{executionId}/closing-reasons

Parameters

NameInTypeRequiredDescription
executionIdpathstringYesId of the execution

Sample Call

epilot workflow getClosingReasonExecution \
-p executionId=wd561

Using positional args for path parameters:

epilot workflow getClosingReasonExecution wd561

With JSONata filter:

epilot workflow getClosingReasonExecution -p executionId=wd561 --jsonata 'reasons'
Sample Response
{
"reasons": [
{
"id": "string",
"title": "string"
}
]
}

startFlowExecutionโ€‹

Starts a new Flow Execution based on a flow template.

POST /v2/flows/executions

Request Body (required)

Sample Call

epilot workflow startFlowExecution

With request body:

epilot workflow startFlowExecution \
-d '{
"flow_template_id": "string",
"trigger": {
"type": "MANUAL",
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
}
},
"contexts": [
{
"entity_id": "string",
"entity_schema": "string",
"is_primary": false
}
],
"purposes": ["string"]
}'

Using stdin pipe:

cat body.json | epilot workflow startFlowExecution

With JSONata filter:

epilot workflow startFlowExecution --jsonata 'id'
Sample Response
{
"id": "string",
"flow_template_id": "string",
"org_id": "string",
"name": "string",
"created_at": "string",
"updated_at": "string",
"due_date": "string",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"status": "STARTED",
"assigned_to": ["string"],
"analytics": {
"started_at": "string",
"completed_at": "string",
"closed_at": "string",
"started_by": "string",
"closed_by": "string"
},
"contexts": [
{
"entity_id": "string",
"entity_schema": "string",
"is_primary": false
}
],
"crt_tasks": [
{
"id": "string"
}
],
"phases": [
{
"id": "string",
"template_id": "string",
"name": "string",
"status": "OPEN",
"updated_at": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"analytics": {},
"taxonomies": ["string"],
"loop_config": {}
}
],
"tasks": [
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {},
"status": "UNASSIGNED",
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"analytics": {},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {},
"installer": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"loop_config": {}
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "abc123",
"none_met": true
}
],
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
},
"closing_reason": {
"selected_reasons": [
{}
],
"configured_reasons": [
{}
],
"extra_description": "string"
},
"available_in_ecp": true,
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"trigger": {
"type": "MANUAL",
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
}
},
"singleClosingReasonSelection": true
}

getFlowExecutionโ€‹

Get a full flow execution, included tasks, phases, edges & analytics.

GET /v2/flows/executions/{execution_id}

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution

Sample Call

epilot workflow getFlowExecution \
-p execution_id=wd561

Using positional args for path parameters:

epilot workflow getFlowExecution wd561

With JSONata filter:

epilot workflow getFlowExecution -p execution_id=wd561 --jsonata 'id'
Sample Response
{
"id": "string",
"flow_template_id": "string",
"org_id": "string",
"name": "string",
"created_at": "string",
"updated_at": "string",
"due_date": "string",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"status": "STARTED",
"assigned_to": ["string"],
"analytics": {
"started_at": "string",
"completed_at": "string",
"closed_at": "string",
"started_by": "string",
"closed_by": "string"
},
"contexts": [
{
"entity_id": "string",
"entity_schema": "string",
"is_primary": false
}
],
"crt_tasks": [
{
"id": "string"
}
],
"phases": [
{
"id": "string",
"template_id": "string",
"name": "string",
"status": "OPEN",
"updated_at": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"analytics": {},
"taxonomies": ["string"],
"loop_config": {}
}
],
"tasks": [
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {},
"status": "UNASSIGNED",
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"analytics": {},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {},
"installer": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"loop_config": {}
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "abc123",
"none_met": true
}
],
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
},
"closing_reason": {
"selected_reasons": [
{}
],
"configured_reasons": [
{}
],
"extra_description": "string"
},
"available_in_ecp": true,
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"trigger": {
"type": "MANUAL",
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
}
},
"singleClosingReasonSelection": true
}

patchFlowExecutionโ€‹

Patch flow execution with new assignees, status, analytics & other changes.

PATCH /v2/flows/executions/{execution_id}

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution

Request Body (required)

Sample Call

epilot workflow patchFlowExecution \
-p execution_id=wd561

With request body:

epilot workflow patchFlowExecution \
-p execution_id=wd561 \
-d '{
"status": "STARTED",
"assigned_to": ["string"],
"closing_reason": {
"selected_reasons": [
{
"id": "string",
"title": "string"
}
],
"configured_reasons": [
{
"id": "string",
"title": "string"
}
],
"extra_description": "string"
},
"due_date": "string",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"contexts": [
{
"entity_id": "string",
"entity_schema": "string",
"is_primary": false
}
]
}'

Using positional args for path parameters:

epilot workflow patchFlowExecution wd561

Using stdin pipe:

cat body.json | epilot workflow patchFlowExecution -p execution_id=wd561

With JSONata filter:

epilot workflow patchFlowExecution -p execution_id=wd561 --jsonata 'id'
Sample Response
{
"id": "string",
"flow_template_id": "string",
"org_id": "string",
"name": "string",
"created_at": "string",
"updated_at": "string",
"due_date": "string",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"status": "STARTED",
"assigned_to": ["string"],
"analytics": {
"started_at": "string",
"completed_at": "string",
"closed_at": "string",
"started_by": "string",
"closed_by": "string"
},
"contexts": [
{
"entity_id": "string",
"entity_schema": "string",
"is_primary": false
}
],
"crt_tasks": [
{
"id": "string"
}
],
"phases": [
{
"id": "string",
"template_id": "string",
"name": "string",
"status": "OPEN",
"updated_at": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"analytics": {},
"taxonomies": ["string"],
"loop_config": {}
}
],
"tasks": [
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {},
"status": "UNASSIGNED",
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"analytics": {},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {},
"installer": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"loop_config": {}
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "abc123",
"none_met": true
}
],
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
},
"closing_reason": {
"selected_reasons": [
{}
],
"configured_reasons": [
{}
],
"extra_description": "string"
},
"available_in_ecp": true,
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"trigger": {
"type": "MANUAL",
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
}
},
"singleClosingReasonSelection": true
}

deleteFlowExecutionโ€‹

Deletes a specific execution of a flow, identified by id. Flow contexts will NOT be deleted.

DELETE /v2/flows/executions/{execution_id}

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution
softquerybooleanNoIf true, the execution will NOT be deleted permanently, but rather kept for archive purpose.

Sample Call

epilot workflow deleteFlowExecution \
-p execution_id=wd561

Using positional args for path parameters:

epilot workflow deleteFlowExecution wd561

With JSONata filter:

epilot workflow deleteFlowExecution -p execution_id=wd561 --jsonata '$'

searchFlowExecutionsโ€‹

Search Flow Executions for a specific Entity.

POST /v2/flows/executions:search

Request Body (required)

Sample Call

epilot workflow searchFlowExecutions \
-d '{"entity_id":"string","entity_schema":"string"}'

Using stdin pipe:

cat body.json | epilot workflow searchFlowExecutions

With JSONata filter:

epilot workflow searchFlowExecutions --jsonata 'results[0]'
Sample Response
{
"results": [
{
"id": "string",
"flow_template_id": "string",
"org_id": "string",
"name": "string",
"created_at": "string",
"updated_at": "string",
"due_date": "string",
"due_date_config": {},
"status": "STARTED",
"assigned_to": ["string"],
"analytics": {},
"contexts": [],
"crt_tasks": [],
"phases": [],
"tasks": [],
"edges": [],
"_execution_chain": {},
"closing_reason": {},
"available_in_ecp": true,
"entity_sync": [],
"taxonomies": ["string"],
"trigger": {},
"singleClosingReasonSelection": true
}
]
}

patchTaskโ€‹

Changes various attributes of a flow task, like assignees, status, due date, etc.

PATCH /v2/flows/executions/{execution_id}/tasks/{task_id}

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution
task_idpathstringYesId of the task

Request Body (required)

Sample Call

epilot workflow patchTask \
-p execution_id=wd561 \
-p task_id=7hj28a

With request body:

epilot workflow patchTask \
-p execution_id=wd561 \
-p task_id=7hj28a \
-d '{
"name": "string",
"status": "UNASSIGNED",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"assigned_to": ["string"],
"enabled": true,
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
},
"description": {
"enabled": true,
"value": "string"
},
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"next_condition_id": "string",
"revert_execution": false
}'

Using positional args for path parameters:

epilot workflow patchTask wd561 7hj28a

Using stdin pipe:

cat body.json | epilot workflow patchTask -p execution_id=wd561 -p task_id=7hj28a

With JSONata filter:

epilot workflow patchTask -p execution_id=wd561 -p task_id=7hj28a --jsonata '$'
Sample Response
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"status": "UNASSIGNED",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"requirements": [
{
"task_id": "string",
"phase_id": "string",
"when": "TASK_FINISHED"
}
],
"assigned_to": ["string"],
"analytics": {
"started_at": "1970-01-01T00:00:00.000Z",
"in_progress_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status_updated_at": "1970-01-01T00:00:00.000Z",
"in_progress_by": "string",
"completed_by": "string",
"skipped_by": "string"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"loop_config": {
"max_iterations": 3,
"crt_iterations": 0
}
}

runTaskAutomationโ€‹

Runs configured automation for a flow task

POST /v2/flows/executions/{execution_id}/tasks/{task_id}/automation:run

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution
task_idpathstringYesId of the task

Sample Call

epilot workflow runTaskAutomation \
-p execution_id=wd561 \
-p task_id=7hj28a

Using positional args for path parameters:

epilot workflow runTaskAutomation wd561 7hj28a

With JSONata filter:

epilot workflow runTaskAutomation -p execution_id=wd561 -p task_id=7hj28a --jsonata '$'
Sample Response
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"status": "UNASSIGNED",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"requirements": [
{
"task_id": "string",
"phase_id": "string",
"when": "TASK_FINISHED"
}
],
"assigned_to": ["string"],
"analytics": {
"started_at": "1970-01-01T00:00:00.000Z",
"in_progress_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status_updated_at": "1970-01-01T00:00:00.000Z",
"in_progress_by": "string",
"completed_by": "string",
"skipped_by": "string"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
},
"automation_execution_id": "string",
"trigger_mode": "manual",
"schedule": {
"mode": "immediate"
},
"loop_config": {
"max_iterations": 3,
"crt_iterations": 0
}
}

executeTaskโ€‹

Executes any kind of flow task immediately.

POST /v2/flows/executions/{execution_id}/tasks/{task_id}/execute

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution
task_idpathstringYesId of the task

Sample Call

epilot workflow executeTask \
-p execution_id=wd561 \
-p task_id=7hj28a

Using positional args for path parameters:

epilot workflow executeTask wd561 7hj28a

With JSONata filter:

epilot workflow executeTask -p execution_id=wd561 -p task_id=7hj28a --jsonata '$'
Sample Response
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"status": "UNASSIGNED",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"requirements": [
{
"task_id": "string",
"phase_id": "string",
"when": "TASK_FINISHED"
}
],
"assigned_to": ["string"],
"analytics": {
"started_at": "1970-01-01T00:00:00.000Z",
"in_progress_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status_updated_at": "1970-01-01T00:00:00.000Z",
"in_progress_by": "string",
"completed_by": "string",
"skipped_by": "string"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"loop_config": {
"max_iterations": 3,
"crt_iterations": 0
}
}

patchPhaseโ€‹

Apply updates to a phase within flow execution

PATCH /v2/flows/executions/{execution_id}/phases/{phase_id}

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution
phase_idpathstringYesId of the phase

Request Body (required)

Sample Call

epilot workflow patchPhase \
-p execution_id=wd561 \
-p phase_id=9gjs2952j

With request body:

epilot workflow patchPhase \
-p execution_id=wd561 \
-p phase_id=9gjs2952j \
-d '{
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"assigned_to": ["string"]
}'

Using positional args for path parameters:

epilot workflow patchPhase wd561 9gjs2952j

Using stdin pipe:

cat body.json | epilot workflow patchPhase -p execution_id=wd561 -p phase_id=9gjs2952j

With JSONata filter:

epilot workflow patchPhase -p execution_id=wd561 -p phase_id=9gjs2952j --jsonata 'id'
Sample Response
{
"id": "string",
"template_id": "string",
"name": "string",
"status": "OPEN",
"updated_at": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"assigned_to": ["string"],
"analytics": {
"started_at": "1970-01-01T00:00:00.000Z",
"in_progress_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status_updated_at": "1970-01-01T00:00:00.000Z",
"in_progress_by": "string",
"completed_by": "string",
"skipped_by": "string"
},
"taxonomies": ["string"],
"loop_config": {
"max_iterations": 3,
"crt_iterations": 0
}
}

addTaskโ€‹

Create a new task in current workflow execution.

POST /v2/flows/executions/{execution_id}/tasks

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution

Request Body (required)

Sample Call

epilot workflow addTask \
-p execution_id=wd561

With request body:

epilot workflow addTask \
-p execution_id=wd561 \
-d '{
"previous_task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"next_task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"task": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"status": "UNASSIGNED",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"assigned_to": ["string"],
"enabled": true,
"automation_config": {
"flow_id": "string",
"execution_id": "string",
"execution_status": "string",
"error_reason": "string"
},
"phase_id": "string",
"task_type": "MANUAL"
}
}'

Using positional args for path parameters:

epilot workflow addTask wd561

Using stdin pipe:

cat body.json | epilot workflow addTask -p execution_id=wd561

With JSONata filter:

epilot workflow addTask -p execution_id=wd561 --jsonata '$'
Sample Response
{
"id": "string",
"template_id": "string",
"name": "string",
"description": {
"enabled": true,
"value": "string"
},
"status": "UNASSIGNED",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {
"duration": 0,
"unit": "minutes",
"type": "WORKFLOW_STARTED",
"task_id": "string",
"phase_id": "string"
},
"requirements": [
{
"task_id": "string",
"phase_id": "string",
"when": "TASK_FINISHED"
}
],
"assigned_to": ["string"],
"analytics": {
"started_at": "1970-01-01T00:00:00.000Z",
"in_progress_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"status_updated_at": "1970-01-01T00:00:00.000Z",
"in_progress_by": "string",
"completed_by": "string",
"skipped_by": "string"
},
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"manually_created": true,
"enabled": true,
"ecp": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"installer": {
"enabled": true,
"label": "string",
"description": "string",
"journey": {
"id": "string",
"journeyId": "string",
"name": "string",
"complete_task_automatically": true
}
},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"loop_config": {
"max_iterations": 3,
"crt_iterations": 0
}
}

cancelTaskScheduleโ€‹

Cancels a scheduled task, deleting the schedule and marking the task as skipped.

DELETE /v2/flows/executions/{execution_id}/tasks/{task_id}/schedule

Parameters

NameInTypeRequiredDescription
execution_idpathstringYesId of the execution
task_idpathstringYesId of the task

Sample Call

epilot workflow cancelTaskSchedule \
-p execution_id=wd561 \
-p task_id=7hj28a

Using positional args for path parameters:

epilot workflow cancelTaskSchedule wd561 7hj28a

With JSONata filter:

epilot workflow cancelTaskSchedule -p execution_id=wd561 -p task_id=7hj28a --jsonata '$'