FlowRunner
Features Pricing
Theme
Start Free

International order to customs-ready label in EasyPost

A WooCommerce order ships abroad. This flow builds the EasyPost customs declaration from your product sheet, buys the label and sends the customer tracking.

The prompt

When a new WooCommerce order ships to a country other than ours, look up each product's HS code, country of origin and weight by SKU in our customs sheet in Google Sheets. If a product is missing customs data or a line is over $2,500, post the order to our shipping channel in Slack and stop. Otherwise create the customs declaration in EasyPost, get rates with the customs form attached, buy the cheapest label, find the nearest DHL drop-off point to the customer, and add a customer note to the order with the carrier, the tracking number and that drop-off point.

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

The flow

Yes No Yes Action Tell the shippingteam Code Build the customslines Action Look up theproducts' customsdata Condition Ships to anothercountry? Condition Customs datacomplete? Action Create the customsdeclaration Starts the flow New order inWooCommerce Action Load the ship-fromaddress Action Send the customerthe tracking number Code Write the customernote Code Pick the cheapestrate Action Get rates If a step fails No DHL point found Action Buy the label Action Find the nearestDHL drop-off point

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 order in WooCommerce Starts when a new order is placed in your WooCommerce store.
  2. Ships to another country? Orders shipping inside your own country stop here. Orders going abroad carry on.
  3. Look up the products' customs data Reads your customs sheet in Google Sheets and matches each line item by SKU to its description, HS code, country of origin and weight.
  4. Customs data complete? Checks that every product was found with its customs data and that no line is over $2,500, which would need an export filing number. When something is missing, the order number and what is missing go to your shipping channel in Slack, so someone can finish it by hand.
  5. Create the customs declaration Creates the customs declaration in EasyPost with all the lines, signed by the person in the flow setting Customs signer.
  6. Buy the label Creates the shipment from your warehouse with the customs declaration attached, gets the carrier rates, and buys the label at the lowest rate. The label and the customs paperwork are produced together.
  7. Find the nearest DHL drop-off point Looks up DHL service points near the customer's address. If DHL finds nothing or the lookup fails, the flow carries on without a drop-off point.
  8. Send the customer the tracking number Adds a customer note to the order with the carrier, the tracking number and, when one was found, the nearest DHL drop-off point, so WooCommerce emails it to the buyer.

Before you turn it on

  • Connect your Google and Slack accounts. Enter your EasyPost API key, your WooCommerce store URL, consumer key and consumer secret, and a DHL API key with access to Location Finder.
  • Put your warehouse address ID from EasyPost, which starts with adr_, in the flow setting Ship-from address ID, and the name of the person who signs your customs declarations in Customs signer.
  • Keep a customs sheet with one row per product and the columns SKU, Description, HS Code, Origin as a two-letter country code, and Weight in ounces. Pick it in the step Look up the products' customs data.
  • Pick your shipping channel in the step Tell the shipping team.