Skip to main content
Build a flow one step at a time, and test after each step. Each new step then has real output to reference, and a failure points to the step that caused it. Before you start, you need a flow with a trigger and a saved test payload. See Create a flow and Capture a test payload with Listening mode.

Add, test, and check each step

Repeat these steps for every step you add to the flow:
  1. In Workflow Builder, click + under the last step, search for a component, such as ion-api or Branch, and select an action.
  2. Configure the step’s fields. Reference values from earlier steps instead of typing them in, as described in Reference a value from an earlier step.
  3. Run the flow with your saved payload, as described in Run the flow with a saved payload.
  4. In Run history, click the new step and check its Output. If a value is missing or wrong, fix the step and run the flow again before you add the next step.
Check the trigger’s output the same way before you add the first step. The ION record the event is about is under results.body.data.data in the trigger’s output, such as the received item of a Receipt Items - Create event. Confirm it holds the value the next step needs, such as a part_inventory_id.

Reference a value from an earlier step

  1. In the step’s Configure tab, click the arrow icon at the right end of the field to open the Reference panel.
  2. In Step, select the earlier step whose output you want, such as Trigger.
  3. Expand the output tree and click the value. Path fills in with its location, such as results.body.data.data.
Reference panel with Step set to Trigger, Path set to results.body.data.data, and the trigger's test result output tree.

The Reference panel with the trigger selected and the test run's output tree expanded.

The tree shows the earlier step’s output from your latest test run. If the panel shows No Data, that step hasn’t run in a test yet. Run the flow with your saved payload, then open the panel again.

Pass variables to Run GraphQL Query

The GraphQL Variables field of Run GraphQL Query takes one reference to an object. The object’s keys must match the variables the query declares. For example, a query that declares $part_inventory_id can reference the trigger’s results.body.data.data object, which has a part_inventory_id key. ION rejects variables that aren’t an object. To send a single value, such as an ID, reference the object that contains it.

Branch on a condition

Use the Branch component to send a run down different paths.
  1. In Workflow Builder, click + under the step the branch follows, search for Branch, and select an action:
    • If Condition is Met chooses the next step based on one or more conditions.
    • If Value Equals chooses the next step based on a value.
  2. For If Condition is Met, enter a name in Condition, such as “Needs aBOM”. The name labels the condition’s path on the canvas. A run that doesn’t match takes the Else path.
  3. Set the condition’s first Field, its Operator, and its second Field. Reference a value from an earlier step, or type one in, such as 0.
  4. Optional: To add another check, click Add a condition. Select And to require every condition, or Or to require any one of them.
  5. Run the flow with your saved payload, and click the branch step in Run history. Its Output names the path the run took.
Flow canvas with an If Condition is Met branch splitting into Needs aBOM and Else paths, beside its condition settings with And, Or, Field, and Operator.

An If Condition is Met branch with a Needs aBOM path and an Else path, and its first condition.

To check that a value exists, such as the ID of a related record, reference that value and select the exists operator.
To test a step under one path, use a saved payload that takes that path.