Skip to main content

Automation API

Usageโ€‹

import { epilot } from '@epilot/sdk'

epilot.authorize(() => '<token>')
const { data } = await epilot.automation.searchFlows(...)

Tree-shakeable importโ€‹

import { getClient, authorize } from '@epilot/sdk/automation'

const automationClient = getClient()
authorize(automationClient, () => '<token>')
const { data } = await automationClient.searchFlows(...)

Operationsโ€‹

flows

executions

bulk

Schemas

searchFlowsโ€‹

Search available automation flows

GET /v1/automation/flows

const { data } = await client.searchFlows({
schema: 'example',
size: 1,
from: 1,
trigger_source_id: 'example',
include_flows: true,
})

createFlowโ€‹

Create new automation flow

POST /v1/automation/flows

const { data } = await client.createFlow()

batchGetFlowsโ€‹

Get multiple automation flows by their IDs

POST /v1/automation/flows:batchGet

const { data } = await client.batchGetFlows(
null,
{
ids: ['7791b04a-16d2-44a2-9af9-2d59c25c512f']
},
)

getFlowโ€‹

List available automation flows

GET /v1/automation/flows/{flow_id}

const { data } = await client.getFlow({
flow_id: 'example',
})

putFlowโ€‹

Update automation flow by id

PUT /v1/automation/flows/{flow_id}

const { data } = await client.putFlow({
flow_id: 'example',
})

deleteFlowโ€‹

Update automation flow by id

DELETE /v1/automation/flows/{flow_id}

const { data } = await client.deleteFlow({
flow_id: 'example',
})

getExecutionsโ€‹

List automation executions

GET /v1/automation/executions

const { data } = await client.getExecutions({
entity_id: 'example',
size: 1,
from: 1,
include_flows: true,
})
Response
{
"total": 0,
"results": [
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [],
"schedules": [],
"actions": [],
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {},
"version": 2,
"trigger_event": {},
"workflow_context": {}
}
]
}

startExecutionโ€‹

Start new automation execution

POST /v1/automation/executions

const { data } = await client.startExecution(
null,
{
entity_id: 'e3d3ebac-baab-4395-abf4-50b5bf1f8b74',
flow_id: '7791b04a-16d2-44a2-9af9-2d59c25c512f',
workflow_context: {
workflow_exec_id: 'string',
workflow_exec_task_id: 'string',
workflow_role: 'trigger_workflow',
_execution_chain: {
parent_execution_id: 'string',
parent_task_id: 'string',
depth: 0
}
},
flow_execution_id: 'string',
flow_automation_task_id: 'string'
},
)
Response
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{
"id": "string",
"schedule_id": "string",
"evaluationResult": true,
"statements": []
}
],
"schedules": [
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {}
}
],
"actions": [
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME"
},
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "trigger-workflow",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME"
}
],
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {
"EpilotAuth": {}
}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
}
}
}

bulkTriggerExecutionsโ€‹

Create a bulk job that triggers multiple automation executions

POST /v1/automation/executions/bulk-jobs

const { data } = await client.bulkTriggerExecutions(
null,
{
flow_id: '7791b04a-16d2-44a2-9af9-2d59c25c512f',
entities_refs: [
{
entity_id: 'e3d3ebac-baab-4395-abf4-50b5bf1f8b74',
entity_schema: 'string'
}
],
trigger_context: {
entity_id: 'a1b2c3d4-e5f6-7890-1234-567890abcdef'
}
},
)

getBulkJobโ€‹

Get the status of a bulk job that triggers multiple automation executions

GET /v1/automation/executions/bulk-jobs/{job_id}

const { data } = await client.getBulkJob({
job_id: 'example',
})
Response
{
"job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"status": "approval",
"created_by": "1234",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"approved_at": "1970-01-01T00:00:00.000Z",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"report_file_entity_id": "string",
"entity_query": {
"type": "refs",
"data": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string"
}
]
},
"pagination_state": {
"page_size": 0,
"pages_processed": 0,
"total_processed": 0,
"stable_query_id": "string",
"search_after": ["string"],
"has_more": true
},
"execution_summary": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string",
"execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"timestamp": "2025-10-30T15:56:47.842Z",
"error": "string"
}
]
}

patchBulkJobโ€‹

Approve / Cancel bulk job that triggers multiple automation executions

PATCH /v1/automation/executions/bulk-jobs/{job_id}

const { data } = await client.patchBulkJob(
{
job_id: 'example',
},
{
action: 'APPROVE',
task_token: 'string'
},
)
Response
{
"job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"status": "approval",
"created_by": "1234",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"approved_at": "1970-01-01T00:00:00.000Z",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
"report_file_entity_id": "string",
"entity_query": {
"type": "refs",
"data": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string"
}
]
},
"pagination_state": {
"page_size": 0,
"pages_processed": 0,
"total_processed": 0,
"stable_query_id": "string",
"search_after": ["string"],
"has_more": true
},
"execution_summary": [
{
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_schema": "string",
"execution_id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"timestamp": "2025-10-30T15:56:47.842Z",
"error": "string"
}
]
}

getExecutionโ€‹

Get automation execution

GET /v1/automation/executions/{execution_id}

const { data } = await client.getExecution({
execution_id: 'example',
})
Response
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{
"id": "string",
"schedule_id": "string",
"evaluationResult": true,
"statements": []
}
],
"schedules": [
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {}
}
],
"actions": [
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME"
},
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "trigger-workflow",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME"
}
],
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {
"EpilotAuth": {}
}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
}
}
}

cancelExecutionโ€‹

Cancel automation execution

DELETE /v1/automation/executions/{execution_id}

