An Action state performs a task in a ZIS flow. For example, you can use an Action state to transform data in a flow or make a REST API call.
"expr": ".ticket_event.ticket.id | tostring",
The Action state supports two types of actions:
- Built-in actions
- Custom actions
Built-in actions are predefined requests for common tasks. For example, you can use a built-in action to load data from a ZIS config or transform data using jq. For more information, see ZIS built-in actions.
A custom action is a wrapper for an HTTP request. You can use a custom action to perform a task not covered by a built-in action. For example, you can make a request to a Zendesk API or a third-party service, such as Slack or Shopify. To use a custom action, you must define the action as a separate resource in the ZIS bundle. For more information, see ZIS custom actions.
In addition to common state properties, an Action state supports the following properties.
|ActionName||string||true||Name of the action. For built-in actions, the name is predefined. For custom actions, the name is based on the action definition|
|Parameters||object||false||Parameters to pass to the action. For built-in actions, supported parameters are predefined. For custom actions, you define supported parameters in the action definition. Parameters values can be a mix of static JSON and JSONPath|
|Retry||array of objects||false||Defines a retry policy for the state. See Flow states retry and error handling|
|Catch||array of objects||false||Contains a fallback state to run if the Action state encounters a runtime error and can't retry. See Flow states retry and error handling|
|TimeoutSeconds||number||false||Maximum runtime for the state. If the state exceeds this limit, it returns a runtime error. Must be a positive, non-zero integer|