This article provides an overview of how to send Grapevine Survey events into Shopify Flow. It presumes that you have Shopify Flow installed in your store, that you are familiar with how to create workflows and that you have an intended destination for the Grapevine Survey response data.
Quick links
- Why should I use the Shopify Flow Triggers?
- Requirements
- What Flow Triggers are available?
- Creating a workflow to handle survey answers
- Testing your workflow
- Other Workflow actions
- Need any help?
Why should I use the Shopify Flow Triggers?
Our Shopify Flow Triggers allow you to pass survey response data directly into Shopify Flow for further processing. Whether you have other apps or systems connected to Shopify Flow, or you're just looking to push all of your survey data into a Google Sheet, our Flow Triggers provide a flexible solution that is seamlessly integrated within your Shopify environment.
Shopify Flow workflows can be set-up to analyse each survey response against a set conditions and take any actions necessary. For example, you may want to undertake certain actions when a particular response is received, like send an email to the admin team when a low NPS score is selected, or add a specific tag to an order. You may simply wish to send all survey responses into a Slack channel for the team to keep an eye on.
Our Shopify Flow triggers allow you to take control of your survey response data, providing you with unlimited flexibility over what happens to the data next.
Requirements
You'll need to have the Grapevine Surveys app installed into your store for our triggers to be available for selection in Shopify Flow. You will also need to be on a paid Grapevine Surveys plan for the Flow Triggers to work. If you wish to use our Flow Triggers, but are currently on a free Grapevine Surveys plan, you'll need to upgrade to a paid plan.
What Flow Triggers are available?
There are 3 Flow Triggers available for receiving Grapevine Surveys data into Flow. These are:
- Response started trigger
- Question answered trigger
- Response completed trigger
The question answered trigger will be the most used trigger as this contains the question asked as well as the answer provided by the respondent. The other two triggers will fire when a survey respondent has either begun answering the survey or when they have completed the survey. These can be used to analyse the completion rate of your survey within your connected tools/services.
Let's take a look at the triggers.
Response started trigger
This trigger will fire when a respondent has started responding to a survey. It indicates that at least one question in the survey has been answered. This will only fire once per survey response, regardless of how many questions are in the survey.
Request body properties (variables)
The following variables will be contained within the payload of this trigger:
surveyname - The name of the survey in the Grapevine Surveys app
surveycode - The unique identifier for the survey in the Grapevine Surveys app
surface - The surface where the survey response was created, e.g. osp, standalone, pos etc.
customerid - The unique Shopify customer ID of the respondent within your Shopify Admin (if identifiable)
externalid - An external id that can be used to link the survey response to customer or conversation within another system.
customername - A combination of the respondents first and last name (if identifiable)
customeremail - The respondents email address (if identifiable)
orderid - The unique Shopify order ID associated with the response (if identifiable)
ordername - The unique Shopify order name associated with the response (if identifiable)
ordertotal - The total value of the order including shipping and taxes associated with the response (if identifiable)
Question answered trigger
This trigger will fire each time a question in the survey is answered.
Request body properties (variables)
The following variables will be contained within the payload of this trigger:
surveyname - The name of the survey in the Grapevine Surveys app
surveycode - The unique identifier for the survey in the Grapevine Surveys app
surface - The surface where the survey response was created, e.g. osp, standalone, pos etc.
question - This is the text of your survey question
questioncode - Each survey question has it's own unique code in the Grapevine Surveys app
answer - For fixed response questions, this will be the value of the dropdown or radio box selected by the respondent. For open text questions, this will be the text entered by the respondent. For NPS questions, this will be the numerical value of the rating selected by the respondent.
customerid - The unique Shopify customer ID of the respondent within your Shopify Admin (if identifiable)
externalid - An external id that can be used to link the survey response to customer or conversation within another system.
customername - A combination of the respondents first and last name (if identifiable)
customeremail - The respondents email address (if identifiable)
orderid - The unique Shopify order ID associated with the response (if identifiable)
ordername - The unique Shopify order name associated with the response (if identifiable)
ordertotal - The total value of the order including shipping and taxes associated with the response (if identifiable)
Response completed trigger
This trigger will fire when a respondent has answered the last question in a survey. It will only fire once per survey response.
Request body properties (variables)
The following variables will be contained within the payload of this trigger:
surveyname - The name of the survey in the Grapevine Surveys app
surveycode - The unique identifier for the survey in the Grapevine Surveys app
surface - The surface where the survey response was created, e.g. osp, standalone, pos etc.
customerid - The unique Shopify customer ID of the respondent within your Shopify Admin (if identifiable)
externalid - An external id that can be used to link the survey response to customer or conversation within another system.
customername - A combination of the respondents first and last name (if identifiable)
customeremail - The respondents email address (if identifiable)
orderid - The unique Shopify order ID associated with the response (if identifiable)
ordername - The unique Shopify order name associated with the response (if identifiable)
ordertotal - The total value of the order including shipping and taxes associated with the response (if identifiable)
Next, we'll take a look at how to built a workflow and see one of the triggers in action.
Creating a workflow to handle survey answers
Begin by creating a new workflow within Shopify Flow.
Select the Grapevine Surveys triggers and then select the Question answered trigger:
Next, we need to add a condition to only handle responses from a specific survey.
To do this, visit the Grapevine Surveys app and from the surveys overview screen, click on your chosen survey to open the survey report view and then copy the unique survey code from the top of the page:
Now that you have the survey code, head back to your workflow and add a condition to Check if the survey code in the trigger matches the survey you want to handle responses for.
Search the available trigger variables in the right-hand settings panel and select the surveycode variable.
Make sure that the Equal to operator is selected and then paste your survey code in as the value:
It's up to you where you'd like to send that data. For the purpose of this test, we will log the output so that it can be seen within the workflow history.
Select Then on the condition that you have just created and select Action:
When the right-hand panel appears, type the word 'log' into the search field and then select the Log output action:
Copy the variables below:
Survey name: {{surveyname}}
Survey code: {{surveycode}}
Surface: {{surface}}
Question: {{question}}
Question code: {{questioncode}}
Answer: {{answer}}
Customer id: {{customerid}}
External id: {{externalid}}
Customer name: {{customername}}
Customer email: {{customeremail}}
Order id: {{orderid}}
Order name: {{ordername}}
Order total: {{ordertotal}}
Now paste those values into the Output field of the Log output action:
Give your workflow a name and then click the Turn on workflow button.
Confirm that you'd like to activate your workflow:
That's it!
Testing your workflow
The next time your selected survey receives a response, the Question answered trigger will be fired and the workflow will log the details of the survey response.
Select the workflow that you have just created and take a look at the Recent runs section at the bottom of the overview.
You should see that the workflow has a successful run:
Click on the run to view the run details and then scroll down to the bottom of the page.
Here you will see all of the survey response data logged into the workflow:
And that's it. Replace the logging action for any action that will push this data into a Flow connected system.
Other Workflow actions
Popular destinations that have actions within Shopify Flow are:
- Google Sheets - Push all survey responses into a Google Sheet for further analysis.
- Send internal email - Send a message to the team for each survey answer received.
- Send Slack message - Ping survey answers into your team's Slack channel to see real time answers to your survey questions.
If you need any help creating new workflows using our Triggers, then please do get in touch and let us know what you're looking to achieve. It's likely that we will need to request access to your store to assist with the set-up.