KnoCommerce's Shopify Flow integration sends survey answers to Shopify Flow, Shopify's automation tool. When a customer answers a KnoCommerce survey, you can automatically tag the order or customer, save the answer to a metafield, send a Slack message, open a Gorgias ticket, add a row to a Google Sheet, or trigger a Postscript SMS automation, with no manual steps.
Shopify Flow is available on Analyst or higher plans and requires the KnoCommerce Shopify Checkout Extension.
Quick-start templates
Want to start fast? Install a ready-made template (requires Shopify Flow). Click a template name below, or in Shopify Flow open Templates and search for Kno.
Template | What it does |
Adds each answer as a tag on the order | |
Adds each answer as a tag on the customer | |
Write a Kno survey response to an order metafield | Saves one question's answer to an order metafield |
Write a Kno survey response to a customer metafield | Saves one question's answer to a customer metafield |
Posts a Slack message for NPS scores of 0 to 6 | |
Creates a Gorgias ticket for NPS scores of 0 to 6 | |
Adds a row to a Google Sheet for each answer |
See section 5, Template Details, for how each one works.
Postscript tip: There's no Postscript template, but you can use one of the tagging templates to tag the customer or order with a survey answer, then use that tag as a trigger or filter in Postscript to send a targeted SMS. For example, follow up with customers who answered a question a certain way. See the Postscript integration guide.
Table of Contents
Prerequisites
Setting Up Shopify in KnoCommerce
Configuring Questions to Pass to Shopify Flow
Setting Up in Shopify Flow
Template Details
Testing and Validation
Troubleshooting
Data Passed to Shopify Flow
1. Prerequisites
Before you begin, make sure you have:
A KnoCommerce Checkout Extension survey. Your survey must be deployed through KnoCommerce's Checkout Extensibility, on the order confirmation/thank-you or order status page. KnoCommerce only sends an answer to Flow when it's linked to both a Shopify order and a Shopify customer, which is what these surveys provide. Surveys shared by direct link or custom embed aren't supported for Flow.
A Shopify store with Flow access. Shopify Flow is a free Shopify app for stores on the Basic plan and above. If you haven't already, install Shopify Flow from the Shopify App Store and make sure you can open it from your Shopify admin.
2. Setting Up Shopify in KnoCommerce
You need two integrations turned on in KnoCommerce: the core Shopify integration and the Shopify Flow integration.
Connect Shopify. Go to Settings > Integrations > Shopify (quick link) and make sure your store is connected. If it isn't, complete the setup. It only takes a minute or two.
Enable Shopify Flow. Go to Settings > Integrations > Shopify Flow (quick link), click Connect, then click Enable Integration. The card shows Connected when it's on.
3. Configuring Questions to Pass to Shopify Flow
You choose which questions send their answers to Flow, one question at a time.
Go to Surveys and create a new survey or open an existing one in the editor.
Select a question and open its Integrations tab.
Turn on Add Response to Shopify Flow. (This switch is greyed out until the Shopify Flow integration is enabled in step 2.)
Repeat for each question whose answers you want in Flow.
Save and publish the survey. If it's a new survey, deploy it to your Shopify checkout/thank-you page.
Blocks that don't collect an answer, such as HTML or promo blocks, don't have an Integrations tab.
4. Setting Up in Shopify Flow
How the KnoCommerce trigger works
One run per question, not per survey. KnoCommerce sends a separate event for each Flow-enabled question a customer answers. If a survey has three Flow-enabled questions, every workflow that uses the KnoCommerce trigger runs three times. Use conditions (for example, on the question text, question type, or survey title) to act only on the questions you care about.
A workflow must be on. KnoCommerce only sends answers while at least one workflow using the KnoCommerce trigger is turned on. Answers submitted while all of them are off aren't sent when you turn a workflow back on.
Order and customer data are included. Along with the survey data (see section 8), the trigger gives your workflow the Shopify order and customer, so you can use fields like the customer's email or name in conditions and actions.
Option A: Start from a template
In your Shopify admin, go to Apps > Shopify Flow.
Open Templates and search for Kno.
Choose a template and install it.
Complete any blank fields (see section 5), name the workflow, and turn it On.
Option B: Build your own workflow
In your Shopify admin, go to Apps > Shopify Flow. (If you don't see it, install Shopify Flow from the Shopify App Store first.)
Click Create workflow.
Click Select a trigger, search for KnoCommerce, and select New Survey Response.
Add the conditions and actions you need using Flow's visual builder. KnoCommerce data such as the survey title, question, answer, customer, and order is available as variables when you insert them into a step.
Name the workflow and turn it On (the toggle in the top-right corner).
5. Template Details
Tag orders / Tag customers
Each answer becomes its own tag. Multiple-choice answers get one tag per choice.
These templates have no condition, so they tag answers to every Flow-enabled question. To tag only certain questions, add a condition, for example on the question text.
Commas in an answer become "/" (Shopify uses commas to separate tags), and line breaks become spaces.
Order tags are cut off at 40 characters. Customer tags are cut off at 255 characters
Save Kno survey answers to Shopify metafields
Two Shopify Flow templates save a Kno survey answer to a Shopify metafield. Each template has three steps:
Trigger: runs when someone answers a Kno question that has Add Response to Shopify Flow turned on.
Condition: checks that the answer is for the question you chose.
Action: saves the answer to the metafield you chose.
Setup
You need to set two things before you can turn the workflow on:
Condition step: paste the question text.
Copy it from the Kno survey editor. Don't copy it from a live survey and don't retype it. It has to match exactly, including spaces, apostrophes and emoji.
If the question uses personalization, keep the placeholder exactly as the editor shows it.
If the same question text is used in more than one survey, add a second condition on the survey title.
Update metafield step: choose the metafield. Pick an existing metafield from the list, or choose unstructured metafield and enter a namespace and key.
How answers are saved
Single answers are saved exactly as given.
Multiple-choice answers are joined with commas, for example
Instagram, TikTok, Friend.Line breaks become spaces.
Good to know
One question per workflow. To save another question, install the template again. Don't skip the condition step: without it, every question's answer goes into the same metafield and overwrites the one before.
Runs for other questions are normal. The workflow runs for every Flow-enabled question. When the answer is for a different question, the condition stops it and nothing is saved.
If you edit the question text in Kno, update the condition to match. Until you do, answers stop being saved, and Flow doesn't show an error.
Don't use double quotes (") in the question text or the survey title. Because of a known issue, answers to those questions aren't sent to Flow. Apostrophes are fine.
Single line text metafields only. Date and list metafields need a different answer value.
Moving from Shopify Tagging? Your existing metafields should already be in the list. Pick them there instead of typing the key again.
Negative NPS: Slack notification / Gorgias ticket
Both templates run only when the question is an NPS question and the score is 0 to 6 (a detractor).
The message or ticket includes the customer's name and email, the survey title, the question, the score, when it was answered, and the order ID.
Before turning the workflow on, choose your Slack channel, or review the Gorgias ticket settings.
Sync to a Google Sheet
Each answer is added as a new row. Because KnoCommerce sends each question separately, a survey with three Flow-enabled questions adds three rows.
Before turning the workflow on, choose the spreadsheet and worksheet, and set which KnoCommerce fields go in each row.
6. Testing and Validation
After setup, test the integration:
Submit a test response. Place a test order on your store (you can use a test payment method) so you reach the order confirmation page where the survey appears. Fill out the survey and submit it. The response must come from the Shopify checkout/order confirmation page to trigger Flow.
Check the workflow runs. In Shopify Flow, open your workflow and check its run history. You should see one run for each Flow-enabled question you answered, each with a timestamp and a status such as "Succeeded."
Confirm the data. Open a run's details and check that the KnoCommerce variables contain the right text and your actions used the right values. This confirms you turned on every question you meant to and are using the correct variables.
If the runs show up and the actions work as expected, your KnoCommerce to Shopify Flow integration is working! 🎉
7. Troubleshooting
KnoCommerce trigger isn't visible in Flow
Make sure both the Shopify integration and the Shopify Flow integration are enabled in KnoCommerce (section 2).
Make sure Shopify Flow is installed and you can open it from your Shopify admin.
The workflow didn't run when a survey was submitted
Confirm the Shopify Flow integration is enabled in KnoCommerce. Turning on Add Response to Shopify Flow for a question isn't enough on its own.
Confirm the question has Add Response to Shopify Flow turned on.
Confirm the workflow is turned On, not left as a draft. KnoCommerce only sends answers while at least one KnoCommerce workflow is on.
Confirm the response came from a Checkout Extension survey on the thank-you/order status page, not a direct link or custom embed.
Check the question text and survey title for double quotes ("). Because of a known issue, answers to those questions aren't sent to Flow. Apostrophes are fine.
The workflow runs, but the action doesn't happen
Open the run and check which condition stopped it. Remember the workflow runs once for every Flow-enabled question, so runs that stop at the condition are normal for questions you aren't targeting.
For metafield templates: if you edited the question text in KnoCommerce, paste the new text into the condition.
Answers are missing or incorrect in Flow
Make sure each question you need has Add Response to Shopify Flow turned on in its Integrations tab. Each question must be turned on separately.
Still not working?
Try re-authenticating the KnoCommerce app in Shopify and re-enabling the Shopify Flow integration in KnoCommerce.
Check the Shopify Flow run details for error messages on individual steps.
Contact KnoCommerce support.
8. Data Passed to Shopify Flow
Each event contains details about the question, survey, customer, and order. In addition to the fields below, your workflow can use the Shopify order and customer themselves.
Question
Account ID: KnoCommerce account ID
ID: KnoCommerce question ID (Flow labels this "Current Question Response ID"). It's the same for every answer to that question.
Type: The question type, for example NPS
Value: The answer, as a list. Single answers have one item; multiple-choice and ranking answers have one item per choice.
Label: The question text
Answered At: When the question was answered
Survey
ID: KnoCommerce survey ID
Title: Survey title
Completed At: When the survey was completed
Customer
Customer ID: Shopify customer ID
Lifetime Order Count: Number of orders the customer has placed
Lifetime Total Spent: Total amount the customer has spent
Order
Order ID: Shopify order ID
Total Price: Total price of the order
Currency: Currency of the order

