UPS deliveries checked for the right signature before the invoice goes out
Every hour this flow reads new UPS deliveries, checks who signed against the ShipStation order and sends the QuickBooks invoice. Odd signatures go to your billing lead in Slack first.
The prompt
Every hour, read the new deliveries from our UPS Quantum View delivery subscription, every page of them. For each package, find the shipment in ShipStation by tracking number to get the order number and who it shipped to. Check who signed and where UPS left it against the ship-to. Find the QuickBooks invoice whose number is the order number. If it hasn't been sent and the signature fits the order, send the invoice to the customer. If the signature doesn't fit, ask our billing lead in Slack, with Send the invoice and Hold the invoice buttons, and wait for the answer. If the order has no invoice in QuickBooks, tell billing in Slack.
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 delivery feed
Inside the loop: Check each delivery
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
- Get new UPS deliveries Every hour, reads the unread events from your Quantum View delivery subscription, page by page: tracking number, delivery time and place, and who signed.
- Find the order in ShipStation Looks up each package by tracking number for the order number and the ship-to name and address. Packages with no ShipStation order are left alone.
- Check who signed An AI agent compares the signer and where UPS left the package with the ship-to, and says whether they fit and why.
- Find the invoice in QuickBooks Finds the invoice numbered with the order number. When there is none, billing hears about it in Slack. An invoice already sent or paid is left alone.
- Signature matches the order? When the signature fits the order, Send the invoice emails the QuickBooks invoice to the customer's address on file.
- Ask the billing lead When it doesn't fit, the billing lead gets the order, the invoice total, who signed, where UPS left it and why it was flagged, with two buttons, Send the invoice and Hold the invoice.
- Wait for the billing lead's answer The run waits for the click. Send the invoice sends it from QuickBooks. Hold the invoice keeps it unsent and says so in the Slack thread.
Before you turn it on
- Enter the client ID and client secret of your UPS Developer Portal app (with the Quantum View product added) and your ShipStation API key and secret, and connect QuickBooks Online and Slack.
- In UPS Quantum View, set up a subscription for delivery events and put its name in the flow setting Delivery subscription. Give this flow its own subscription: reading the feed marks events as read, so two flows on one subscription would split the events between them.
- Add your Anthropic key in the flow setting Anthropic key.
- Copy the URL of the block Wait for the billing lead's answer into the flow setting Answer link. The Slack buttons open it.
- The flow looks for the QuickBooks invoice whose number is the ShipStation order number. If your invoices are numbered another way, change the search in Find the invoice in QuickBooks.
- Pick your billing channel in the three Slack steps.
- Set the flow's schedule to run every hour.