Skip to main content
Most fields in a step take a value: the reference to look up, the record to update, the value an If checks, the words of a note. You fill them by picking a value by name. Each picked value shows as a chip that says where it comes from:
  • from the document · Invoice number: a field of the document that started the run.
  • from the request · Contract number: a field another system sent.
  • from step 1 · Its id: what step 1 found.
  • from step 1 · Matches contract: a value you asked AI step 1 to hand back.
  • USD: a value you typed.
When the run reaches that step, each chip is replaced by its value.

Where values come from

A step can use values from the trigger and from any step above it, never from a step below. In the list, an earlier step’s values sit under From step N and the step’s sentence, such as From step 2 · Alex Morgan approves what step 1 drafted. A Mercora or app step is headed by its action’s name, such as From step 1 · Find a record. An AI step, and a Wait for step that waits for a callback, have no list: type a name to ask them for a value. A schedule or Only when someone runs it hands the steps no values. If, Tell someone, Report a finding and Stop here hand nothing on.

Pick a value

  1. Open the step and click the value box. An empty one reads Pick a value.
  2. The list shows each source as a heading, the trigger first, then each earlier step, with its values under it. Scroll, or type to search.
  3. Click a value. The box now shows it as a chip.
The value list open on an If step, with the headings From the request and From step 1 · Find a record

Step 2 can pick from the request's fields and from what step 1 found.

To change a value, click its chip and pick another. In text (a finding or a note), click a chip and pick Remove this value to take it out.

Ask an AI step for a value

An AI step has no fixed list of values: it works out whatever its brief asks. So a later step names the value it needs, and the AI step hands it back.
1

Open the later step's value box

In the step that needs the value, click Pick a value. Here, an If in step 2 that should check whether the invoice matches its contract.
2

Type a name for the value

Type what the value is, such as Matches contract. Two choices appear: Use “Matches contract” as a typed value, and Ask step 1 for “matches contract” (one line for each AI step above).
The value list with Use "Matches contract" as a typed value and Ask step 1 for "matches contract"

Type a name, then click Ask step 1 for "matches contract".

3

Click Ask step 1

The box now reads from step 1 · Matches contract. Finish the rule: here, the test is no.
An If step: from step 1 · Matches contract is no

The If checks the value step 1 hands back.

4

Say how to work it out in the brief

Open step 1 and make sure its brief explains the value, such as “Say whether price, quantity and currency all match the contract.”
What happens in a run. Step 1 is told to hand back every value that later steps ask of it, by name. Each value’s kind comes from how it’s used: If step 1 can’t work the values out, the step fails and names the values later steps need, such as “Step 1 finished without the values step 2 needs: matches_contract”. It never invents one. Then the step’s failure plan applies. If step 1 ends with nothing to report, it hands back nothing and the run carries on, so later steps find each value empty (see When a value is missing). To use the same value in another step, ask for it again with the same name. In the due date example, steps 2 and 3 both ask step 1 for “due date”, and step 1 hands it back once. A name becomes lower_snake_case: Broker name is asked for as broker_name and shows as Broker name. Use a name that says what the value is, since step 1 reads it.

Type a value

Click the value box, type the value, and click Use ”…” as a typed value. A plain number, such as 1200 or 3.5, is kept as a number; anything else is text. Use it for a fixed value, such as USD in a rule “from step 1 · Currency is USD”. A typed value can’t stand where Mercora needs a real record, such as the trade a Wait for step watches: pick that from the trigger or an earlier step.

Write text with values

A Report a finding text and a Tell someone note mix your words with values:
  1. Type the first words in the box.
  2. Click + value and pick a value. It goes in after your words, and a new box opens after it.
  3. Type the next words in the new box. Repeat for each value.
A Tell someone note with text and the value from step 2 · The answer

The note ends with the answer to the question in step 2.

In the run, each value is written into the text, such as “Credit note account: 4010 Sales returns”. The step’s sentence in the list shows each value by its name (“Tell Alex Morgan: Credit note account: the answer”).

When a value is missing

A value that isn’t there is never guessed. It counts as empty:
  • In an If, only is empty holds for it; every other test fails. Check with is not empty before a step that needs the value.
  • A Mercora or app step that needs it fails and names the input with no value, such as “Step 2 has no value for number.”
  • In text, it adds nothing.

Fix a value whose step is gone

A value’s source can go: the step it came from was deleted, or moved below the step that uses it. In a step’s fields, the first value of an If rule, and a finding or note, its chip then turns red. In the second value of an If rule, a Wait for date or trade, and the fields of Update a record, its chip reads “from a deleted step” instead. Either way, click the chip and pick another value. Save won’t save the automation until every value can be found, and says which step to fix.

Next steps

  • Examples: four automations that pass values from step to step.
  • Steps: the fields of each step.