Skip to main content
An automation’s steps run in order, from step 1 down. Each step does one thing: works something out, finds or changes a record, waits for a person, or decides where the run goes next.

Add a step

Click Add a step under the last step. The menu groups the steps by kind; type in What should happen next? to search. Click one to add it: it opens below the others, ready to fill in.
The Add a step menu with the AI and Mercora groups

The top of the Add a step menu: the AI step and the Mercora steps.

The Add a step menu scrolled to the People and Logic groups

Further down: the People and Logic steps.

The menu lists only the steps this automation can use here. A Mercora step shows once the automation can be given the area it needs; an app shows once an admin has connected it and switched its actions on. If no step matches what you need, describe it in an AI step’s brief instead. Fields marked * are required. Most fields take a value from the trigger or an earlier step, picked by name: see Use values from earlier steps.

AI

Work something out

An AI step does the job its brief describes. It reads what the automation may read under Uses, plus what started the run (the document, the request or the message) and the answer of the step before. Use it where judgement is needed: comparing two documents, reading payment terms, drafting a reply.
An open AI step with its brief, Skills, Can stop and ask, Who approves what it proposes and the run-per-record switch

An AI step that compares an invoice with its contract.

Example brief: “Compare this invoice with its trade’s contract: price per unit, quantity and currency. Say whether they match and, if not, exactly what differs, with both values.” Write the brief the way you’d brief a colleague: what to look at, what to compare, and what a good answer contains. An AI step never makes a change itself: it proposes one, only where the automation has Propose changes, and each proposal waits in the Inbox. When it finds nothing worth reporting, it says so, and a run whose last step found nothing ends without an Inbox card. A later step can ask an AI step for a value by name, such as “matches contract” or “due date”: the AI step then hands that value back. See Ask an AI step for a value.

Mercora

Find a record

Looks up one trade, contract or invoice by its exact reference. It only reads.
An open Find a record step: Record type Contract, Reference from the request · Contract number

Find the contract whose number another system sent.

What later steps can pick from it: Its id, Reference, Its trade, Counterparty, Quantity, Price, Currency and Amount. If nothing has that reference, the step still finishes, with every value empty: follow it with an If such as “from step 1 · Its id is not empty”. If two records share the reference, the step fails rather than pick one. The automation needs Read on the record’s area.

Find contacts

Finds the email addresses of the contacts on a trade, an invoice or a counterparty, for a later step that sends an email. Set Trade, invoice or counterparty, and optionally Which side (customer, supplier or both) and Contact role contains. Later steps can pick Their email addresses, Their names, Counterparties and How many. It shows in the menu where the automation can be given the Counterparties area.

Update a record

Proposes a change to one trade, shipment, contract or invoice. It always asks first: the person under Approved by sees the exact change in the Inbox and approves, edits or rejects it.
An open Update a record step: Record type Invoice, Record from the document, Due date from step 1, Approved by the owner

Propose the invoice's new due date, worked out by step 1, for Alex Morgan to approve.

The automation needs Propose changes on the record’s area. If the record already holds those values when the step runs, nothing is asked and the step is done. Later steps can pick Its id.

Report a finding

Ends the run with a card in the Inbox under Needs you. Write the Finding as text with values in it: type, click + value to put in a value, and carry on typing in the box after it.
An open Report a finding step with text and two values: from the document · Invoice number and from step 1 · What differs

If invoice KSS-INV-26-0288 charged USD 540/MT, the finding would read "Invoice KSS-INV-26-0288 differs: unit price USD 540/MT, contract VCS-P-2026-0688 USD 528/MT".

Only Tell someone steps can come after it: they leave their notes, then the run ends.

Make a confirmation

Draws a PDF of a trade’s terms and files it on the trade. Set Trade to the trade’s id, such as “from the document · Its trade”. It asks first; a workspace admin can let it run without review, since the PDF comes from the approved trade and nothing leaves Mercora. Later steps can pick The confirmation (the new document) and Its file name. It needs the Trades area.

Apps

App actions

Once an admin connects an app and switches its actions on under Settings → Integrations, the Add a step menu lists them under Apps as app · action, each marked with how it acts:
  • Only reads: runs straight away, such as finding a contract in your CTRM.
  • Asks first: waits for the person under Approved by to approve the exact inputs, then runs once. This is how anything that changes data or leaves Mercora acts, such as sending an email.
