No POD, no pay: carrier bills in Xero checked before the pay run
Before each carrier pay run, this flow checks every Xero bill coming due against McLeod for a POD on file and the agreed carrier pay, and posts ready and held lists to AP.
The prompt
Every Thursday morning, get the bills awaiting payment in Xero that are due in the next 7 days or already past due, earliest due date first. For each bill, find the load in McLeod by the load number in the bill's reference, and check that a POD is on file for the load and that the bill total matches the agreed carrier pay. Post a list to AP in Slack: the bills that are ready to pay, and the bills to hold with the reason for each, such as no POD, a different amount, or no load number.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: Read the bills coming due
Inside the loop: Check each 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
- Read the bills coming due Asks Xero for the bills awaiting payment that fall due in the next 7 days or are already past due, earliest due date first, 100 at a time until none are left.
- Hold bills with no load number A bill with no load number in its reference goes straight to the held list. The rest are checked one by one.
- Find the bill's load in McLeod Looks the load up by the number in the bill's reference. A load McLeod doesn't have puts the bill on the held list.
- List the load's documents Lists the documents McLeod Imaging holds for the load and its movements.
- Check the POD and the amount A bill is ready to pay when a POD is on file for the load and its total matches the agreed carrier pay to the cent. Anything else is held, with the reason.
- Post the pay run check to AP Posts both lists to AP in Slack, with the carrier, bill number, load, amount and due date of each bill, and the reason for every hold.
Before you turn it on
- Connect your Xero and Slack accounts, and enter your McLeod server URL and API token.
- Give the flow a weekly schedule on the morning before your pay run. It has no trigger, so it runs only on that schedule.
- Check the flow settings: Days ahead is how far ahead to look (7 by default), and POD document types lists the McLeod document type IDs that count as a POD (POD by default).
- Pick your AP channel in the Slack step. Each load is found by the bill's Reference, so keep the McLeod load number there.