This guide explains how to integrate the unique link of your on-site survey page into Shopify's Abandoned Checkout notification template, delivering the survey directly to the customer.
This article will involve customizing the survey URL and a short snippet of code in your Abandoned Checkout notification email. If you would like some help with this then please get in touch.
Locate and copy your on-site survey's unique URL
To locate the unique on-site survey code you wish to use in your abandoned checkout email, take a look at our article on how to find my unique survey code?
Adding a URL parameter to identify the respondent
The on-site survey page supports a number of variables that when incorporated into the on-site survey URL, can be used to identify the respondent.
For this step, we'll append the 'customer_id' parameter into our URL. Being the first and only URL parameter we will be using, it is preceded by a question mark '?' and then has an equals sign '=' added to the end, ready for a value to be added in the next step. 
Our URL should currently look something like this:
https://mystore.myshopify.com/tools/survey/64b51408bf775?customer_id=
Using Shopify Objects within the on-site survey URL
You can use Shopify Liquid Objects to populate URL parameters with dynamic values. Shopify Objects like the Customer ID be used to identify a survey response with a customer record in your Shopify store, without the respondent needing to type in their name or email address.
For more details, please see our guide Using Shopify Objects within the on-site survey URL
Including the Shopify Liquid Object as a value
The Shopify Liquid Object {{ customer.id }} should be added as the value for our customer_id URL parameter.
Your unique survey URL should now look something like this:
https://mystore.myshopify.com/tools/survey/64b51408bf775?customer_id={{ customer.id }}
Add the on-site survey URL to the notification template
Within your Shopify admin, go to Settings and then select Notifications from the options on the left hand side.
Scroll down the page and locate the Abandoned checkout Email template:
Click the Edit code button.
Place your modified survey URL within a link tag:
<a href="https://mystore.myshopify.com/tools/survey/74b31028bb335?customer_id={{ customer.id }}">Feedback survey</a>. 
Find a suitable area within the email to insert your survey link tag. If you decide to create a new section specifically for your survey link then it may be necessary to use matching HTML used elsewhere within your email template.
Introduce this survey section by posing a question and then adding a brief summary before the survey link. This will help call attention to what it is that you’d like the customer to do.
You may also wish to place the survey link within a 'button'. Be mindful not to distract the customer from the main priority of the email. For this reason we have used a darker colour for the Survey button.
In the example below we are using the default Shopify theme Dawn. We have used additional styling for the Survey section and button. Shopify's guide on how to edit their notification email templates can be found here:
Preview or send yourself a Test email:
Save the Email template
That's it! The Survey link will now be included within your Abandoned Checkout emails.
Clicking on the survey link from within the email
Clicking on the link will take the email recipient to your on-site survey page.
Because we included the URL parameter and a value for customer id, only the survey question is displayed:
In the example above we are using an Open Text type survey question to allow the customer to explain in their own words why they abandoned their cart. 
However, you may wish to use a Fixed Response type question instead:
One benefit that Fixed response surveys have over Open Text, is that the submission answer can be applied as customer and order tags.
Abandoned Checkout survey responses within Grapevine dashboard
Checking the responses within our survey dashboard we can see that the email of the customer associated with the abandoned checkout is displayed. Their name will also be listed if they had provided these details prior to abandoning their cart. As you might expect, there will be no value for the Shopify Order number column:
Need any help?
If you have any questions about the content of this article or any other Grapevine Surveys related question, then please do just get in touch.
