Use Automatic Feedback Service with the Shopify Flow app

This feature is included in the Free, Plus, Premium, Advanced, and Enterprise plans.

Automatic Feedback Service (AFS) can be used with Shopify to automatically send review invitations to your customers after they make a purchase or have a service experience with your business. The simplest way to set this up is with the Shopify Flow app.

We already have a dedicated integration — however, you can use AFS as an alternative.

Please note that if you're already using our Shopify integration, you should not use AFS as well. Doing so will result in duplicate invitations being sent to customers.

Create workflow in Shopify

To get started, you’ll need to create a workflow via the Shopify Flow app. 

  1. Install the Shopify Flow app here.
  2. Log in to your Shopify account.
  3. Click Settings > Apps and sales channels > Flow.
  4. Hover over Flow, click the three dots, then click Open app.
  5. Click Create workflow > Select a trigger.
  6. Search for the triggers Order fulfilled or Order created in the search field on the top right corner.
  7. Add the action Then > Send internal email.Flow chart from the Shopify Flow app
  8. In Trustpilot Business, go to Get reviews > Invitation methods.
  9. Under Let us send review invites for you, click Get started. This will open the Automatic Feedback Service page.
  10. From here, copy your Unique Trustpilot email address.
  11. Go back to your work flow in Shopify, and navigate to the ACTION tab to the right. Here, in the Email address field, paste the Unique Trustpilot email address that you copied in the previous step.
  12. Fill out the Subject field as you prefer.
  13. In the Message field, add the invitation script in the form of an AFS structured data snippet. The Action tab on shopify to fill out invitation details
  • Here is an example of a simple AFS structured data snippet for service reviews, including dynamic Shopify placeholders:
<!--<script type="application/json+trustpilot">
{
"recipientName": "{{order.customer.displayName}}",
"recipientEmail": "{{order.customer.email}}",
"referenceId": "{{order.name}}",
}
</script>-->
  • Here is an example of an AFS structured data snippet with dynamic Shopify placeholders and information required for product review invitations:
<!--<script type="application/json+trustpilot">
{
"recipientEmail": "{{order.customer.email}}",
"recipientName": "{{order.customer.displayName}}",
"referenceId": "{{order.name}}",
"products": [{% for lineItems_item in order.lineItems %}
{"name" : "{{lineItems_item.name}}","sku":"{{lineItems_item.sku}}","productUrl":"{{shop.url}}/products/{{lineItems_item.product.onlineStoreUrl | split: "/" | last}}","imageUrl":"{{lineItems_item.image.url}}","gtin":"{{lineItems_item.variant.barcode}}"
}{% unless forloop.last %},{% endunless %}{% endfor%}]
}
</script>-->
  • If you would like to customize different templates sent out based on the location of the order, you can add the following snippet in addition to the above:
"locale": "{%- assign handle = order.billingAddress.countryCodeV2 -%}{%- case handle -%}{%- when "DE" -%}de-DE{%- assign template = "TemplateID1" -%}{%- assign productTemplate = "ProductTemplate1" -%}{%- else -%}en-GB{%- assign template = "TemplateID2" -%}{%- assign productTemplate = "ProductTemplate2" -%}{%- endcase -%}",
"templateId": "{{template}}",
"productReviewInvitationTemplateId":"{{productTemplate}}"
  • The snippet above contains a Liquid control flow ‘when…else’. This indicates that when the billing country is Germany or the UK, certain templates and landing pages must be applied. 
  1. Click Turn on workflow on the top right corner, then click Turn on when the button appears in the pop-up window.

Your automatic invitation is now set up — you’ll be able to get an overview of your invitation activity in your Trustpilot Business dashboard.

Related articles