Skip to main content

How to use Customer Fields with Shopify Flow

Use triggers and actions in Flow to automate tasks

Customer Fields works with Shopify Flow, so you can automate work that would otherwise be manual or need another app. Customer Fields' triggers start a workflow when a customer submits a form or is approved. You can then send staff an email, create a Gorgias ticket, update a Google Sheet and much more, using Flow's own actions and other Flow apps.

In this article

Use Customer Fields triggers to start a workflow

Customer Fields adds three triggers to Shopify Flow. Which one you use depends on the form's account options:

  • Customer submitted form: for forms set to Default (or Require email verification, on Legacy customer accounts). It starts when a form creates or updates a customer in Shopify.

  • New pending customer created: for forms set to Require account approval. It starts when someone submits the form, before they're a customer in Shopify.

  • Customer approved: also for Require account approval forms. It starts when you approve a pending customer and they're created in Shopify.

Account approval needs the Advanced plan, so the last two triggers only fire on that plan.

Use conditions to customize your workflows

Add conditions to a trigger to do different things based on what was submitted. Some useful ones:

  • Form ID equals: if you have several forms, act differently depending on which one was submitted.

  • Customer email includes: filter by email domain. For example, If customer email includes @heliumdev.com runs an action only for staff.

  • Form payload includes: check for a specific answer on the form. For example, If form payload includes "account_type":"Wholesale" runs an action only for wholesale customers.

The Customer approved trigger has no form ID or form payload, only the customer. To check an answer there, use the customer's metafields (see below).

Popular use cases

You can connect a workflow to almost any action in Shopify or a Flow-compatible app, or several at once. Some popular ones:

  • Send an internal email or Slack notification: Customer Fields has basic staff notifications built in, but Flow gives you more control.

  • Add a new row to a Google Sheet: keep track of customers or a specific piece of custom data in a spreadsheet.

  • Grant reward points in Yotpo or another rewards app: start new customers off with some points when they create an account.

Access metafield data in Flow

In the examples below, replace DATA_COLUMN_KEY and VALUE with your data column's key and the value you're looking for.

Use a metafield value in a Flow condition

  • With Customer submitted form or New pending customer created, use the form payload:

    If form payload includes "DATA_COLUMN_KEY":"VALUE"
  • With Customer approved, or any other trigger that includes the customer, check the customer's metafields instead:

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

Use Liquid to access metafields in actions

With some Liquid, you can include customer data in internal emails or pass metafield values to other Flow apps. Flow's Liquid is different from storefront or email Liquid. For those, see Metafield data in Liquid.

  • With any trigger that includes the customer, this outputs the value of a Customer Fields metafield:

    {% for metafields_item in customer.metafields %}
      {% if metafields_item.namespace == "app--960624--helium"
        and metafields_item.key == "DATA_COLUMN_KEY" %}
          {{metafields_item.value}}
      {% endif %}
    {% endfor %}

    Data columns created with older versions of the app may use the customer_fields namespace instead. If the value comes out empty, try that.

  • To link to the customer's record in Customer Fields, use the Customer details URL variable with New pending customer created. With any other trigger that includes the customer, build the link with:

    https://app.customerfields.com/customers/{{customer.id | remove: "gid://shopify/Customer/" }}

Did this answer your question?