FlowRunner
Features Pricing
Theme
Start Free

UPS exceptions sent to the customer or to ops the same day

Every 30 minutes this flow reads new UPS exceptions from Quantum View. Plain delays get an email to the customer with the UPS reason. Address problems, failed attempts and damage go to ops in Slack.

The prompt

Every 30 minutes, read the new exceptions from our UPS Quantum View exception subscription, every page of them. For each package, find the shipment in ShipStation by tracking number to get the order number, who it ships to and the customer's email. Read what UPS says. If it's only a delay and the package is still coming, email the customer from Gmail with the reason in plain words and the new delivery date. If someone has to act, like a wrong or corrected address, a failed delivery attempt, a package held for pickup, refused, damaged or coming back to us, or if the order has no email, post it to our ops channel in Slack with what UPS says, the next step and a note for the customer ready to send.

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

The flow

Repeats for each item Work each exception Repeats for each item Read the exceptionfeed Action Start the exceptionlist

Inside the loop: Read the exception feed

Action Keep the list Action Get new UPSexceptions Code Add the page to thelist

Inside the loop: Work each exception

Yes No AI agent Read what UPS says Condition A delay the customershould hear about? Action Email thecustomer Code Match the order Action Send it to ops Action Find the order inShipStation Code Write the note for ops Code Read the UPSexception

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. Get new UPS exceptions Every 30 minutes, reads the unread events from your Quantum View exception subscription, page by page until the feed is empty.
  2. Find the order in ShipStation Looks up each package by its tracking number to get the order number, who it ships to and the customer's email.
  3. Read what UPS says An AI agent reads the UPS status, reason, resolution and new delivery date, decides whether it is only a delay or needs someone to act, and writes a short note for the customer.
  4. A delay the customer should hear about? A plain delay on an order with a customer email goes on to the email. Everything else goes to ops.
  5. Email the customer Sends the note from your Gmail account: the order is running late, the reason UPS gives, and the new delivery date when UPS has one.
  6. Send it to ops Posts the exception to ops in Slack with the tracking number, the order, what UPS says, the next step and the customer note ready to send. Packages with no ShipStation order land here too.

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 Gmail and Slack.
  • In UPS Quantum View, set up a subscription for exception events and put its name in the flow setting Exception 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, and your company name in Company name. It signs the customer emails.
  • Pick your ops channel in Send it to ops.
  • Set the flow's schedule to run every 30 minutes.