const { data } = await client.cancelExecution({
execution_id: 'example',
})
Response
{
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{
"id": "string",
"schedule_id": "string",
"evaluationResult": true,
"statements": []
}
],
"schedules": [
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {}
}
],
"actions": [
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME"
},
{
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "trigger-workflow",
"config": {},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {},
"retry_strategy": "RETRY_AND_RESUME"
}
],
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {
"EpilotAuth": {}
}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {
"parent_execution_id": "string",
"parent_task_id": "string",
"depth": 0
}
}
}

retriggerActionโ€‹

Retry a specific automation execution action which failed / is stuck.

POST /v1/automation/executions/{execution_id}/{action_id}/retrigger

const { data } = await client.retriggerAction(
{
execution_id: 'example',
action_id: 'example',
},
{
condition_id: 'string',
retry_strategy: 'RETRY_AND_RESUME'
},
)

resumeExecutionWithTokenโ€‹

Resume a paused automation execution using a unique resume token.

POST /v1/automation/public/executions:resume

const { data } = await client.resumeExecutionWithToken(
null,
{
resume_token: 'eyJraWQiOiJrZXkifQ=='
},
)
Response
{
"execution": {
"id": "9baf184f-bc81-4128-bca3-d974c90a12c4",
"execution_status": "pending",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"activity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"entity_snapshot": {
"_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"_title": "string",
"_org": "string",
"_schema": "string",
"_tags": ["string"],
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z"
},
"org_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"flow_id": "7791b04a-16d2-44a2-9af9-2d59c25c512f",
"flow_name": "Handle contact form",
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"current_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"conditions": [
{}
],
"schedules": [
{}
],
"actions": [
{},
{}
],
"resume_token": "eyJraWQiOiJrZXkifQ==",
"trigger_context": {
"entity_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef"
},
"version": 2,
"trigger_event": {
"type": "manual",
"org_id": "123",
"entity_id": "e3d3ebac-baab-4395-abf4-50b5bf1f8b74",
"caller": {}
},
"workflow_context": {
"workflow_exec_id": "string",
"workflow_exec_task_id": "string",
"workflow_role": "trigger_workflow",
"_execution_chain": {}
}
},
"resumedAction": {
"id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"flow_action_id": "9ec3711b-db63-449c-b894-54d5bb622a8f",
"name": "string",
"type": "map-entity",
"config": {
"mapping_config": {},
"target_schema": "string",
"target_unique": ["string"],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"]
},
"allow_failure": true,
"created_automatically": true,
"is_bulk_action": true,
"reason": {
"message": "There are no registered portal users for the given emails, hence skipping the action",
"payload": {}
},
"condition_id": "string",
"schedule_id": "string",
"execution_status": "pending",
"started_at": "string",
"updated_at": "string",
"outputs": {},
"error_output": {
"error_code": "MAPPING_ERROR",
"error_reason": "string",
"error_info": {}
},
"retry_strategy": "RETRY_AND_RESUME"
}
}

cancelScheduleโ€‹

Cancel a scheduled automation

DELETE /v1/automation/executions/{execution_id}/schedules/{schedule_id}

const { data } = await client.cancelSchedule({
execution_id: 'example',
schedule_id: 'example',
})
Response
{
"id": "string",
"scheduleApiId": "string",
"numberOfUnits": 0,
"timePeriod": "minutes",
"timeRelation": "after",
"source": {
"id": "string",
"origin": "trigger",
"schema": "string",
"attribute": "string"
}
}

Schemasโ€‹

AutomationFlowIdโ€‹

ID of the Automation Flow

type AutomationFlowId = string

AutomationActionIdโ€‹

type AutomationActionId = string

AutomationFlowโ€‹

