FlowRunner
Features Pricing
Theme
Start Free

Shopify order to Sendcloud label, tracked in AfterShip

When a Shopify order comes in, this flow buys the Sendcloud label with the cheapest method for its destination and weight, and registers the tracking number in AfterShip.

The prompt

When a new order comes in on Shopify, get its shipping address and weight. Check that the address is complete, with a name, street and house number, city, postal code, country and an email, and that the products have a weight. If anything is missing, post the order to our warehouse channel in Slack so someone labels it by hand. Otherwise, find the Sendcloud shipping methods that go to that country and take that weight, pick the cheapest, and buy the label in Sendcloud. If Sendcloud refuses the label, tell the warehouse in Slack too. Then register the tracking number with AfterShip so we can follow the delivery.

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

The flow

Yes No Yes No Action List shippingmethods Action Get the order Action Buy the label inSendcloud Condition Address complete? Code Pick the cheapestmethod Code Check the addressand weight Action Track it inAfterShip If a step fails Label refused Condition Method for thisparcel? Starts the flow New Shopifyorder Action Tell the warehouseto label it by hand

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 Shopify order Checks your Shopify store for new orders every minute.
  2. Get the order Reads the order's shipping address, email and total weight from Shopify.
  3. Check the address and weight Makes sure the address has a name, street and house number, city, postal code and country, plus a state or province for the US and Canada, that there is an email for tracking updates, and that the order has a weight. Shopify's grams become the kilograms Sendcloud expects.
  4. Address complete? An order with something missing goes to the warehouse in Slack with the reason, so someone labels it by hand. A complete one goes on to Sendcloud.
  5. Pick the cheapest method Lists the Sendcloud shipping methods for the destination country and picks the cheapest one whose weight range fits the parcel. When none fits, the warehouse hears about it in Slack.
  6. Buy the label in Sendcloud Creates the parcel with the label requested, so Sendcloud buys the label and returns the tracking number. If Sendcloud or the carrier refuses it, the warehouse gets the error in Slack.
  7. Track it in AfterShip Registers the tracking number in AfterShip under the Shopify order number, so delivery monitoring starts as soon as the label exists.

Before you turn it on

  • Connect your Shopify and Slack accounts, and enter your Shopify store domain.
  • Enter your Sendcloud public key and secret key, and your AfterShip API key.
  • Labels ship from your default sender address in Sendcloud, so check that it is set.
  • Give every product a weight in Shopify. The flow labels each order at its products' total weight.
  • Pick the Slack channel your warehouse watches in Tell the warehouse to label it by hand.