Create a Shopify Reorder URL to simplify the checkout flow for your customers. The URL sends customers to a pre-populated cart containing the items from their most previous purchase. It works particularly well if you sell products that your customers reorder from you on a regular basis.
Before Getting Started
If you haven't already integrated your Shopify and Drip accounts together, you can learn how to connect your store in our Guide.
Build Your Shopify Reorder URL
The entire concept of the reorder URL relies on a cart permalink which is universal to all Shopify stores (learn more). Review that article for a more technical run-down of how the permalink URL works in regards to Shopify.
The following is the template you'll follow to build your own reorder URL to use in Drip.
your-store.myshopify.com/cart/{% for item in event.order.items %}{{ item.upstream_product_variant_id | url_encode }}:{{ item.quantity }},{% endfor %}?checkout[email]={{ subscriber.email }}&checkout[shipping_address][first_name]={{ event.order.shipping_address.first_name }}&checkout[shipping_address][last_name]={{ event.order.shipping_address.last_name }}&checkout[shipping_address][address1]={{ event.order.shipping_address.address_1 }}&checkout[shipping_address][address2]={{ event.order.shipping_address.address_2 }}&checkout[shipping_address][city]={{ event.order.shipping_address.city }}&checkout[shipping_address][zip]={{ event.order.shipping_address.zip }}
Copy and paste the entire template you see above into any text editor, such as a Word document, or note-taking application on your computer.
There is quite a bit of Liquid code included with the URL. You do not need to modify the code, and it is universal to all accounts, and no prior experience with Liquid required.
The only modification that must be made is to replace 'your-store.myshopify.com' with the URL to your own Shopify store.
If you've set up a custom domain for your store, it's likely you won't see 'myshopify' in your URL.
Here's how the URL would look for a storefront domain of drip.com:
drip.com/cart/{% for item in event.order.items %}...
Now that you have your own reorder URL, in the next section, we'll show you how you can send it to your customers.
Send the URL to Your Customers
When it comes to implementing your reorder URL, it must be placed in an Automation Email following a specific trigger event in order for it to work. Using the Trigger Event, Order created, the reorder URL dynamically pulls in the information it needs to round itself out (see Event Properties). When customers click on the URL in an email, they'll be redirected to a cart full of the same items from their previous order.