Export Using Shopify Flow and Fivetran

This document outlines instructions on sending your post-purchase survey data to your data warehouse using Shopify Flow and FiveTran.


Shopify Plus Only

Shopify Flow is only available for those on Shopify Plus.

Shopify Flow Setup

For initial Shopify Flow setup, follow our Shopify Flow integration instructions here.

Export Using HTTP Post

Webhook functionality and a queryable API are both currently on our roadmap for 2021. Until then, if you need to push your EnquireLabs post-purchase survey data into your database, you can use the combination of Shopify Flow and an ETL solution. In this doc, we'll outline how to set up the pipeline using FiveTran.

Getting Started:

  • Create a FiveTran account and set your database as your destination.
  • Install Shopify Flow. We’ll be using Flow’s send http request functionality.
  • In FiveTran, select Add Connector --> Webhook
Select WebhookSelect Webhook

Select Webhook

On the following page, you'll be presented with options to setup your Webhook connection.

  • Set your Destination scheme (this will most likely be public)
  • Add your table name (i.e. enquire_responses)
  • Sync Format should be Unpacked given you want the JSON object we'll pass through to FiveTran to be split into multiple columns

Keep scrolling and until you get to Webhook URL. Copy the URL as you'll need to paste into your Shopify Flow. Select Save and Test.

Create a new workflow

In Shopify Flow, create a new workflow with Enquire - New Survey Response as your trigger. Next, add External - Send http request as your action.

Next, fill in the available fields with the below information:

  • HTTP Method: Post
  • URL: paste the webhooks URL you copied from StitchData
  • Headers: Key: Content-Type, Value: application/json
  • Body: this is where you’ll input what attributes you want to pass from Enquire and Shopify to your database. If you used “order_id” as your primary key, make sure you include that. The below JSON can be copied into the body section and will pass your order id, order name, survey question, and survey response.
  "order_id": {{order.id}}, 
  "order_name": "{{order.name}}",
  "question_id": {{trigger.questionId}},
  "question": "{{trigger.question}}", 
  "response": "{{trigger.response}}"

After you’ve filled in all the fields, click “Save” located in the upper right-hand corner and name your new workflow. To set your workflow live, simply click the on/off toggle next to the save button.

You’re all set. Enquire survey data will now start feeding into your database. If you have any questions, don’t hesitate to reach out to us at [email protected]

Export To Google Sheet

Shopify Flow has a native Google Sheet integration that allows you to export push your EnquireLabs survey data directly to a Google Sheet in real-time.

Did this page help you?