Cheapest Shippo label for every WooCommerce order
Each new WooCommerce order gets a validated address, a weighed parcel and the cheapest Shippo label that arrives in time, with tracking written back to the order.
The prompt
When a new order comes in on my WooCommerce store and it ships within my country, add the shipping address to Shippo and validate it. If Shippo says the address isn't deliverable, leave a private note on the order and stop. Otherwise weigh the order from the product weights plus my box, create the shipment, compare the carrier rates, and buy the cheapest label that arrives within 5 days. Save the label link on the order for my team and send the customer a note with the carrier and tracking number. If no rate fits or the purchase fails, leave a note so someone buys the label by hand.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: Weigh each item
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
- New WooCommerce order Starts a run the moment a new order is placed in your WooCommerce store. Orders going abroad are left for the customs flow.
- Validate the address Saves the shipping address in Shippo and has Shippo check it against carrier data. An address Shippo can't validate stops here, with a private note on the order saying no label was bought and the address needs checking.
- Weigh each item Goes through the order one line at a time, reads each product's weight from WooCommerce and adds it times the quantity to the order's total.
- Create the shipment Puts the order weight plus the empty box weight into a parcel the size of your standard box and creates the Shippo shipment from your ship-from address to the customer.
- Pick the cheapest rate Pulls every rate your connected carriers quote, keeps the ones that arrive within your day limit and picks the lowest price among them. If none arrives in time, the order is flagged instead of shipped slow.
- Buy the label Buys the label on the chosen rate and tags it with the WooCommerce order ID. If the purchase fails, a private note on the order asks someone to buy the label by hand.
- Save the label on the order Leaves a private note with the carrier, service, price, tracking number and a link to print the label.
- Send tracking to the customer Adds a customer note with the carrier and tracking link, which WooCommerce emails to the buyer.
Before you turn it on
- Enter your Shippo API token, and your WooCommerce store URL, consumer key and consumer secret.
- Fill in the flow setting Ship-from address. Change Home country if you don't ship from the US.
- Set the flow setting Box to your standard box size, the weight unit your store uses, and what the empty box and packing weigh. Give each product a weight in WooCommerce, since the flow weighs orders from them.
- Change the flow setting Most days in transit if 5 days doesn't fit your promise to customers.