All Collections
Customer Fields
Connected Apps
How to use Customer Fields with Shopify Flow
How to use Customer Fields with Shopify Flow
Use form triggers or access custom data in Flow to automate tasks
Brett Shelley avatar
Written by Brett Shelley
Updated over a week ago

With the integration of Customer Fields and Shopify Flow, you can now automate actions using the forms created in our app. You can use Customer Fields’ triggers within Flow to create workflows based on customer activity. You can trigger various actions such as sending customized email notifications to staff (internal only) when a pending customer is created, creating tickets in Gorgias when a certain form is submitted, or actions via other Flow-integrated apps.

Use Customer Fields form triggers to create automated actions

Set up a trigger

We have created two custom triggers in Flow for different types of forms based on the form's account options:

  • Default or Require email verification

    • Use the 'Customer submitted form' trigger to start an action when a customer is created or updated through your Customer Fields form.

  • Require account approval

    • Use the 'New pending customer created' trigger to start an action before the customer account is created in Shopify, which doesn't happen unless it is approved through the Customer Fields app.

Use conditional logic to customize your Flow (optional)

Shopify Flow allows you to add conditions to take different actions based on some criteria. Here are some example conditions you can use with Customer Fields:

  • Form ID equals

    • If you have multiple forms, this condition allows you to customize actions based on which form was submitted.

  • Customer email includes

    • You can filter for users with a specific email domain. For example, you could create a condition If customer email includes to create a specific action for staff users.

  • Form payload includes

    • This is a powerful condition that gives you access to all of the data collected on your form and allows you to create a condition that checks for a specific value. Say we have a form that asks the user to select if they are registering for a personal or wholesale account, we can use a condition like If form payload includes ”account_type”:”Wholesale” to create an action only for wholesale customers.

Automate an action

Now you can link your Flow to a huge variety of actions, or even multiple actions, through Shopify or other Flow compatible apps. Here are some ideas of popular actions that you can use:

  • Send an internal email or Slack notification

    • There's functionality for basic staff notifications built right into the Customer Fields app, but you can use this to have even more control and customization options.

  • Add a new row to a Google Sheet

    • Keep track of your customers or a specific piece of custom data in an external database.

  • Grant rewards points in Yotpo or many other rewards apps

    • Automatically start customers off with some rewards points when they create an account.

Access metafield data in Flow to create more powerful and customizable actions

❗ In all code examples below, be sure to replace DATA_COLUMN_KEY and VALUE placeholders with the actual data column name or value that you are looking for.

Using a custom metafield value in a Flow condition

  • If you are using one of the Customer Fields Flow triggers, you will have direct access to the form payload which includes all of the values collected on the form. You can create a condition based on a field value using this structure:

    If form payload includes ”DATA_COLUMN_KEY”:”VALUE”
  • If you are using a different Flow trigger that still provides access to the Shopify customer object, you can create a condition by looking directly at the customer metafields. When using this method, you may also want to add an optional second criteria to the condition to ensure that you are looking at the correct data column:

    If customer > metafields > value Equal to VALUE 
    If customer > metafields > key Equal to DATA_COLUMN_KEY

Using Liquid to access metafields in actions

Using some Liquid code, you can access customer metafields to create internal email notifications that include actual customer data or pass specific metafield values to other Flow compatible apps.

The Liquid syntax used in Shopify Flow is unique and should not be confused with using Liquid to display metafield data on the storefront or in an email template, if you are trying to do so, check out our guide here.

Here are some common examples of Liquid code that you can use in Flow:

  • When using any Flow trigger that provides access to the Shopify customer object, you can use this Liquid code to access the value for a specific Customer Fields metafield.

    {% for metafields_item in customer.metafields %}
    {% if metafields_item.namespace == "customer_fields"
    and metafields_item.key == "DATA_COLUMN_KEY" %}
    {% endif %}
    {% endfor %}
  • You can create a link that will take you directly to a specific customer's record in the Customer Fields app. This is especially useful if you want to manually review form submissions.

    • If you are using the Customer Fields 'New pending customer created' trigger, you can use our built-in variable for Customer details URL

    • If you are using any other trigger that provides access to the customer object, you can create your own URL using this Liquid code:{{ | remove: "gid://shopify/Customer/" }}

Download our pre-made Flow template

This template will help you set up email notifications for when a specific account approval form is submitted.

Did this answer your question?