Skip to main content

Workflows Definitions

The Workflows Definitions API enables you to create, manage, and configure reusable workflow templates within your organization. Workflow definitions serve as blueprints that define the structure and behavior of business processes, which can then be instantiated as workflow executions.

Quick Startโ€‹

# List available operations
epilot workflow-definition

# Call an operation
epilot workflow-definition getMaxAllowedLimit

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โ€‹

Workflows

Flows V2

Closing Reason

  • getAllClosingReasons โ€” Get all Closing Reasons defined in the organization by default all Active.
  • createClosingReason โ€” A created Closing Reason is stored for the organization and will be displayed in the library of reasons.
  • getClosingReason โ€” Get specific closing reason by id from the organisation.
  • updateClosingReason โ€” Update an existing closing reason
  • deleteClosingReason โ€” Permanently delete a closing reason (Using INACTIVE status is recommended instead)
  • changeReasonStatus โ€” Change the status of a Closing Reason (eg. ACTIVE to INACTIVE).

getMaxAllowedLimitโ€‹

Get limits and number of created executions for an Organization.

GET /v1/workflows/limits/max-allowed

Sample Call

epilot workflow-definition getMaxAllowedLimit

With JSONata filter:

epilot workflow-definition getMaxAllowedLimit --jsonata 'currentNoOfWorkflows'
Sample Response
{
"currentNoOfWorkflows": 0,
"maxAllowed": 0
}

getDefinitionsโ€‹

Retrieve all V1 workflow definitions belonging to the authenticated organization.

GET /v1/workflows/definitions

Sample Call

epilot workflow-definition getDefinitions

With JSONata filter:

epilot workflow-definition getDefinitions --jsonata '$'
Sample Response
[
{
"id": "string",
"name": "string",
"description": "string",
"creationTime": "2021-04-27T12:01:13.000Z",
"enabled": true,
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"userIds": [0],
"assignedTo": ["string"],
"enableECPWorkflow": true,
"flow": [
{},
{}
],
"closingReasons": [
{}
],
"updateEntityAttributes": [
{}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"]
}
]

createDefinitionโ€‹

Create a new V1 workflow definition. The definition consists of sections and steps

POST /v1/workflows/definitions

Request Body (required)

Sample Call

epilot workflow-definition createDefinition

With request body:

epilot workflow-definition createDefinition \
-d '{
"id": "string",
"name": "string",
"description": "string",
"creationTime": "2021-04-27T12:01:13.000Z",
"enabled": true,
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"userIds": [0],
"assignedTo": ["string"],
"enableECPWorkflow": true,
"flow": [
{
"id": "string",
"name": "string",
"order": 0,
"type": "STEP",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"assignedTo": ["string"],
"steps": [],
"taxonomies": ["string"]
},
{
"id": "string",
"name": "string",
"description": {},
"executionType": "MANUAL",
"automationConfig": {},
"journey": {},
"order": 0,
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"userIds": [0],
"requirements": [],
"assignedTo": ["string"],
"type": "STEP",
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"]
}
],
"closingReasons": [
{
"id": "x739cew"
}
],
"updateEntityAttributes": [
{
"source": "workflow_status",
"target": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"]
}'

Using stdin pipe:

cat body.json | epilot workflow-definition createDefinition

With JSONata filter:

epilot workflow-definition createDefinition --jsonata 'id'
Sample Response
{
"id": "string",
"name": "string",
"description": "string",
"creationTime": "2021-04-27T12:01:13.000Z",
"enabled": true,
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"userIds": [0],
"assignedTo": ["string"],
"enableECPWorkflow": true,
"flow": [
{
"id": "string",
"name": "string",
"order": 0,
"type": "STEP",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"assignedTo": ["string"],
"steps": [],
"taxonomies": ["string"]
},
{
"id": "string",
"name": "string",
"description": {},
"executionType": "MANUAL",
"automationConfig": {},
"journey": {},
"order": 0,
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"userIds": [0],
"requirements": [],
"assignedTo": ["string"],
"type": "STEP",
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"]
}
],
"closingReasons": [
{
"id": "x739cew"
}
],
"updateEntityAttributes": [
{
"source": "workflow_status",
"target": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"]
}

listFlowTemplatesโ€‹

List all Flow Templates for a customer. Optionally, you can filter flow templates by trigger values.

GET /v2/flows/templates

Parameters

NameInTypeRequiredDescription
trigger_typequery"automation" | "manual" | "journey_submission"NoType of trigger for whom to filter flow templates
trigger_source_idquerystringNoId of the trigger source to filter flow templates. Interpretation depends on trigger_type:
  • automation: use an {automation_flow_id} value
  • journey_submission: use a {journey_id} valu | | trigger_schema | query | string | No | Schema of the trigger source to filter flow templates. This parameter only makes sense when trigger_type is manual |

Sample Call

epilot workflow-definition listFlowTemplates

With JSONata filter:

epilot workflow-definition listFlowTemplates --jsonata 'results[0]'
Sample Response
{
"results": [
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"available_in_ecp": true,
"additional_triggers": [],
"phases": [],
"tasks": [],
"edges": [],
"closing_reasons": [],
"entity_sync": [],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": []
}
]
}

createFlowTemplateโ€‹

Create a new Flow Template (V2 workflow definition).

POST /v2/flows/templates

Parameters

NameInTypeRequiredDescription
enforce_limitsquerybooleanNoWhen true, size/count limit violations (max incoming edges per task, max branches, max entity-sync rules, ...) are enforced as 400 errors. Used by the flow-builder UI for interactive authoring. On upd

Request Body (required)

Sample Call

epilot workflow-definition createFlowTemplate

With request body:

epilot workflow-definition createFlowTemplate \
-d '{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {
"type": "automation",
"automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"
},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"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"],
"available_in_ecp": true,
"additional_triggers": [
{
"id": "string",
"type": "manual",
"entity_schema": "string"
},
{
"id": "string",
"type": "automation",
"automation_id": "string",
"input_entity": "thread",
"trigger_config": []
}
],
"phases": [
{
"id": "string",
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"taxonomies": ["string"]
}
],
"tasks": [
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL"
},
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {},
"trigger_mode": "manual",
"schedule": {},
"created_automatically": false
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "string",
"none_met": true
}
],
"closing_reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
],
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": [
{
"i18nKey": "string",
"message": "string",
"max": 0,
"current": 0,
"node_id": "string",
"task_name": "string",
"branch_name": "string",
"param_name": "string",
"path": []
}
]
}'

