FlowRunner
Features Pricing
Theme
Start Free

Carrier invoice three-way match in NetSuite

Carrier invoices land in your AP mailbox. This flow matches each one to its rate con and POD, books the bill in NetSuite when all three agree, and asks your AP lead when they don't.

The prompt

When a carrier invoice arrives in our AP mailbox in Outlook, read it and pull out the carrier, invoice number and date, load number, PRO, total and every charge on it. Find the carrier as a vendor in NetSuite and make sure that invoice number isn't booked yet; if either check fails, tell AP in Slack. Then search the mailbox for the rate con and the POD with the same load number, and tell AP which one is missing if we don't have both. Compare the three: same load, invoice total equal to the rate con, no accessorials the rate con doesn't cover, and a signed POD with nothing noted on it. If they all agree, create the vendor bill in NetSuite against our freight expense account with the carrier's invoice number and the load number. If not, ask the AP lead in Slack with the three side by side and buttons to book as invoiced, book at the rate con amount, or hold, and wait for the answer.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

The flow

No Yes Yes No No Yes Code Pick the rate con andPOD Action Book the bill at therate con amount Action Confirm the bill isheld Condition Carrier found and notbooked yet? AI agent Compare invoice,rate con and POD AI agent Read the carrierinvoice Action Find the carrierin NetSuite Code Write the question forthe AP lead Action Find the rate conand POD emails Condition Rate con and PODfound? Action Save the rate confile Action Check for a billalready booked Action Tell AP what'smissing Asks a person Wait for the AP lead'sanswer Starts the flow New carrierinvoice Action Send the invoiceto AP by hand Action Save the POD file Action Save the invoicefile Condition What did the AP leaddecide? Asks a person Ask the AP lead Condition All three agree? Action Book the bill

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works

What each step does

  1. New carrier invoice Checks the AP mailbox in Outlook every 5 minutes for an email with an attachment and invoice in the subject.
  2. Read the carrier invoice An AI agent reads the invoice and pulls out the carrier, invoice number and date, load number, PRO, total and every charge on it.
  3. Find the carrier in NetSuite Looks the carrier up as a vendor and checks no bill with this invoice number is booked yet. An unknown carrier or a repeat invoice goes to AP in Slack to handle by hand.
  4. Find the rate con and POD emails Searches the mailbox, sent mail included, for emails with the load number in the subject and picks out the rate con and the POD. If either is missing, AP hears which one in Slack and the invoice waits.
  5. Compare invoice, rate con and POD An AI agent reads all three: same load, an invoice total equal to the rate con, no detention, lumper, layover or TONU the rate con doesn't cover, and a signed POD with nothing noted on it.
  6. Book the bill When all three agree, the flow creates the vendor bill in NetSuite against your freight expense account, with the carrier's invoice number as the reference and the load and PRO in the memo.
  7. Ask the AP lead Anything else goes to the AP lead in Slack: what doesn't match, the invoice, rate con and POD side by side, and three buttons, Book as invoiced, Book at rate con amount and Hold.
  8. Wait for the AP lead's answer The run waits for the click. Book at rate con amount books the agreed rate and notes the short pay in the memo. Hold leaves the bill unbooked and says so in the Slack thread.

Before you turn it on

  • Connect your Outlook, NetSuite and Slack accounts, and enter your NetSuite account ID, client ID and client secret.
  • Add your Anthropic key in the flow setting Anthropic key, and the internal ID of your freight expense account in Freight expense account.
  • Copy the URL of the block Wait for the AP lead's answer into the flow setting Answer link. The Slack buttons open it.
  • Pick your Slack channel in the four Slack steps. The flow looks for rate cons and PODs in the same mailbox, with the load number in the email subject.