Skip to main content
Each example lists what to set under When, each step with the values to pick, and what to give it under Uses. To build one, click Automations, then +, then Start empty, and follow the table. Start empty gives you step 1 as an empty AI step: where the table’s step 1 is Work something out, fill in that step’s brief rather than adding another. Add every other step with Add a step. Test it before you switch it on (see Test before you switch on).

Check an invoice against its contract

Flags an invoice whose price, quantity or currency differ from its contract. An invoice that matches files nothing. When: When a document finishes processing. Types: Invoice. Wait for a trade match: on. On step 1, open ⋯ › Add what happens if it fails and pick Ask someone, so a failed comparison reaches you instead of ending the run. Uses: Read on Trades, Contracts, Invoices & costs and Documents.
The invoice check automation: When a document finishes processing, Invoice; steps Compare, If matches contract is no, Report a finding

The invoice check: three steps.

What a run does. Supplier invoice KSS-INV-26-0288 from Kanchana Siam Sugar is matched to trade VCS-S-2026-0714. Step 1 reads it with purchase contract VCS-P-2026-0688 (27 MT at USD 528/MT) and hands back matches contract: yes. Step 2’s rule doesn’t hold, so the run stops there and files nothing. Had the invoice charged USD 540/MT, step 1 would hand back no, with what differs, and step 3 would put “Invoice KSS-INV-26-0288 differs: unit price USD 540/MT, contract USD 528/MT” in the Inbox.

Fix an invoice’s due date from its contract

Works out the due date from the contract’s payment terms, and proposes it when the invoice says otherwise. Nothing changes until someone approves. When: When a document finishes processing. Types: Invoice. Wait for a trade match: on. Uses: Read on Contracts and Documents; Propose changes on Invoices & costs.
The due date automation: steps Read the payment terms, If due date is not due date, Update the invoice, Asks Alex Morgan first

Propose a due date only when it differs from the invoice's own.

What a run does. Step 1 reads the terms of contract VCS-P-2026-0688 and hands back a due date. If it’s the date already on invoice KSS-INV-26-0288, the run stops. If not, step 3 puts the change in the Inbox: move the due date on KSS-INV-26-0288 to match the contract’s terms. Approve makes it, Edit lets you change the date first, Reject changes nothing.
is and is not compare text, ignoring capitals. Mercora keeps an invoice’s due date as YYYY-MM-DD, and Update a record only accepts that form, so the brief asks for the date as YYYY-MM-DD: “13 Aug 2026” and “2026-08-13” are different text.

Chase a missing B/L

Waits two weeks after a contract for its B/L, and tells you if it never reached the trade. When: When a document finishes processing. Types: Contract (Purchase or Sale). Wait for a trade match: on. Uses: these steps read no data themselves, so no area is needed.
The missing B/L automation: Wait for a bill of lading on the trade up to 14 days, If the document is empty, Tell Alex Morgan

Wait, check, tell.

What a run does. Sales contract VCS-S-2026-0714 is matched to its trade, and step 1 starts waiting. When B/L RCLLCH2607841 reaches the trade, step 1 hands it on, step 2’s rule doesn’t hold, and the run ends quietly. If no B/L arrives within 14 days, step 1 carries on with no document, and step 3 leaves a note in your Inbox: “No B/L 14 days after this contract: VCS-S-2026-0714. Chase the shipper.” Only a B/L that reaches the trade after the run started counts. A trade whose B/L came in before its contract would get the note too, so use this where contracts come first.

Draft a hedge order when your ERP asks

Your ERP sends a contract number and a number of lots. Mercora finds the contract, drafts the broker order, and waits for your approval. When: When another system calls. Under Fields it sends, add contract_number (Text) and lots (Number). Once the steps and Uses are in place, name the automation and click Save: its address then shows under When, for your ERP to call. Uses: Read on Contracts and Trades.
The hedge order automation: When another system calls with contract_number and lots; steps Find the contract, If its id is not empty, Draft the broker order, Alex Morgan approves, Tell Alex Morgan

The ERP's request, from finding the contract to the approved order.

What a run does. The ERP calls the address with:
Step 1 finds contract VCS-S-2026-0714. Step 3 drafts the order for 3 lots, and step 4 puts it in the approver’s Inbox to approve, edit or reject. Once approved, step 5 leaves the note “Hedge order approved. Contract: VCS-S-2026-0714, lots: 3”. If the ERP sends a contract number Mercora doesn’t have, step 1 finds nothing, step 2 stops the run, and nothing is drafted.

Next steps