type AutomationFlow = {
id?: string
flow_name: string
enabled?: boolean
disable_details?: {
disabled_at: string // date-time
disabled_by: "system" | "user"
blame?: string
}
triggers: Array<{
id?: string // uuid
type: "frontend_submission"
configuration: {
source_id?: { ... }
}
} | {
id?: string // uuid
type: "journey_submission"
configuration: {
source_id: { ... }
}
} | {
id?: string // uuid
type: "api_submission"
configuration: {
source_id?: { ... }
}
} | {
id?: string // uuid
type: "entity_operation"
configuration: {
schema?: { ... }
operations?: { ... }
include_activities?: { ... }
exclude_activities?: { ... }
filter_config?: { ... }
ecp_config?: { ... }
}
} | {
id?: string // uuid
type: "activity"
configuration: {
schema?: { ... }
types?: { ... }
}
} | {
id?: string // uuid
type: "entity_manual"
configuration: {
schema?: { ... }
}
} | {
id?: string // uuid
type: "received_email"
configuration: {
message_type?: { ... }
}
} | {
id?: string // uuid
type: "new_email_thread"
configuration: {
shared_inbox_ids?: { ... }
direction: { ... }
}
} | {
id?: string // uuid
type: "flows_trigger"
configuration: {
source_id: { ... }
journey_id?: { ... }
}
}>
trigger_conditions?: Array<{
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
}>
entity_schema?: string
conditions?: Array<{
id?: string
schedule_id?: string
evaluationResult?: boolean
statements?: Array<{
id?: { ... }
source?: { ... }
operation?: { ... }
values?: { ... }
}>
}>
schedules?: Array<{
id: string
scheduleApiId?: string
numberOfUnits?: number
timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"
timeRelation?: "after" | "before"
source: {
id: { ... }
origin: { ... }
schema?: { ... }
attribute?: { ... }
// ...
}

WorkflowContextโ€‹

For automation that are connected to workflows V2, this field tracks various information about the workflow.

type WorkflowContext = {
workflow_id: string // uuid
task_id?: string // uuid
workflow_role: "trigger_workflow" | "run_task_automation"
}

WorkflowContextRoleโ€‹

The role this automation plays in the workflow.

type WorkflowContextRole = "trigger_workflow" | "run_task_automation"

SearchAutomationsRespโ€‹

type SearchAutomationsResp = {
total: number
results: Array<{
id?: string
flow_name: string
enabled?: boolean
disable_details?: {
disabled_at: { ... }
disabled_by: { ... }
blame?: { ... }
}
triggers: Array<{
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
} | {
id?: { ... }
type: { ... }
configuration: { ... }
}>
trigger_conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
}>
entity_schema?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluationResult?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
id?: { ... }
// ...
}

AnyTriggerโ€‹

type AnyTrigger = {
id?: string // uuid
type: "frontend_submission"
configuration: {
source_id?: string
}
} | {
id?: string // uuid
type: "journey_submission"
configuration: {
source_id: string // uuid
}
} | {
id?: string // uuid
type: "api_submission"
configuration: {
source_id?: string
}
} | {
id?: string // uuid
type: "entity_operation"
configuration: {
schema?: string
operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"[]
include_activities?: string[]
exclude_activities?: string[]
filter_config?: {
operation?: { ... }
activity?: { ... }
}
ecp_config?: {
origin?: { ... }
portal_id?: { ... }
file_config?: { ... }
}
}
} | {
id?: string // uuid
type: "activity"
configuration: {
schema?: string
types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]
}
} | {
id?: string // uuid
type: "entity_manual"
configuration: {
schema?: string
}
} | {
id?: string // uuid
type: "received_email"
configuration: {
message_type?: "RECEIVED"
}
} | {
id?: string // uuid
type: "new_email_thread"
configuration: {
shared_inbox_ids?: string[]
direction: "INBOUND" | "OUTBOUND" | "BOTH"
}
} | {
id?: string // uuid
type: "flows_trigger"
configuration: {
source_id: string // uuid
journey_id?: string // uuid
}
}

AnyActionโ€‹

type AnyAction = {
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
}
} | {
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
} | {
type?: "trigger-share-entity"
config?: {
partner_org_ids?: string[]
}
} | {
type?: "trigger-webhook"
config?: {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
} | {
type?: "inform-erp"
config?: {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
} | {
type?: "trigger-event"
config?: {
event_name: string
event_inputs?: Record<string, unknown>
}
} | {
type?: "create-document"
config?: {
template_id?: string
filename?: string
}
} | {
type?: "send-email"
config?: {
email_template_id?: string
language_code?: "de" | "en"
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
attachments?: Array<{
source_filter?: { ... }
}>
// ...
}

AnyActionConfigโ€‹

type AnyActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
} | {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
} | {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
partner_org_ids?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
} | {
id?: string
// ...
}

AutomationActionConfigโ€‹

type AutomationActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: string
config?: Record<string, unknown>
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

AutomationActionExecutionStateโ€‹

type AutomationActionExecutionState = {
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string
updated_at?: string
outputs?: Record<string, unknown>
error_output?: {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: { ... }
}
}
retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
}

RetryStrategyโ€‹

different behaviors for retrying failed execution actions.

type RetryStrategy = "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"

AutomationActionโ€‹

type AutomationAction = {
id?: string
flow_action_id?: string
name?: string
type?: string
config?: Record<string, unknown>
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
started_at?: string
updated_at?: string
outputs?: Record<string, unknown>
error_output?: {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: { ... }
}
}
retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
}

ErrorOutputโ€‹

type ErrorOutput = {
error_code: "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"
error_reason: string
error_info?: {
details?: Array<{
explanation: { ... }
context?: { ... }
id?: { ... }
}>
}
}

ErrorCodeโ€‹

type ErrorCode = "MAPPING_ERROR" | "REFRESH_RELATIONS_ERROR" | "DUPLICATE_ENTITY_ERROR" | "TRIGGER_WORKFLOW_ERROR" | "TIMEOUT_ERROR" | "BAD_CONFIG" | "INTERNAL_ERROR" | "TRIGGER_WEBHOOK_ERROR" | "TEMPLATE_ERROR" | "INVALID_PAYLOAD" | "INVALID_SCHEDULE_CONFIG" | "CUSTOM_ACTION_ERROR" | "ORDER_CREATION_ERROR" | "DOCUMENT_GENERATION_ERROR" | "BULK_EMAIL_ERROR" | "SHARING_ERROR" | "CANCEL_FLOW_EXECUTION_ERROR" | "METER_READING_NOT_FOUND" | "ENTITY_NOT_FOUND"

ErrorDetailโ€‹

type ErrorDetail = {
explanation: string
context?: string
id?: string
}

CartCheckoutActionConfigโ€‹

type CartCheckoutActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "cart-checkout"
config?: {
version?: string
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
target_unique?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

CartCheckoutActionโ€‹

type CartCheckoutAction = {
type?: "cart-checkout"
config?: {
version?: string
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
target_unique?: string[]
}
}

CartCheckoutConfigโ€‹

type CartCheckoutConfig = {
version?: string
mapping_config?: {
config_id: string
target_id: string
version?: number
}
relation_attributes?: Array<{
target: string
target_tags?: string[]
target_tags_include_source?: boolean
source_filter?: {
limit?: { ... }
schema?: { ... }
attribute?: { ... }
relation_tag?: { ... }
tag?: { ... }
self?: { ... }
}
related_to?: Record<string, unknown>
mode: "append" | "prepend" | "set"
}>
mapping_attributes?: Array<{
target?: string
operation: {
_set?: { ... }
_append?: { ... }
_uniq?: { ... }
_copy?: { ... }
} | unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
target_unique?: string[]
}

MapEntityActionConfigโ€‹

type MapEntityActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

MapEntityActionโ€‹

type MapEntityAction = {
type?: "map-entity"
config?: {
mapping_config?: {
config_id: { ... }
target_id: { ... }
version?: { ... }
}
target_schema: string
target_unique?: string[]
mapping_attributes?: Array<{
target?: { ... }
operation: { ... }
} | {
mode: { ... }
target: { ... }
value: { ... }
} | {
mode: { ... }
target: { ... }
source: { ... }
} | {
mode: { ... }
target: { ... }
source?: { ... }
value_json: { ... }
target_unique?: { ... }
}>
relation_attributes?: Array<{
target: { ... }
target_tags?: { ... }
target_tags_include_source?: { ... }
source_filter?: { ... }
related_to?: { ... }
mode: { ... }
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
}
}

MapEntityConfigโ€‹

type MapEntityConfig = {
mapping_config?: {
config_id: string
target_id: string
version?: number
}
target_schema: string
target_unique?: string[]
mapping_attributes?: Array<{
target?: string
operation: {
_set?: { ... }
_append?: { ... }
_uniq?: { ... }
_copy?: { ... }
} | unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}>
relation_attributes?: Array<{
target: string
target_tags?: string[]
target_tags_include_source?: boolean
source_filter?: {
limit?: { ... }
schema?: { ... }
attribute?: { ... }
relation_tag?: { ... }
tag?: { ... }
self?: { ... }
}
related_to?: Record<string, unknown>
mode: "append" | "prepend" | "set"
}>
linkback_relation_attribute?: string
linkback_relation_tags?: string[]
}

MappingConfigRefโ€‹

type MappingConfigRef = {
config_id: string
target_id: string
version?: number
}

RelationAttributeโ€‹

type RelationAttribute = {
target: string
target_tags?: string[]
target_tags_include_source?: boolean
source_filter?: {
limit?: number
schema?: string
attribute?: string
relation_tag?: string
tag?: string
self?: boolean
}
related_to?: Record<string, unknown>
mode: "append" | "prepend" | "set"
}

MappingAttributeV2โ€‹

type MappingAttributeV2 = {
target?: string
operation: {
_set?: unknown
_append?: unknown
_uniq?: boolean | string[]
_copy?: string
} | unknown
}

OperationNodeโ€‹

Mapping operation nodes are either primitive values or operation node objects

type OperationNode = {
_set?: unknown
_append?: unknown
_uniq?: boolean | string[]
_copy?: string
} | unknown

OperationObjectNodeโ€‹

type OperationObjectNode = {
_set?: unknown
_append?: unknown
_uniq?: boolean | string[]
_copy?: string
}

PrimitiveJSONValueโ€‹

type PrimitiveJSONValue = unknown

MappingAttributeโ€‹

type MappingAttribute = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
} | {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}

MappingAttributeModeโ€‹

  • copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used togethe
type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value"

SetValueMapperโ€‹

type SetValueMapper = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
value: unknown
}

CopyValueMapperโ€‹

type CopyValueMapper = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source: string
}

AppendValueMapperโ€‹

type AppendValueMapper = {
mode: "copy_if_exists" | "append_if_exists" | "set_value"
target: string
source?: string
value_json: string
target_unique?: string[]
}

MoveThreadActionโ€‹

type MoveThreadAction = {
type?: "move-thread"
config?: {
target_inbox_id?: string
}
}

AssignThreadActionโ€‹

type AssignThreadAction = {
type?: "assign-thread"
config?: {
remove?: string[]
add?: string[]
}
}

MoveThreadConfigโ€‹

type MoveThreadConfig = {
target_inbox_id?: string
}

AssignThreadConfigโ€‹

type AssignThreadConfig = {
remove?: string[]
add?: string[]
}

SendEmailActionConfigโ€‹

type SendEmailActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "send-email"
config?: {
email_template_id?: string
language_code?: "de" | "en"
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
attachments?: Array<{
source_filter?: { ... }
}>
conditions?: Array<{
_equals?: { ... }
}>
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

SendEmailActionโ€‹

type SendEmailAction = {
type?: "send-email"
config?: {
email_template_id?: string
language_code?: "de" | "en"
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
attachments?: Array<{
source_filter?: { ... }
}>
conditions?: Array<{
_equals?: { ... }
}>
}
}

SendEmailConfigโ€‹

type SendEmailConfig = {
email_template_id?: string
language_code?: "de" | "en"
notify_portal_user_only?: boolean
skip_creating_entities?: boolean
wait_for_confirmation?: boolean
attachments?: Array<{
source_filter?: {
limit?: { ... }
filename_regex?: { ... }
attribute?: { ... }
relation_tag?: { ... }
tag?: { ... }
document_type?: { ... }
self?: { ... }
}
}>
conditions?: Array<{
_equals?: {
source?: { ... }
value?: { ... }
}
}>
}

SendEmailConditionโ€‹

type SendEmailCondition = {
_equals?: {
source?: string
value?: string
}
}

CreateDocumentActionConfigโ€‹

type CreateDocumentActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "create-document"
config?: {
template_id?: string
filename?: string
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

CreateDocumentActionโ€‹

type CreateDocumentAction = {
type?: "create-document"
config?: {
template_id?: string
filename?: string
}
}

CreateDocumentConfigโ€‹

type CreateDocumentConfig = {
template_id?: string
filename?: string
}

TriggerWorkflowActionConfigโ€‹

type TriggerWorkflowActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

TriggerWorkflowActionโ€‹

type TriggerWorkflowAction = {
type?: "trigger-workflow"
config?: {
target_workflow?: string
conditions?: Array<{
source: { ... }
comparison: { ... }
value?: { ... }
schema?: { ... }
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: { ... }
step_name?: { ... }
user_ids?: { ... }
}>
filter_with_purposes?: boolean
}
}

TriggerWorkflowConfigโ€‹

type TriggerWorkflowConfig = {
target_workflow?: string
conditions?: Array<{
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
schema?: string
}>
assignees?: string[]
assign_steps?: Array<{
step_id?: string
step_name?: string
user_ids?: number[]
}>
filter_with_purposes?: boolean
}

TriggerWorkflowConditionโ€‹

type TriggerWorkflowCondition = {
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
schema?: string
}

TriggerShareEntityActionConfigโ€‹

type TriggerShareEntityActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-workflow"
config?: {
partner_org_ids?: string[]
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

TriggerShareEntityActionโ€‹

type TriggerShareEntityAction = {
type?: "trigger-share-entity"
config?: {
partner_org_ids?: string[]
}
}

TriggerShareEntityConfigโ€‹

type TriggerShareEntityConfig = {
partner_org_ids?: string[]
}

AssignUsersToStepโ€‹

type AssignUsersToStep = {
step_id?: string
step_name?: string
user_ids?: number[]
}

CustomActionโ€‹

type CustomAction = {
type?: "custom-action"
config?: {
name?: string
description?: string
app_id?: string
component_id?: string
wait_for_callback?: boolean
}
}

TriggerWebhookActionConfigโ€‹

type TriggerWebhookActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-webhook"
config?: {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

TriggerWebhookActionโ€‹

type TriggerWebhookAction = {
type?: "trigger-webhook"
config?: {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
}

TriggerWebhookConfigโ€‹

type TriggerWebhookConfig = {
event_id?: string
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}

InformERPActionConfigโ€‹

type InformERPActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "inform-erp"
config?: {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

InformERPActionโ€‹

type InformERPAction = {
type?: "inform-erp"
config?: {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}
}

InformERPConfigโ€‹

type InformERPConfig = {
entity_sources?: string[]
target_webhook_id?: string
sync?: boolean
}

TriggerEventActionConfigโ€‹

type TriggerEventActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "trigger-event"
config?: {
event_name: string
event_inputs?: Record<string, unknown>
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

TriggerEventActionโ€‹

type TriggerEventAction = {
type?: "trigger-event"
config?: {
event_name: string
event_inputs?: Record<string, unknown>
}
}

TriggerEventConfigโ€‹

Configuration for triggering an event catalog event

type TriggerEventConfig = {
event_name: string
event_inputs?: Record<string, unknown>
}

FlowExecutionCancelActionConfigโ€‹

type FlowExecutionCancelActionConfig = {
id?: string
flow_action_id?: string
name?: string
type?: "cancel-flow-execution"
config?: {
selected_reasons?: Array<{
id: { ... }
title: { ... }
}>
extra_description?: string
}
allow_failure?: boolean
created_automatically?: boolean
is_bulk_action?: boolean
reason?: {
message?: string
payload?: Record<string, unknown>
}
condition_id?: string
schedule_id?: string
}

FlowExecutionCancelActionโ€‹

type FlowExecutionCancelAction = {
type?: "cancel-flow-execution"
config?: {
selected_reasons?: Array<{
id: { ... }
title: { ... }
}>
extra_description?: string
}
}

FlowExecutionCancelConfigโ€‹

Configuration for cancelling a flow execution with selected reasons

type FlowExecutionCancelConfig = {
selected_reasons?: Array<{
id: string
title: string
}>
extra_description?: string
}

CancellationReasonโ€‹

A reason for cancelling a flow execution

type CancellationReason = {
id: string
title: string
}

ConditionStatementโ€‹

type ConditionStatement = {
id?: string // uuid
source?: {
id?: string
origin?: "trigger" | "action"
originType?: "entity" | "workflow" | "journey_block"
schema?: string
attribute?: string
attributeType?: "string" | "text" | "number" | "boolean" | "date" | "datetime" | "tags" | "country" | "email" | "phone" | "product" | "price" | "status" | "relation" | "multiselect" | "select" | "radio" | "relation_user" | "purpose" | "label" | "payment" | "relation_payment_method"
attributeRepeatable?: boolean
repeatableItemOp?: boolean
attributeOperation?: "all" | "updated" | "added" | "deleted"
}
operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "entity_exists" | "entity_does_not_exist"
values?: string[]
}

ActionConditionโ€‹

type ActionCondition = {
id?: string
schedule_id?: string
evaluationResult?: boolean
statements?: Array<{
id?: string // uuid
source?: {
id?: { ... }
origin?: { ... }
originType?: { ... }
schema?: { ... }
attribute?: { ... }
attributeType?: { ... }
attributeRepeatable?: { ... }
repeatableItemOp?: { ... }
attributeOperation?: { ... }
}
operation?: "equals" | "not_equals" | "any_of" | "none_of" | "contains" | "not_contains" | "starts_with" | "ends_with" | "greater_than" | "less_than" | "greater_than_or_equals" | "less_than_or_equals" | "is_empty" | "is_not_empty" | "entity_exists" | "entity_does_not_exist"
values?: string[]
}>
}

ActionScheduleSourceโ€‹

The source of the schedule_at timestamp that will be used to schedule the action

type ActionScheduleSource = {
id: string
origin: "trigger" | "action" | "action_task" | "automation"
schema?: string
attribute?: string
}

ActionScheduleโ€‹

type ActionSchedule = {
id: string
scheduleApiId?: string
numberOfUnits?: number
timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"
timeRelation?: "after" | "before"
source: {
id: string
origin: "trigger" | "action" | "action_task" | "automation"
schema?: string
attribute?: string
}
}

AutomationExecutionIdโ€‹

type AutomationExecutionId = string

AutomationExecutionโ€‹

type AutomationExecution = {
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: string
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: string
schedule_id?: string
evaluationResult?: boolean
statements?: Array<{
id?: { ... }
source?: { ... }
operation?: { ... }
values?: { ... }
}>
}>
schedules?: Array<{
id: string
scheduleApiId?: string
numberOfUnits?: number
timePeriod?: "minutes" | "hours" | "days" | "weeks" | "months"
timeRelation?: "after" | "before"
source: {
id: { ... }
origin: { ... }
schema?: { ... }
attribute?: { ... }
}
}>
actions: Array<{
type?: "map-entity"
config?: {
mapping_config?: { ... }
target_schema: { ... }
target_unique?: { ... }
mapping_attributes?: { ... }
relation_attributes?: { ... }
linkback_relation_attribute?: { ... }
linkback_relation_tags?: { ... }
}
} | {
type?: "trigger-workflow"
config?: {
target_workflow?: { ... }
conditions?: { ... }
assignees?: { ... }
assign_steps?: { ... }
filter_with_purposes?: { ... }
}
} | {
type?: "trigger-share-entity"
config?: {
partner_org_ids?: { ... }
}
} | {
type?: "trigger-webhook"
config?: {
event_id?: { ... }
entity_sources?: { ... }
target_webhook_id?: { ... }
sync?: { ... }
}
} | {
type?: "inform-erp"
config?: {
entity_sources?: { ... }
target_webhook_id?: { ... }
sync?: { ... }
}
} | {
type?: "trigger-event"
config?: {
event_name: { ... }
event_inputs?: { ... }
}
} | {
type?: "create-document"
config?: {
template_id?: { ... }
filename?: { ... }
}
} | {
type?: "send-email"
config?: {
email_template_id?: { ... }
// ...
}

WorkflowExecutionContextโ€‹

type WorkflowExecutionContext = {
workflow_exec_id: string
workflow_exec_task_id?: string
workflow_role: "trigger_workflow" | "run_task_automation"
_execution_chain?: {
parent_execution_id?: string
parent_task_id?: string
depth?: number
}
}

ExecutionChainโ€‹

[Internal] Tracks execution chain for infinite loop prevention. This is an internal property and should not be used by external consumers.

type ExecutionChain = {
parent_execution_id?: string
parent_task_id?: string
depth?: number
}

TriggerEventManualโ€‹

type TriggerEventManual = {
type?: "manual"
org_id: string
entity_id: string
caller?: {
EpilotAuth?: {
claims?: { ... }
userId?: { ... }
organizationId?: { ... }
token?: { ... }
}
}
}

TriggerEventFlowAutomationTaskโ€‹

type TriggerEventFlowAutomationTask = {
type?: "flow_automation_task"
org_id: string
entity_id: string
flow_execution_id: string
flow_automation_task_id: string // UUID
caller?: {
EpilotAuth?: {
claims?: { ... }
userId?: { ... }
organizationId?: { ... }
token?: { ... }
}
}
}

TriggerEventEntityActivityโ€‹

type TriggerEventEntityActivity = {
type?: "entity_activity"
org_id: string
activity_id: string
activity_type: string
entity_id?: string
}

TriggerEventMessagingโ€‹

type TriggerEventMessaging = {
type?: "new_email_thread"
org_id: string
thread_id: string
message_id: string
entity_id: string
}

TriggerEventEntityOperationโ€‹

type TriggerEventEntityOperation = {
type?: "entity_operation"
entity_id: string
org_id: string
activity_id: string
operation_type: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"
}

ApiCallerContextโ€‹

type ApiCallerContext = {
EpilotAuth?: {
claims?: {
userId?: { ... }
sub?: { ... }
email?: { ... }
cognito:username?: { ... }
custom:ivy_user_id?: { ... }
}
userId?: string
organizationId?: string
token?: string
}
}

ExecutionStatusโ€‹

type ExecutionStatus = "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"

GetExecutionsRespโ€‹

type GetExecutionsResp = {
total: number
results: Array<{
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluationResult?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
id?: { ... }
flow_action_id?: { ... }
name?: { ... }
type?: { ... }
config?: { ... }
allow_failure?: { ... }
created_automatically?: { ... }
is_bulk_action?: { ... }
reason?: { ... }
condition_id?: { ... }
schedule_id?: { ... }
execution_status?: { ... }
started_at?: { ... }
updated_at?: { ... }
outputs?: { ... }
error_output?: { ... }
retry_strategy?: { ... }
} | {
type?: { ... }
config?: { ... }
}>
resume_token?: string
trigger_context?: Record<string, string>
version?: number
trigger_event?: {
type?: { ... }
org_id: { ... }
entity_id: { ... }
caller?: { ... }
} | {
type?: { ... }
org_id: { ... }
activity_id: { ... }
// ...
}

StartExecutionRequestโ€‹

type StartExecutionRequest = {
entity_id: string
flow_id: string
workflow_context?: {
workflow_exec_id: string
workflow_exec_task_id?: string
workflow_role: "trigger_workflow" | "run_task_automation"
_execution_chain?: {
parent_execution_id?: { ... }
parent_task_id?: { ... }
depth?: { ... }
}
}
flow_execution_id?: string
flow_automation_task_id?: string
}

PatchBulkJobRequestโ€‹

type PatchBulkJobRequest = {
action: "APPROVE" | "CANCEL"
task_token: string
}

BulkTriggerRequestโ€‹

type BulkTriggerRequest = {
flow_id: string
entities_refs: Array<{
entity_id: string
entity_schema: string
}>
trigger_context?: Record<string, string>
} | {
flow_id: string
entities_query: string
trigger_context?: Record<string, string>
} | {
flow_id: string
entities_filter: Array<{
term?: Record<string, string | number | boolean>
terms?: Record<string, string | number | boolean[]>
ids?: {
values?: { ... }
}
range?: Record<string, {
gt?: { ... }
gte?: { ... }
lt?: { ... }
lte?: { ... }
format?: { ... }
relation?: { ... }
time_zone?: { ... }
}>
exists?: {
field: { ... }
}
$and?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
$or?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
$not?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
}>
trigger_context?: Record<string, string>
}

EntityRefโ€‹

type EntityRef = {
entity_id: string
entity_schema: string
}

BulkTriggerJobโ€‹

type BulkTriggerJob = {
job_id: string
org_id: string
flow_id: string
status: "approval" | "querying_entities" | "entities_loaded" | "executing" | "monitoring" | "send_report" | "finished" | "failed" | "cancelled"
created_by: string
created_at: string // date-time
updated_at: string // date-time
approved_at?: string // date-time
trigger_context?: Record<string, string>
task_token?: string
report_file_entity_id?: string
entity_query?: {
type: "refs" | "query" | "filter"
data: Array<{
entity_id: { ... }
entity_schema: { ... }
}> | string | Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
}
pagination_state?: {
page_size?: number
pages_processed?: number
total_processed?: number
stable_query_id?: string
search_after?: string | number[]
has_more?: boolean
}
execution_summary?: Array<{
entity_id: string
entity_schema?: string
execution_id?: string
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
timestamp?: string // date-time
error?: string
}>
}

ExecItemโ€‹

Execution item for bulk trigger automation. It maps each entity to its automation execution id & status

type ExecItem = {
entity_id: string
entity_schema?: string
execution_id?: string
execution_status: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
timestamp?: string // date-time
error?: string
}

JobIdโ€‹

Job ID for tracking the status of bulk trigger automation executions

type JobId = string

EntityIdโ€‹

type EntityId = string

ActivityIdโ€‹

type ActivityId = string

OrganizationIdโ€‹

type OrganizationId = string

TriggerContextโ€‹

Additional contextual data for a bulk trigger automation. This would normally include additional entity IDs you'd need after a listener picks up an event.

type TriggerContext = Record<string, string>

AutomationTriggerโ€‹

type AutomationTrigger = {
id?: string // uuid
}

FlowsTriggerโ€‹

type FlowsTrigger = {
id?: string // uuid
type: "flows_trigger"
configuration: {
source_id: string // uuid
journey_id?: string // uuid
}
}

JourneySubmitTriggerโ€‹

type JourneySubmitTrigger = {
id?: string // uuid
type: "journey_submission"
configuration: {
source_id: string // uuid
}
}

FrontendSubmitTriggerโ€‹

type FrontendSubmitTrigger = {
id?: string // uuid
type: "frontend_submission"
configuration: {
source_id?: string
}
}

ApiSubmissionTriggerโ€‹

type ApiSubmissionTrigger = {
id?: string // uuid
type: "api_submission"
configuration: {
source_id?: string
}
}

NewEmailThreadTriggerโ€‹

type NewEmailThreadTrigger = {
id?: string // uuid
type: "new_email_thread"
configuration: {
shared_inbox_ids?: string[]
direction: "INBOUND" | "OUTBOUND" | "BOTH"
}
}

ReceivedEmailTriggerโ€‹

type ReceivedEmailTrigger = {
id?: string // uuid
type: "received_email"
configuration: {
message_type?: "RECEIVED"
}
}

EntityOperationTriggerโ€‹

  • If provides filter_config, executes an automation based on the filtered configuration when an entity event occurs.
  • The conditions on a filter follows the event bridge patterns - https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-patterns.html | Comparison | Example
type EntityOperationTrigger = {
id?: string // uuid
type: "entity_operation"
configuration: {
schema?: string
operations?: "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"[]
include_activities?: string[]
exclude_activities?: string[]
filter_config?: {
operation?: { ... }
activity?: { ... }
}
ecp_config?: {
origin?: { ... }
portal_id?: { ... }
file_config?: { ... }
}
}
}

ActivityTriggerโ€‹

type ActivityTrigger = {
id?: string // uuid
type: "activity"
configuration: {
schema?: string
types?: "CreateMeterReading" | "UpdateMeterReading" | "DocDownloadedFromPortal" | "PortalUserResetPassword" | "PortalUserResetForgotPassword" | "SelfAssignmentFromPortal" | string[]
}
}

EntityOperationโ€‹

type EntityOperation = "createEntity" | "updateEntity" | "deleteEntity" | "softDeleteEntity" | "restoreEntity"

EntitySearchFilterโ€‹

A subset of simplified Elasticsearch query clauses. The default operator is a logical AND. Use nested $and, $or, $not to combine filters using different logical operators.

type EntitySearchFilter = Array<{
term?: Record<string, string | number | boolean>
terms?: Record<string, string | number | boolean[]>
ids?: {
values?: string[]
}
range?: Record<string, {
gt?: string | number | boolean
gte?: string | number | boolean
lt?: string | number | boolean
lte?: string | number | boolean
format?: string
relation?: "INTERSECTS" | "CONTAINS" | "WITHIN"
time_zone?: string
}>
exists?: {
field: string
}
$and?: Array<{
term?: Record<string, string | number | boolean>
terms?: Record<string, string | number | boolean[]>
ids?: {
values?: { ... }
}
range?: Record<string, {
gt?: { ... }
gte?: { ... }
lt?: { ... }
lte?: { ... }
format?: { ... }
relation?: { ... }
time_zone?: { ... }
}>
exists?: {
field: { ... }
}
$and?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
$or?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
$not?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
}>
$or?: Array<{
term?: Record<string, string | number | boolean>
terms?: Record<string, string | number | boolean[]>
ids?: {
values?: { ... }
}
range?: Record<string, {
gt?: { ... }
gte?: { ... }
lt?: { ... }
lte?: { ... }
format?: { ... }
relation?: { ... }
time_zone?: { ... }
}>
exists?: {
field: { ... }
}
$and?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
exists?: { ... }
$and?: { ... }
$or?: { ... }
$not?: { ... }
}>
$or?: Array<{
term?: { ... }
terms?: { ... }
ids?: { ... }
range?: { ... }
// ...
}

EntitySearchFilterValueโ€‹

A filter field value.

type EntitySearchFilterValue = string | number | boolean

EntityManualTriggerโ€‹

type EntityManualTrigger = {
id?: string // uuid
type: "entity_manual"
configuration: {
schema?: string
}
}

TriggerConditionโ€‹

type TriggerCondition = {
source: string
comparison: "equals" | "any_of" | "not_empty" | "is_empty"
value?: string | number | string[] | number[]
}

Comparisonโ€‹

type Comparison = "equals" | "any_of" | "not_empty" | "is_empty"

FilterConditionOnEventโ€‹

type FilterConditionOnEvent = {
$or?: Array<{
$or?: Array<{
$or?: { ... }
} | Record<string, Array<string | {
equals-ignore-case?: { ... }
} | {
anything-but?: { ... }
} | {
numeric?: { ... }
} | {
exists?: { ... }
} | {
prefix?: { ... }
} | {
suffix?: { ... }
} | {
wildcard?: { ... }
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>

EqualsIgnoreCaseConditionโ€‹

type EqualsIgnoreCaseCondition = {
equals-ignore-case?: string
}

AnythingButConditionโ€‹

type AnythingButCondition = {
anything-but?: string[]
}

NumericConditionโ€‹

type NumericCondition = {
numeric?: string | number[]
}

ExistsConditionโ€‹

type ExistsCondition = {
exists?: boolean
}

PrefixConditionโ€‹

type PrefixCondition = {
prefix?: string
}

SuffixConditionโ€‹

type SuffixCondition = {
suffix?: string
}

WildcardConditionโ€‹

type WildcardCondition = {
wildcard?: string
}

OrConditionโ€‹

type OrCondition = {
$or?: Array<{
$or?: Array<{
$or?: { ... }
} | Record<string, Array<string | {
equals-ignore-case?: { ... }
} | {
anything-but?: { ... }
} | {
numeric?: { ... }
} | {
exists?: { ... }
} | {
prefix?: { ... }
} | {
suffix?: { ... }
} | {
wildcard?: { ... }
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>>
}

DiffAddedโ€‹

type DiffAdded = {
$or?: Array<{
$or?: Array<{
$or?: { ... }
} | Record<string, Array<string | {
equals-ignore-case?: { ... }
} | {
anything-but?: { ... }
} | {
numeric?: { ... }
} | {
exists?: { ... }
} | {
prefix?: { ... }
} | {
suffix?: { ... }
} | {
wildcard?: { ... }
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>

DiffUpdatedโ€‹

type DiffUpdated = {
$or?: Array<{
$or?: Array<{
$or?: { ... }
} | Record<string, Array<string | {
equals-ignore-case?: { ... }
} | {
anything-but?: { ... }
} | {
numeric?: { ... }
} | {
exists?: { ... }
} | {
prefix?: { ... }
} | {
suffix?: { ... }
} | {
wildcard?: { ... }
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>

DiffDeletedโ€‹

type DiffDeleted = {
$or?: Array<{
$or?: Array<{
$or?: { ... }
} | Record<string, Array<string | {
equals-ignore-case?: { ... }
} | {
anything-but?: { ... }
} | {
numeric?: { ... }
} | {
exists?: { ... }
} | {
prefix?: { ... }
} | {
suffix?: { ... }
} | {
wildcard?: { ... }
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>>
} | Record<string, Array<string | {
equals-ignore-case?: string
} | {
anything-but?: string[]
} | {
numeric?: string | number[]
} | {
exists?: boolean
} | {
prefix?: string
} | {
suffix?: string
} | {
wildcard?: string
}>>

OrConditionForDiffโ€‹

type OrConditionForDiff = {
$or?: unknown | unknown | unknown[]
}

EntityItemSnapshotโ€‹

type EntityItemSnapshot = {
_id: string
_title: string
_org: string
_schema: string
_tags?: string[]
_created_at: string // date-time
_updated_at: string // date-time
}

RetryReqโ€‹

type RetryReq = {
condition_id?: string
retry_strategy?: "RETRY_AND_RESUME" | "RETRY_AND_STOP" | "RETRY_ALL_PARENT_CONDITION_ACTIONS"
}

ResumeTokenโ€‹

A unique token to resume a paused automation execution

type ResumeToken = string

ResumeReqโ€‹

type ResumeReq = {
resume_token: string
}

ResumeRespโ€‹

type ResumeResp = {
execution: {
id: string
execution_status?: "pending" | "starting" | "in_progress" | "paused" | "success" | "failed" | "cancelled" | "skipped" | "scheduled" | "hot"
entity_id: string
activity_id?: string
entity_snapshot?: {
_id: { ... }
_title: { ... }
_org: { ... }
_schema: { ... }
_tags?: { ... }
_created_at: { ... }
_updated_at: { ... }
}
org_id: string
flow_id: string
flow_name?: string
created_at?: string // date-time
updated_at?: string // date-time
current_action_id?: string
conditions?: Array<{
id?: { ... }
schedule_id?: { ... }
evaluationResult?: { ... }
statements?: { ... }
}>
schedules?: Array<{
id: { ... }
scheduleApiId?: { ... }
numberOfUnits?: { ... }
timePeriod?: { ... }
timeRelation?: { ... }
source: { ... }
}>
actions: Array<{
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
type?: { ... }
config?: { ... }
} | {
id?: { ... }
flow_action_id?: { ... }
name?: { ... }
type?: { ... }
config?: { ... }
allow_failure?: { ... }
created_automatically?: { ... }
is_bulk_action?: { ... }
reason?: { ... }
condition_id?: { ... }
schedule_id?: { ... }
execution_status?: { ... }
started_at?: { ... }
updated_at?: { ... }
outputs?: { ... }
error_output?: { ... }
retry_strategy?: { ... }
} | {
type?: { ... }
config?: { ... }
}>
resume_token?: string
trigger_context?: Record<string, string>
version?: number
trigger_event?: {
type?: { ... }
org_id: { ... }
entity_id: { ... }
caller?: { ... }
} | {
type?: { ... }
org_id: { ... }
activity_id: { ... }
activity_type: { ... }
// ...
}

ErrorObjectโ€‹

type ErrorObject = {
status?: number
error?: string
}