Using stdin pipe:

cat body.json | epilot workflow-definition createFlowTemplate

With JSONata filter:

epilot workflow-definition createFlowTemplate --jsonata '$'
Sample Response
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {
"type": "automation",
"automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"
},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"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"],
"available_in_ecp": true,
"additional_triggers": [
{
"id": "string",
"type": "manual",
"entity_schema": "string"
},
{
"id": "string",
"type": "automation",
"automation_id": "string",
"input_entity": "thread",
"trigger_config": []
}
],
"phases": [
{
"id": "string",
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"taxonomies": ["string"]
}
],
"tasks": [
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL"
},
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {},
"trigger_mode": "manual",
"schedule": {},
"created_automatically": false
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "string",
"none_met": true
}
],
"closing_reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
],
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": [
{
"i18nKey": "string",
"message": "string",
"max": 0,
"current": 0,
"node_id": "string",
"task_name": "string",
"branch_name": "string",
"param_name": "string",
"path": []
}
]
}

searchFlowTemplatesโ€‹

Search for flow templates by name, trigger type, enabled status, and more.

POST /v2/flows/templates:search

Request Body (required)

Sample Call

epilot workflow-definition searchFlowTemplates

With request body:

epilot workflow-definition searchFlowTemplates \
-d '{
"name": "string",
"definition_id": "string",
"trigger_type": "journey_submission",
"enabled": true,
"from": 0,
"size": 0,
"sort_by": "updated_at",
"sort_order": "desc"
}'

Using stdin pipe:

cat body.json | epilot workflow-definition searchFlowTemplates

With JSONata filter:

epilot workflow-definition searchFlowTemplates --jsonata 'results[0]'
Sample Response
{
"hits": 0,
"results": [
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"available_in_ecp": true,
"additional_triggers": [],
"phases": [],
"tasks": [],
"edges": [],
"closing_reasons": [],
"entity_sync": [],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": []
}
]
}

getFlowTemplateโ€‹

Retrieve a specific flow template by its unique identifier.

