Automatically email customers about shipment progress

Shipment status is a sensitive area for customers shopping online. This Parabola example shows how you might email customers whose orders have been delayed in shipping by combining data from your ecommerce storefront with status updates from the major shipping carriers.

Automatically email customers about shipment progress

Checking order status with Parabola

The first step in our delayed-shipment notification flow is pulling in orders from Shopify. Parabola's Pull from an API step makes it easy to pull in data from practically any web service. Connecting to Shopify is no different.

You'll want to drag out a new Pull from an API step. Select 'Username & Password' from the authentication menu and supply your account id and password. Next, configure the url as shown below. Note: we are using the 2019-07 version of the Shopify API which should work fine for more than a year. At some point, though, you'll need to update your flow to reflect a more recent version of the API.

For each order you're going to get back a bunch of fields, and you'll want to use the Expand JSON step to extract the contents. The particular column we're interested in is fulfillments. As you'll notice, that includes two fields of interest: tracking_company and tracking_number. We'll keep those aside along with the order information and the customer email for later use.

Checking shipping status with the common carriers

The good news for you is that most of the major shipping carriers have well-maintained REST APIs, which means that you can use them in Parabola! If you only ship with one carrier then you're in luck, just register at the corresponding portal and secure your API token:

This example will assume orders are being shipped via the USPS API. To set that up, you'll want to drag out a new Enrich with an API step, and hook it up to the rest of your flow. You can set up the URL as follows: <TrackRequest USERID="YOUR_USER_ID"> <TrackID ID="{fulfillments.tracking_number}"></TrackID> </TrackRequest>

Now you'll get back the shipping statuses of all your orders, and it's easy to filter just for the ones that are delayed.

Email affected customers

Now that we know which customer orders are delayed in shipment, we can send a quick, apologetic note using the Send emails by row step. You'll want to drag the Send emails by row step out and hook it up to the rest of your flow. Next, you let Parabola know which column contains your customers' emails, and personalize the message. You can use curly braces to customize the messages: simply wrap the column name with curly braces and Parabola will substitute in the value found in that column as it moves through each row in the list.