FlowRunner
Features Pricing
Theme
Start Free

Shopify orders into ShipStation, held until stock arrives

Each Shopify order lands in ShipStation with the cheapest carrier and service set and its source tagged. An order with an item out of stock waits on hold until stock is back.

The prompt

When a new order comes in on my Shopify store, compare live shipping rates from my carriers and add the order to ShipStation with the cheapest carrier and service, its addresses, items, totals and weight, under my store and ship-from location, tagged Shopify so we know where it came from. Then check Shopify stock for every item on the order. If anything is short, put the order on hold in ShipStation for 7 days so it doesn't ship partial, check stock again every 6 hours, and release the order from hold as soon as every item is back in stock. If stock still isn't back after 7 days, leave the order on hold.

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

The flow

Yes Yes Repeats for each item Recheck stock until itarrives Repeats for each item Check stock for eachitem Repeats for each item Get rates from eachcarrier Action Hold the order Starts the flow New Shopifyorder Condition Any item short? Action Start the stock check Action Look up yourShipStation tags Condition Stock in now? Action Read the fullorder Action Add the order toShipStation Code Map the order forShipStation Action Release the order Action Look up yourship-from locations Action Start an empty ratelist Action Look up yourShipStation stores Code Pick the cheapestrate

Inside the loop: Get rates from each carrier

Code Keep the carrier'srates Action Get this carrier'srates If a step fails Skip a carrier withno rates

Inside the loop: Check stock for each item

Code Count it if short Action Find the item inShopify

Inside the loop: Recheck stock until it arrives

Repeats for each item Recheck each item Action Reset the count Action Wait before the nextcheck

Inside the loop: Recheck each item

Code Count it if still short Action Look the item upagain

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 every 5 minutes for new orders and reads each one in full: addresses, line items with SKUs and weights, and totals.
  2. Get rates from each carrier Finds your ship-from location in ShipStation and asks each of your carriers for rates from there to the customer's address at the order's total weight. A carrier that returns no rate is skipped.
  3. Add the order to ShipStation Creates the order awaiting shipment with the cheapest carrier and service already set, plus its weight, your store, your ship-from location and your Shopify tag. It is keyed to the Shopify order, so a rerun updates it instead of adding a copy.
  4. Check stock for each item Looks up every SKU on the order in Shopify and counts the items Shopify shows as oversold. With everything in stock, the order stays ready to ship.
  5. Hold the order Puts the order on hold in ShipStation until a date 7 days out, so nobody ships it partial.
  6. Recheck stock until it arrives Waits 6 hours, checks each SKU in Shopify again, and repeats until every item is back or the hold period runs out.
  7. Release the order Once every item is in stock, takes the order off hold so it is back awaiting shipment. If stock never came back, the order stays on hold until its hold date.

Before you turn it on

  • Connect your Shopify store and enter its shop domain, and enter your ShipStation API key and API secret.
  • Change the flow setting Carriers to the ShipStation carrier codes you ship with. It starts with stamps_com, ups and fedex.
  • Set the flow settings ShipStation store and Ship-from location to the names you use in ShipStation. If no name matches, the order goes under your manual store and ships from your default location.
  • Create an order tag in ShipStation named Shopify, or change the flow setting Source tag to the name of the tag you use. If the tag doesn't exist, the order goes in untagged.
  • Change the flow settings Days to hold and Hours between stock checks if 7 days and 6 hours don't fit how fast you restock.
  • Give every Shopify variant a SKU and a weight, since the stock check looks items up by SKU and the rates use the order's weight.