GET /v2/flows/templates/{flowId}

Parameters

NameInTypeRequiredDescription
flowIdpathstringYesUnique identifier of the flow template to retrieve.

Sample Call

epilot workflow-definition getFlowTemplate \
-p flowId=7hj28akg

Using positional args for path parameters:

epilot workflow-definition getFlowTemplate 7hj28akg

With JSONata filter:

epilot workflow-definition getFlowTemplate -p flowId=7hj28akg --jsonata '$'
Sample Response
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {
"type": "automation",
"automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"
},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"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"],
"available_in_ecp": true,
"additional_triggers": [
{
"id": "string",
"type": "manual",
"entity_schema": "string"
},
{
"id": "string",
"type": "automation",
"automation_id": "string",
"input_entity": "thread",
"trigger_config": []
}
],
"phases": [
{
"id": "string",
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"taxonomies": ["string"]
}
],
"tasks": [
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL"
},
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {},
"trigger_mode": "manual",
"schedule": {},
"created_automatically": false
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "string",
"none_met": true
}
],
"closing_reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
],
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": [
{
"i18nKey": "string",
"message": "string",
"max": 0,
"current": 0,
"node_id": "string",
"task_name": "string",
"branch_name": "string",
"param_name": "string",
"path": []
}
]
}

updateFlowTemplateโ€‹

Update Flow Template.

PUT /v2/flows/templates/{flowId}

Parameters

NameInTypeRequiredDescription
flowIdpathstringYesUnique identifier of the flow template to update.
enforce_limitsquerybooleanNoWhen true, size/count limit violations (max incoming edges per task, max branches, max entity-sync rules, ...) are enforced as 400 errors. Used by the flow-builder UI for interactive authoring. On upd

Request Body (required)

Sample Call

epilot workflow-definition updateFlowTemplate \
-p flowId=7hj28akg

With request body:

epilot workflow-definition updateFlowTemplate \
-p flowId=7hj28akg \
-d '{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {
"type": "automation",
"automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"
},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"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"],
"available_in_ecp": true,
"additional_triggers": [
{
"id": "string",
"type": "manual",
"entity_schema": "string"
},
{
"id": "string",
"type": "automation",
"automation_id": "string",
"input_entity": "thread",
"trigger_config": []
}
],
"phases": [
{
"id": "string",
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"taxonomies": ["string"]
}
],
"tasks": [
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL"
},
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {},
"trigger_mode": "manual",
"schedule": {},
"created_automatically": false
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "string",
"none_met": true
}
],
"closing_reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
],
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": [
{
"i18nKey": "string",
"message": "string",
"max": 0,
"current": 0,
"node_id": "string",
"task_name": "string",
"branch_name": "string",
"param_name": "string",
"path": []
}
]
}'

Using positional args for path parameters:

epilot workflow-definition updateFlowTemplate 7hj28akg

Using stdin pipe:

cat body.json | epilot workflow-definition updateFlowTemplate -p flowId=7hj28akg

With JSONata filter:

epilot workflow-definition updateFlowTemplate -p flowId=7hj28akg --jsonata '$'
Sample Response
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {
"type": "automation",
"automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"
},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"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"],
"available_in_ecp": true,
"additional_triggers": [
{
"id": "string",
"type": "manual",
"entity_schema": "string"
},
{
"id": "string",
"type": "automation",
"automation_id": "string",
"input_entity": "thread",
"trigger_config": []
}
],
"phases": [
{
"id": "string",
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"taxonomies": ["string"]
}
],
"tasks": [
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL"
},
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {},
"trigger_mode": "manual",
"schedule": {},
"created_automatically": false
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "string",
"none_met": true
}
],
"closing_reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
],
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": [
{
"i18nKey": "string",
"message": "string",
"max": 0,
"current": 0,
"node_id": "string",
"task_name": "string",
"branch_name": "string",
"param_name": "string",
"path": []
}
]
}

deleteFlowTemplateโ€‹

Delete Flow Template.

DELETE /v2/flows/templates/{flowId}

Parameters

NameInTypeRequiredDescription
flowIdpathstringYesUnique identifier of the flow template to be deleted.

Sample Call

epilot workflow-definition deleteFlowTemplate \
-p flowId=7hj28akg

