Pass state

A Pass state passes the state's input to its output. You can also add arbitrary data to the output.

You typically use a Pass state as a placeholder for a state you haven't written yet. You can also use a Pass state to add mock data to a ZIS flow. This is often useful for testing or troubleshooting.

"Mock.GetTicket": {  "Type": "Pass",  "Result": {    "id": 35436,    "subject": "Help, my printer is on fire!"  },  "ResultPath": "$.ticket",  "Next": "MyNextStep"}

Supported properties

In addition to common state properties, a Pass state supports the Result property.

Name Type Mandatory Description
Result object false Output for the state

Examples

The following Pass state mocks the output of a LoadConfig action. You can use the state to test a ZIS flow before building a Zendesk app that lets admins specify the config settings.

"Mock.LoadConfigData": {  "Type": "Pass",  "Result": {    "channel": "#zendesk-tickets",    "priority": "urgent"  },  "ResultPath": "$.settings",  "Next": "MyNextStep"}

The following Pass state mocks the output of a ZIS custom action. You can use the state to test a ZIS flow without defining the action or making an API request.

"Mock.InitiateRefund": {  "Type": "Pass",  "Result": {    "transaction_id": 54321,    "transaction_value": "99.01",    "transaction_state": "pending_approval"  },  "ResultPath": "$.refund_details",  "Next": "MyNextStep"}