Some actions work only inside an AI step, so they aren’t in the menu: give the app Read or Propose changes under Uses, and describe what to do in an AI step’s brief. An app step lists its required inputs first; the rest are under More inputs. A few low-risk actions, such as an email to your own team, can run without review: only a workspace admin can switch that on, on the step. See Integrations for what each app offers.
The table of actions automations may use for an integration

An app's actions, as an admin switches them on for automations in Settings → Integrations.

People

Ask someone to approve

Waits until a person approves, edits or rejects what the step before drafted. Set What person approves (a short title for the card) and Approved by. Rejecting ends the run.
An open Ask someone to approve step with its title and Approved by

Alex Morgan approves the broker order the AI step drafted.

It can’t be step 1, since it approves the step before it. If the AI step before it found nothing to report and only Tell someone steps come after it, there is nothing to approve and the step is skipped. Later steps can pick What was approved.

Ask someone a question

Waits for a person’s answer. Set What person is asked and Answered by. The answer goes to the next step, and any later step can pick it as The answer.
An open Ask someone a question step: Which account should the credit note go to?, Answered by the owner

Ask which account a credit note goes to.

Logic

If

Lets the run carry on only when a value matches. Mercora checks the rule itself: no AI decides it.
  1. Click Add a rule.
  2. Click Pick a value and pick what to check, such as “from step 1 · Matches contract”.
  3. Pick the test. Tests that compare need a second value: pick it, or type one.
  4. Under Otherwise, pick what happens when the rule doesn’t hold: Stop here, nothing to report (the run ends quietly) or Skip to step N (a later step).
An open If step: from step 1 · Matches contract is no, Otherwise Stop here, nothing to report

Carry on to the finding only when step 1 says the invoice doesn't match.

Add up to three rules with Add a rule, then choose All of them or Any of them. A missing value is never guessed: only is empty holds for it. Numbers must be plain, such as 1200 or 1200.50; “1,200” is not read as a number.
An If rule comparing from step 1 · Due date with from the document · Due date

Compare two values: carry on only when the due date step 1 worked out differs from the one on the invoice.

Wait for

Pauses the run. Pick what it waits for under Wait for: For a document or a callback, choose what happens at the limit: carry on without it or treat it as failed. A set time, and the limit on a document or callback wait, can be at most 30 days; an Until wait lasts until its date. A test skips waits. A document wait counts only documents that reach the trade after the run started; one already on the trade doesn’t end it. If no trade was found before the step, it fails.
An open Wait for step: A document to reach the trade, Document Bill of Lading, On the trade from the document · Its trade, Up to 14 days then carry on without it

Wait up to 14 days for a B/L to reach the contract's trade, then carry on without it.

Later steps can pick The document and Its type after a document wait. When it carried on without one, both are empty: check with an If such as “from step 1 · The document is empty”. After a callback, ask the step for any field the call sends, by name.

Tell someone

Leaves a note in a member’s Inbox, and the run carries on without waiting. Pick who under Tell (the owner by default) and write the Note, with values if you like. Their notification settings can also send it to their email or WhatsApp.
An open Tell someone step with a note containing from the document · Contract number

Tell the owner which contract has no B/L yet.

Stop here

Ends the run as done. Use it to end one branch of an If. To run step 2 when a rule holds and step 4 when it doesn’t:
  1. If the rule, otherwise Skip to step 4
  2. The step for when the rule holds
  3. Stop here
  4. The step for when it doesn’t

Who is asked

Every step that involves a person names one member: an AI step’s Who approves what it proposes, an approval, a question, an Update a record or app step that asks first, a Tell someone note, and a failure plan. It’s the owner unless you pick someone else, and the member you pick must be able to see what their card shows. Where the step waits for a decision, that member or a workspace admin decides; a Tell someone note only lands in their Inbox.

If a step fails

An AI step, a Mercora or app step, and a Wait for step can each have a plan for when they fail. With no plan, a failed step stops the run: it ends as failed, with the step and the reason, and a card in the Inbox. To change that, open the step’s ⋯ menu and click Add what happens if it fails. An If it fails row appears, set to Ask someone. Pick:
  • Ask someone: the member you pick sees what failed and chooses Try again, I did it by hand · carry on or Stop the run.
  • Tell someone and carry on: they get a note and the run goes on. Not offered when a later step uses this step’s values, since those values would be missing.
  • Stop the run: removes the plan again, so a failure stops the run as above.
If it fails: Ask someone, The owner, with the note Later steps use its values, so it can't just carry on

If the AI step fails, ask the owner. It can't just carry on, because step 2 uses its values.

Next steps