Using positional args for path parameters:

epilot workflow-definition deleteFlowTemplate 7hj28akg

With JSONata filter:

epilot workflow-definition deleteFlowTemplate -p flowId=7hj28akg --jsonata '$'

duplicateFlowTemplateโ€‹

Create a copy of an existing flow template. The duplicated template will have a new

POST /v2/flows/templates/{flowId}/duplicate

Parameters

NameInTypeRequiredDescription
flowIdpathstringYesUnique identifier of the flow template to duplicate.

Sample Call

epilot workflow-definition duplicateFlowTemplate \
-p flowId=7hj28akg

Using positional args for path parameters:

epilot workflow-definition duplicateFlowTemplate 7hj28akg

With JSONata filter:

epilot workflow-definition duplicateFlowTemplate -p flowId=7hj28akg --jsonata '$'
Sample Response
{
"id": "string",
"org_id": "string",
"name": "string",
"description": "string",
"trigger": {
"type": "automation",
"automation_id": "g92j2-sg9ug92hjt1gh-9s9gajgs-a979gg"
},
"enabled": true,
"version": 2,
"created_at": "2021-04-27T12:01:13.000Z",
"updated_at": "2021-04-27T12:01:13.000Z",
"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"],
"available_in_ecp": true,
"additional_triggers": [
{
"id": "string",
"type": "manual",
"entity_schema": "string"
},
{
"id": "string",
"type": "automation",
"automation_id": "string",
"input_entity": "thread",
"trigger_config": []
}
],
"phases": [
{
"id": "string",
"name": "string",
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"assigned_to": ["string"],
"taxonomies": ["string"]
}
],
"tasks": [
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL"
},
{
"id": "string",
"name": "string",
"description": {},
"journey": {},
"due_date": "2021-04-27T12:00:00.000Z",
"due_date_config": {},
"requirements": [],
"assigned_to": ["string"],
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"],
"phase_id": "string",
"task_type": "MANUAL",
"automation_config": {},
"trigger_mode": "manual",
"schedule": {},
"created_automatically": false
}
],
"edges": [
{
"id": "string",
"from_id": "string",
"to_id": "string",
"condition_id": "string",
"none_met": true
}
],
"closing_reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
],
"entity_sync": [
{
"trigger": {},
"target": {},
"value": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"],
"linear": true,
"limit_warnings": [
{
"i18nKey": "string",
"message": "string",
"max": 0,
"current": 0,
"node_id": "string",
"task_name": "string",
"branch_name": "string",
"param_name": "string",
"path": []
}
]
}

getDefinitionโ€‹

Get specific Definition by id from the Organization.

GET /v1/workflows/definitions/{definitionId}

Parameters

NameInTypeRequiredDescription
definitionIdpathstringYesShort uuid (length 8) to identify the Workflow Definition.

Sample Call

epilot workflow-definition getDefinition \
-p definitionId=7hj28a

Using positional args for path parameters:

epilot workflow-definition getDefinition 7hj28a

With JSONata filter:

epilot workflow-definition getDefinition -p definitionId=7hj28a --jsonata 'id'
Sample Response
{
"id": "string",
"name": "string",
"description": "string",
"creationTime": "2021-04-27T12:01:13.000Z",
"enabled": true,
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"userIds": [0],
"assignedTo": ["string"],
"enableECPWorkflow": true,
"flow": [
{
"id": "string",
"name": "string",
"order": 0,
"type": "STEP",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"assignedTo": ["string"],
"steps": [],
"taxonomies": ["string"]
},
{
"id": "string",
"name": "string",
"description": {},
"executionType": "MANUAL",
"automationConfig": {},
"journey": {},
"order": 0,
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"userIds": [0],
"requirements": [],
"assignedTo": ["string"],
"type": "STEP",
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"]
}
],
"closingReasons": [
{
"id": "x739cew"
}
],
"updateEntityAttributes": [
{
"source": "workflow_status",
"target": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"]
}

updateDefinitionโ€‹

Update Workflow Definition.

PUT /v1/workflows/definitions/{definitionId}

Parameters

NameInTypeRequiredDescription
definitionIdpathstringYesShort uuid (length 8) to identify the Workflow Definition.

Request Body (required)

Sample Call

epilot workflow-definition updateDefinition \
-p definitionId=7hj28a

With request body:

epilot workflow-definition updateDefinition \
-p definitionId=7hj28a \
-d '{
"id": "string",
"name": "string",
"description": "string",
"creationTime": "2021-04-27T12:01:13.000Z",
"enabled": true,
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"userIds": [0],
"assignedTo": ["string"],
"enableECPWorkflow": true,
"flow": [
{
"id": "string",
"name": "string",
"order": 0,
"type": "STEP",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"assignedTo": ["string"],
"steps": [],
"taxonomies": ["string"]
},
{
"id": "string",
"name": "string",
"description": {},
"executionType": "MANUAL",
"automationConfig": {},
"journey": {},
"order": 0,
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"userIds": [0],
"requirements": [],
"assignedTo": ["string"],
"type": "STEP",
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"]
}
],
"closingReasons": [
{
"id": "x739cew"
}
],
"updateEntityAttributes": [
{
"source": "workflow_status",
"target": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"]
}'

Using positional args for path parameters:

epilot workflow-definition updateDefinition 7hj28a

Using stdin pipe:

cat body.json | epilot workflow-definition updateDefinition -p definitionId=7hj28a

With JSONata filter:

epilot workflow-definition updateDefinition -p definitionId=7hj28a --jsonata 'id'
Sample Response
{
"id": "string",
"name": "string",
"description": "string",
"creationTime": "2021-04-27T12:01:13.000Z",
"enabled": true,
"lastUpdateTime": "2021-04-27T12:01:13.000Z",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {
"numberOfUnits": 0,
"timePeriod": "minutes",
"actionTypeCondition": "WORKFLOW_STARTED",
"stepId": "string",
"phaseId": "string"
},
"userIds": [0],
"assignedTo": ["string"],
"enableECPWorkflow": true,
"flow": [
{
"id": "string",
"name": "string",
"order": 0,
"type": "STEP",
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"assignedTo": ["string"],
"steps": [],
"taxonomies": ["string"]
},
{
"id": "string",
"name": "string",
"description": {},
"executionType": "MANUAL",
"automationConfig": {},
"journey": {},
"order": 0,
"dueDate": "2021-04-27T12:00:00.000Z",
"dynamicDueDate": {},
"userIds": [0],
"requirements": [],
"assignedTo": ["string"],
"type": "STEP",
"ecp": {},
"installer": {},
"partner": {},
"taxonomies": ["string"]
}
],
"closingReasons": [
{
"id": "x739cew"
}
],
"updateEntityAttributes": [
{
"source": "workflow_status",
"target": {}
}
],
"taxonomies": ["string"],
"singleClosingReasonSelection": true,
"_manifest": ["string"]
}

deleteDefinitionโ€‹

Delete Workflow Definition.

DELETE /v1/workflows/definitions/{definitionId}

Parameters

NameInTypeRequiredDescription
definitionIdpathstringYesUnique identifier of the workflow definition to be deleted.

Sample Call

epilot workflow-definition deleteDefinition \
-p definitionId=CustomerRequest

Using positional args for path parameters:

epilot workflow-definition deleteDefinition CustomerRequest

With JSONata filter:

epilot workflow-definition deleteDefinition -p definitionId=CustomerRequest --jsonata '$'

getAllClosingReasonsโ€‹

Get all Closing Reasons defined in the organization by default all Active.

GET /v1/workflows/closing-reasons

Parameters

NameInTypeRequiredDescription
includeInactivequerybooleanNoWhen set to true, includes inactive closing reasons in the response. By default, only active closing reasons are returned.

Sample Call

epilot workflow-definition getAllClosingReasons

With JSONata filter:

epilot workflow-definition getAllClosingReasons --jsonata 'reasons'
Sample Response
{
"reasons": [
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}
]
}

createClosingReasonโ€‹

A created Closing Reason is stored for the organization and will be displayed in the library of reasons.

POST /v1/workflows/closing-reasons

Request Body (required)

Sample Call

epilot workflow-definition createClosingReason \
-d '{"id":"string","title":"string","status":"ACTIVE","lastUpdateTime":"string","creationTime":"string"}'

Using stdin pipe:

cat body.json | epilot workflow-definition createClosingReason

With JSONata filter:

epilot workflow-definition createClosingReason --jsonata 'id'
Sample Response
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}

getClosingReasonโ€‹

Get specific closing reason by id from the organisation.

GET /v2/workflows/closing-reasons/{reasonId}

Parameters

NameInTypeRequiredDescription
reasonIdpathstringYesunique id to identify the closing reason.

Sample Call

epilot workflow-definition getClosingReason \
-p reasonId=x739cew

Using positional args for path parameters:

epilot workflow-definition getClosingReason x739cew

With JSONata filter:

epilot workflow-definition getClosingReason -p reasonId=x739cew --jsonata 'id'
Sample Response
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}

updateClosingReasonโ€‹

Update an existing closing reason

PATCH /v2/workflows/closing-reasons/{reasonId}

Parameters

NameInTypeRequiredDescription
reasonIdpathstringYesunique id to identify the closing reason.

Request Body (required)

Sample Call

epilot workflow-definition updateClosingReason \
-p reasonId=x739cew \
-d '{"id":"string","title":"string","status":"ACTIVE","lastUpdateTime":"string","creationTime":"string"}'

Using positional args for path parameters:

epilot workflow-definition updateClosingReason x739cew

Using stdin pipe:

cat body.json | epilot workflow-definition updateClosingReason -p reasonId=x739cew

With JSONata filter:

epilot workflow-definition updateClosingReason -p reasonId=x739cew --jsonata 'id'
Sample Response
{
"id": "string",
"title": "string",
"status": "ACTIVE",
"lastUpdateTime": "string",
"creationTime": "string"
}

deleteClosingReasonโ€‹

Permanently delete a closing reason (Using INACTIVE status is recommended instead)

DELETE /v2/workflows/closing-reasons/{reasonId}

Parameters

NameInTypeRequiredDescription
reasonIdpathstringYesunique id to identify the closing reason.

Sample Call

epilot workflow-definition deleteClosingReason \
-p reasonId=x739cew

Using positional args for path parameters:

epilot workflow-definition deleteClosingReason x739cew

With JSONata filter:

epilot workflow-definition deleteClosingReason -p reasonId=x739cew --jsonata '$'

changeReasonStatusโ€‹

Change the status of a Closing Reason (eg. ACTIVE to INACTIVE).

PATCH /v1/workflows/closing-reasons/{reasonId}

Parameters

NameInTypeRequiredDescription
reasonIdpathstringYes

Request Body

Sample Call

epilot workflow-definition changeReasonStatus \
-p reasonId=123e4567-e89b-12d3-a456-426614174000 \
-d '{"status":"ACTIVE"}'

Using positional args for path parameters:

epilot workflow-definition changeReasonStatus 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot workflow-definition changeReasonStatus -p reasonId=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot workflow-definition changeReasonStatus -p reasonId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

getWorkflowClosingReasonsโ€‹

Returns all closing reasons defined for the workflow.

GET /v1/workflows/definitions/{definitionId}/closing-reasons

Parameters

NameInTypeRequiredDescription
definitionIdpathstringYesID of a workflow definition

Sample Call

epilot workflow-definition getWorkflowClosingReasons \
-p definitionId=fxcwfw

Using positional args for path parameters:

epilot workflow-definition getWorkflowClosingReasons fxcwfw

With JSONata filter:

epilot workflow-definition getWorkflowClosingReasons -p definitionId=fxcwfw --jsonata 'reasons'
Sample Response
{
"reasons": [
{
"id": "x739cew"
}
]
}

setWorkflowClosingReasonsโ€‹

Sets which closing reasons are defined for this workflow, based on the entire closing reasons catalog.

PATCH /v1/workflows/definitions/{definitionId}/closing-reasons

Parameters

NameInTypeRequiredDescription
definitionIdpathstringYesID of a workflow definition

Request Body (required)

Sample Call

epilot workflow-definition setWorkflowClosingReasons \
-p definitionId=7889 \
-d '{"reasons":[{"id":"x739cew"}]}'

Using positional args for path parameters:

epilot workflow-definition setWorkflowClosingReasons 7889

Using stdin pipe:

cat body.json | epilot workflow-definition setWorkflowClosingReasons -p definitionId=7889

With JSONata filter:

epilot workflow-definition setWorkflowClosingReasons -p definitionId=7889 --jsonata '$'