@epilot/automation-client 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/definition.js +1 -1
- package/dist/openapi.d.ts +37 -32
- package/package.json +1 -1
- package/src/openapi.d.ts +37 -32
package/dist/definition.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(279));t.default=a.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Automation API","description":"API Backend for epilot Automation Workflows feature","version":"1.0.0"},"tags":[{"name":"flows","description":"Automation flows"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","summary":"searchFlows","description":"Search available automation flows","tags":["flows"],"parameters":[{"name":"schema","in":"query","description":"Entity Schema","schema":{"type":"string","example":"submission"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}},{"name":"trigger_source_id","in":"query","description":"Trigger source identifier","schema":{"type":"string","example":"600945fe-212e-4b97-acf7-391d64648384"}}],"responses":{"200":{"description":"List of automation flows, including total count","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}},"required":["total","results"]}}}}}},"post":{"operationId":"createFlow","summary":"createFlow","description":"Create new automation flow","tags":["flows"],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The created automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","summary":"getFlow","description":"List available automation flows","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"put":{"operationId":"putFlow","summary":"putFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"The updated automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"delete":{"operationId":"deleteFlow","summary":"deleteFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","summary":"getExecutions","description":"List automation executions","parameters":[{"name":"entity_id","in":"query","schema":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"tags":["executions"],"responses":{"200":{"description":"List of automation executions","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}},"required":["total","results"]}}}}}},"post":{"operationId":"startExecution","summary":"startExecution","description":"Start new automation execution","requestBody":{"description":"Execution parameters","content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}}}}},"tags":["executions"],"responses":{"201":{"description":"The created execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","summary":"getExecution","description":"Get automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The returned execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}},"delete":{"operationId":"cancelExecution","summary":"cancelExecution","description":"Cancel automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The cancelled execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"/v1/automation/executions/{execution_id}/{action_id}/retrigger":{"post":{"operationId":"retriggerAction","summary":"retriggerAction","description":"Retrigger a specific automation execution action","tags":["executions"],"parameters":[{"name":"execution_id","in":"path","description":"Execution Id","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true},{"name":"action_id","in":"path","description":"Id of Action to retrigger","schema":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"required":true}],"responses":{"200":{"description":"action re-triggered with success"}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"}},"schemas":{"AutomationFlowId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationFlow":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"SearchAutomationsResp":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}},"required":["total","results"]},"AnyAction":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},"ErrorOutput":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]},"ErrorCode":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"CartCheckoutAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},"CartCheckoutConfig":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}},"MapEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},"MapEntityActionConfig":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}},"FillEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},"FillEntityConfig":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]},"AddressMapper":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}},"RelationAttribute":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]},"MappingAttribute":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]},"MappingAttributeMode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"SetValueMapper":{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},"CopyValueMapper":{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},"AppendValueMapper":{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]},"SendEmailAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},"SendEmailActionConfig":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}},"CreateDocumentAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},"CreateDocumentConfig":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}},"TriggerWorkflowAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"TriggerWorkflowConfig":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}},"TriggerWorkflowCondition":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}},"AssignUsersToStep":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]},"TriggerWebhookAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},"TriggerWebhookActionConfig":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"AutomationExecutionId":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"AutomationExecution":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]},"ExecutionStatus":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"GetExecutionsResp":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}}}}}}]},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}},"required":["total","results"]},"StartExecutionRequest":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}},"EntityId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"OrganizationId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"JourneySubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},"FrontendSubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},"EntityOperationTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},"EntityManualTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]},"TriggerCondition":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},"Comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]}}}}')}},t={};return function r(i){if(t[i])return t[i].exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}(914)})());
|
|
1
|
+
!function(e,t){for(var r in t)e[r]=t[r];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(r(279));t.default=a.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.3","info":{"title":"Automation API","description":"API Backend for epilot Automation Workflows feature","version":"1.0.0"},"tags":[{"name":"flows","description":"Automation flows"},{"name":"executions","description":"Automation executions"}],"security":[{"EpilotAuth":[]}],"paths":{"/v1/automation/flows":{"get":{"operationId":"searchFlows","summary":"searchFlows","description":"Search available automation flows","tags":["flows"],"parameters":[{"name":"schema","in":"query","description":"Entity Schema","schema":{"type":"string","example":"submission"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}},{"name":"trigger_source_id","in":"query","description":"Trigger source identifier","schema":{"type":"string","example":"600945fe-212e-4b97-acf7-391d64648384"}}],"responses":{"200":{"description":"List of automation flows, including total count","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}},"required":["total","results"]}}}}}},"post":{"operationId":"createFlow","summary":"createFlow","description":"Create new automation flow","tags":["flows"],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"201":{"description":"The created automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/flows/{flow_id}":{"get":{"operationId":"getFlow","summary":"getFlow","description":"List available automation flows","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The returned automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"put":{"operationId":"putFlow","summary":"putFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"requestBody":{"description":"Automation flow to create","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"The updated automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}},"delete":{"operationId":"deleteFlow","summary":"deleteFlow","description":"Update automation flow by id","tags":["flows"],"parameters":[{"name":"flow_id","in":"path","required":true,"description":"Automation Workflow ID","schema":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}],"responses":{"200":{"description":"The deleted automation flow","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"/v1/automation/executions":{"get":{"operationId":"getExecutions","summary":"getExecutions","description":"List automation executions","parameters":[{"name":"entity_id","in":"query","schema":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"}},{"name":"size","in":"query","description":"Pagination: max number of results to return","schema":{"type":"integer","default":25}},{"name":"from","in":"query","description":"Pagination: starting for results","schema":{"type":"integer","default":0}}],"tags":["executions"],"responses":{"200":{"description":"List of automation executions","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}},"required":["total","results"]}}}}}},"post":{"operationId":"startExecution","summary":"startExecution","description":"Start new automation execution","requestBody":{"description":"Execution parameters","content":{"application/json":{"schema":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}}}}},"tags":["executions"],"responses":{"201":{"description":"The created execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"/v1/automation/executions/{execution_id}":{"get":{"operationId":"getExecution","summary":"getExecution","description":"Get automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The returned execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}},"delete":{"operationId":"cancelExecution","summary":"cancelExecution","description":"Cancel automation execution","parameters":[{"name":"execution_id","in":"path","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true}],"tags":["executions"],"responses":{"200":{"description":"The cancelled execution","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}}}}}},"/v1/automation/executions/{execution_id}/{action_id}/retrigger":{"post":{"operationId":"retriggerAction","summary":"retriggerAction","description":"Retrigger a specific automation execution action","tags":["executions"],"parameters":[{"name":"execution_id","in":"path","description":"Execution Id","schema":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"required":true},{"name":"action_id","in":"path","description":"Id of Action to retrigger","schema":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"required":true}],"responses":{"200":{"description":"action re-triggered with success"}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Token"}},"schemas":{"AutomationFlowId":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"AutomationActionId":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"AutomationFlow":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"SearchAutomationsResp":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"runs":{"type":"number","example":7,"description":"Number of automation executions that ran"},"triggers":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]}]}},"trigger_conditions":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}}},"entity_schema":{"description":"The entity schema","type":"string","example":"submission"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}},"required":["total","results"]},"AnyAction":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]},"AutomationAction":{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},"ErrorOutput":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]},"ErrorCode":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"OrderCheckoutAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}]},"OrderCheckoutConfig":{"type":"object","properties":{"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}},"MapEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},"MapEntityActionConfig":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}},"FillEntityAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},"FillEntityConfig":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]},"AddressMapper":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}},"RelationAttribute":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]},"MappingAttribute":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]},"MappingAttributeMode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"SetValueMapper":{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},"CopyValueMapper":{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},"AppendValueMapper":{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]},"SendEmailAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},"SendEmailActionConfig":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}},"CreateDocumentAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},"CreateDocumentConfig":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}},"TriggerWorkflowAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},"TriggerWorkflowConfig":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}},"TriggerWorkflowCondition":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}},"AssignUsersToStep":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]},"TriggerWebhookAction":{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},"TriggerWebhookActionConfig":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}},"AutomationExecutionId":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"AutomationExecution":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]},"ExecutionStatus":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"GetExecutionsResp":{"type":"object","properties":{"total":{"type":"number"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"9baf184f-bc81-4128-bca3-d974c90a12c4"},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"],"example":"success"},"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"org_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"},"flow_name":{"type":"string","example":"Handle contact form"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"current_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"actions":{"type":"array","items":{"anyOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_schema":{"type":"string"},"target_unique":{"type":"array","items":{"type":"string"}},"mapping_attributes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"value":{"description":"Any value to be set: string, number, string[], number[], JSON object, etc. It will override existing values, if any.\\n"}},"required":["mode","target","value"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"}},"required":["mode","target","source"]},{"type":"object","properties":{"mode":{"type":"string","enum":["copy_if_exists","append_if_exists","set_value"],"description":"- copy_if_exists - it replaces the target attribute with the source value\\n- append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute.\\n- set_value - it sets a value to a predefined value. Must be used together with value property.\\n"},"target":{"type":"string","description":"JSON like target path for the attribute. Eg. last_name"},"source":{"type":"string","description":"JSON source path for the value to be extracted from. Eg: steps[1].[\'Product Info\'].price\\n"},"value_json":{"type":"string","description":"To be provided only when mapping json objects into a target attribute. Eg array of addresses.\\n"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["mode","target","value_json"]}]}},"relation_attributes":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"target_tags":{"type":"array","items":{"type":"string"}},"related_to":{"type":"object","properties":{"schema":{"type":"string"},"tag":{"type":"string"}},"required":["schema","tag"]},"mode":{"type":"string","enum":["append","set"]}},"required":["target","target_tags","related_to","mode"]}}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Map Entity","type":"map-entity","config":{"target_schema":"contact","target_unique":["email.email"],"mapping_attributes":[{"target":"email","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"email\\": \\"billing_contact.email\\"\\n}"},{"target":"_tags","mode":"set_value","value":["primary","payer"]},{"target":"first_name","mode":"copy_if_exists","source":"billing_contact.first_name"},{"target":"last_name","mode":"copy_if_exists","source":"billing_contact.last_name"},{"target":"contact_type","mode":"set_value","value":"customer"},{"target":"addresses","mode":"append_if_exists","source":"billing_contact","value_json":"{\\n \\"street_name\\": \\"billing_contact.street_name\\",\\n \\"street_number\\": \\"billing_contact.street_number\\",\\n \\"city\\": \\"billing_contact.city\\",\\n \\"postal_code\\": \\"billing_contact.postal_code\\",\\n \\"country\\": \\"billing_contact.country\\",\\n \\"_tags\\": [\\"billing\\", \\"primary\\"]\\n}"},{"target":"addresses","mode":"append_if_exists","source":"delivery_contact","value_json":"{\\n \\"street_name\\": \\"delivery_contact.street_name\\",\\n \\"street_number\\": \\"delivery_contact.street_number\\",\\n \\"city\\": \\"delivery_contact.city\\",\\n \\"postal_code\\": \\"delivery_contact.postal_code\\",\\n \\"country\\": \\"delivery_contact.country\\",\\n \\"_tags\\": [\\"delivery\\", \\"secondary\\"]\\n}"}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"mappings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"object","properties":{"schema":{"type":"string","description":"schema & tag identify the target entity for the address."},"tag":{"type":"string","description":"schema & tag identify the target entity for the address."},"key":{"type":"string","description":"target field for where to store this address."},"value_json":{"type":"string","description":"stringified JSON for how to map address data"},"target_unique":{"type":"array","items":{"type":"string"},"description":"Array of keys which should be used when checking for uniqueness. Eg: [country, city, postal_code]\\n"}},"required":["schema","tag","key","value_json"]},"reference":{"type":"object","properties":{"schema":{"type":"string","description":"Schema of the entity where the reference will be stored."},"key":{"type":"string","description":"Field location to store the reference."},"labels":{"type":"array","items":{"type":"string"},"description":"Optional relation labels to give meaning to this reference."}},"required":["schema","key"]}},"required":["target","reference"],"example":{"target":{"schema":"contact","tag":"primary","key":"address","value_json":"{\\"_tags\\": [\\"billing\\"],\\"city\\":\\"steps[0][Adresse][city]\\",\\"country\\":\\"steps[0][Adresse][countryCode]\\",\\"postal_code\\":\\"steps[0][Adresse][zipCode]\\",\\"street\\":\\"steps[0][Adresse][streetName]\\",\\"street_number\\":\\"steps[0][Adresse][houseNumber]\\",\\"additional_info\\":\\"steps[0][Adresse][addressExtention]\\"}","target_unique":["country","city","postal_code","street","street_number"]},"reference":{"schema":"opportunity","key":"billing_address"}}}}},"required":["mappings"]}},"required":["config"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"target_workflow":{"type":"string"},"conditions":{"type":"array","items":{"allOf":[{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},{"type":"object","properties":{"schema":{"type":"string"}}}],"required":["schema","source","comparison"],"example":{"schema":"contact","source":"email","comparison":"equals","value":"test@epilot.cloud"}}},"assignees":{"type":"array","items":{"type":"string"}},"assign_steps":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string"},"step_name":{"type":"string"},"user_ids":{"type":"array","items":{"type":"number"}}},"example":[{"step_id":"xyh9t2ha","step_name":"Lead Sales","user_ids":[10010729]},{"step_id":"29jgasl","step_name":"Operations","user_ids":[10010728,10010729]}]}}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Trigger Workflow","type":"trigger-workflow","config":{"target_workflow":"mfptvUMH","conditions":[{"schema":"ivy-opportunity","source":"customer.type","comparison":"equals","value":"PRIVATE"}],"assign_steps":[{"step_name":"Lead Sales","user_ids":[10010729]},{"step_name":"Operations","user_ids":[10010728,10010729]}]}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"entity_sources":{"type":"array","items":{"type":"string"}},"target_webhook_id":{"type":"string"}}}}}],"example":{"id":"2520gja-2sgmsaga-0asg-822jgal","name":"Trigger Webhook","type":"trigger-webhook","config":{"entity_sources":["contact","account"],"target_webhook_id":"25jg9ag2ga"}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"template_id":{"type":"string"},"filename":{"type":"string"}}}}}],"example":{"id":"08g988-ojt2jtaga-292h-8978gsaga","name":"Create Document","type":"create-document","config":{"template_id":{"type":"string","example":"112b08ba-789c-42f2-9940-43b302f641e8\\""},"filename":{"type":"string","example":"newsletter.pdf\\""}}}},{"allOf":[{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}},{"type":"object","properties":{"config":{"type":"object","properties":{"email_template_id":{"type":"string"},"language_code":{"type":"string","enum":["de","en"]}}}}}],"example":{"id":"25jga0-gkasl26-0asg-908sgaj2","name":"Send Email","type":"send-email","config":{"email_template_id":"gasj02-29ug9asgm-29t9gsaghg2g-pkmbhx2","language_code":"de"}}},{"type":"object","properties":{"id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"flow_action_id":{"type":"string","example":"9ec3711b-db63-449c-b894-54d5bb622a8f"},"name":{"type":"string"},"type":{"type":"string"},"config":{"type":"object","additionalProperties":true},"execution_status":{"type":"string","enum":["pending","in_progress","success","failed","cancelled"]},"started_at":{"type":"string"},"updated_at":{"type":"string"},"created_automatically":{"description":"Flag indicating whether the action was created automatically or manually","type":"boolean"},"outputs":{"type":"object","additionalProperties":true},"error_output":{"type":"object","properties":{"error_code":{"type":"string","enum":["MAPPING_ERROR","REFRESH_RELATIONS_ERROR","DUPLICATE_ENTITY_ERROR","TRIGGER_WORKFLOW_ERROR","TIMEOUT_ERROR","BAD_CONFIG","INTERNAL_ERROR"]},"error_reason":{"type":"string"}},"required":["error_code","error_reason"]}}}]}}},"required":["id","status","entity_id","org_id","flow_id","actions"]}}},"required":["total","results"]},"StartExecutionRequest":{"type":"object","properties":{"entity_id":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"flow_id":{"type":"string","example":"7791b04a-16d2-44a2-9af9-2d59c25c512f"}}},"EntityId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"OrganizationId":{"type":"string","example":"e3d3ebac-baab-4395-abf4-50b5bf1f8b74"},"JourneySubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["journey_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","format":"uuid"}},"required":["source_id"]}},"required":["type","configuration"]},"FrontendSubmitTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["frontend_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string","example":"99"}}}},"required":["type","configuration"]},"ApiSubmissionTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["api_submission"]},"configuration":{"type":"object","properties":{"source_id":{"type":"string"}}}},"required":["type","configuration"]},"EntityOperationTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_operation"]},"configuration":{"type":"object","properties":{"schema":{"type":"string","example":"submission"},"operations":{"type":"array","items":{"type":"string","enum":["createEntity","updateEntity","deleteEntity"]}}}}},"required":["type","configuration"]},"EntityManualTrigger":{"type":"object","properties":{"type":{"type":"string","enum":["entity_manual"]},"configuration":{"type":"object","properties":{"schema":{"description":"Which entity type can this automation be triggered from","type":"string","example":"submission"}}}},"required":["type","configuration"]},"TriggerCondition":{"type":"object","properties":{"source":{"type":"string"},"comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]},"value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"number"}}]}},"required":["source","comparison"],"example":{"source":"billing_contact.email","comparison":"exists"}},"Comparison":{"type":"string","enum":["equals","any_of","not_empty","is_empty"]}}}}')}},t={};return function r(i){if(t[i])return t[i].exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,r),a.exports}(914)})());
|