Passing Additional Data to an HTTP Response subworkflow
In a Shopify API Request action, or in an HTTP Request action you can run the response of that request through an HTTP Response subworkflow.
You can pass additional parameters to the subworkflow using the "Addtional Data" field (formatted as JSON).
In this example, we have an Order workflow that performs and API request and passes
Order->Customer->ID to the subworkflow.
Conditions
In the HTTP Response subworkflow you can add a condition based on the additional data. To do this, add a condition to the JSON field:
Next, you need to type in the "Property Path", which in this case is just
customer_id
.
You select the field type the value is, which for the Customer ID is going to be an integer.
You can then select the condition operator, such as "greater than", or "is not empty".
Tokens/Actions
We can use that customer_id
value as a token in our actions.
In an action you can open the Token Browser by clicking on the {t} icon in any field that supports tokens.
Look for the "JSON" field which is a generic token for getting data in the JSON response.
By default the token has prop_name
, which should be replaced with the path to the property in the JSON object you want to display.
In our example the data is located in
customer_id
.