FlowRunner
Features Pricing
Theme
Start Free

Short-paid freight invoice in Xero sent to billing for a decision

When a customer pays a freight invoice short, this flow shows billing the open amount and the load's accessorials, then asks the customer, writes it off or leaves it open.

The prompt

When a customer payment comes into Xero and leaves the invoice partly open, look up the load in McLeod by the load number in the invoice reference. Ask our billing lead in Slack what to do, showing the invoice total, the payment, the open balance, the invoice lines and the load's accessorials, with Ask the customer, Write it off and Leave it open buttons, and wait for the answer. Ask the customer emails the customer from Gmail for the balance. Write it off creates a credit note for the open amount and applies it to the invoice. Confirm what happened in the Slack thread.

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

The flow

Yes Yes Code Write the question forbilling Condition Customer payment? Asks a person Ask the billinglead Action Ask the customerfor the balance Action Confirm thecustomer wasasked If a step fails No load number onthe invoice Action Confirm the balancestays open Condition What did billingdecide? Action Find the load inMcLeod Asks a person Wait for the billinglead's answer Starts the flow New payment inXero Action Create the creditnote Action Apply the credit tothe invoice Action Confirm thewrite-off Action Get the invoice Action Get thecustomer's email Condition Paid short?

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 payment in Xero Checks Xero every 5 minutes for new payments and keeps the ones customers paid against sales invoices.
  2. Paid short? Reads the invoice the payment went to. An invoice paid in full stops here; one that still shows a balance goes on.
  3. Find the load in McLeod Looks the load up by the load number in the invoice reference, so billing sees the load's status and the accessorials McLeod has for it.
  4. Ask the billing lead Posts the short pay to the billing lead in Slack: the customer, the invoice total, this payment, the open balance, the invoice lines and which one equals the open amount, with three buttons, Ask the customer, Write it off and Leave it open.
  5. Wait for the billing lead's answer The run waits for the click. Leave it open changes nothing in Xero and says so in the Slack thread.
  6. Ask the customer for the balance Ask the customer emails the address on the customer's Xero contact from Gmail, with the invoice lines and the open amount, and asks for the balance or the reason for the deduction.
  7. Create the credit note Write it off creates a customer credit note in Xero for the open amount, booked to your write-off account.
  8. Apply the credit to the invoice Applies the credit to the invoice so it shows paid, and confirms it in the Slack thread.

Before you turn it on

  • Connect your Xero, Slack and Gmail accounts, and enter your McLeod server URL and API token.
  • Set the flow setting Write-off account code to the Xero account short pays are written off to.
  • Copy the URL of the block Wait for the billing lead's answer into the flow setting Answer link. The Slack buttons open it.
  • Pick your billing channel in the four Slack steps. The load is found by the invoice's Reference, so put the McLeod load number there when you invoice, and keep an email address on each customer's Xero contact.