Skip to main content

How to segment subscribers by metafield in Seguno Email Marketing

Segment subscribers by metafield in Seguno Email Marketing using popup answers, then send targeted newsletters or Shopify Flow emails.

You can segment subscribers by metafield in Seguno Email Marketing. Ask a question in Seguno Popups & Forms, save each answer to the subscriber's Shopify customer record, then send a targeted email to the segment.

This guide walks through the setup in five parts.

The steps use a fashion store example: a metafield named Shopping Style (custom.shopping_style) with three values: Classic & Timeless, Trend-forward, and Occasion-driven.

Prefer to click through the setup? Try the interactive Storylane demo.

On this page:

Parts 4 and 5 are two ways to email the segment. Use one or both.

Note:

In the Shopify admin sidebar,

  • Seguno Popups & Forms appears as Seguno Popups,

  • Seguno Email Marketing appears as Seguno Email,

  • Shopify Flow appears as Flow.


Before you begin

  • Install Seguno Popups & Forms and Seguno Email Marketing.

  • Install Shopify Flow if you plan to complete Part 5.

  • Create the metafield definition in Shopify before you publish the popup. If the popup is published first, existing customers won't have a value.

Seguno Popups & Forms supports these metafield types:

  • Single line text (single value)

  • Choice list (single value)

  • Email (single value)

  • Choice list (multiple values)

  • Date (single value)

Note:

A Shopify Flow workflow that triggers a Seguno marketing email requires a paid Seguno Email Marketing plan.


Part 1: Create a customer metafield in Shopify

A customer metafield stores one piece of custom data on each Shopify customer record. Seguno Popups & Forms saves each subscriber's answer to this field.

To name the metafield:

  1. From the Shopify admin, click Settings.

  2. Select Metafields and metaobjects.

  3. Select Customers.

  4. Click Add definition.

  5. In Name, enter a name for the metafield, for example, Shopping Style. Shopify creates the namespace and key below the field, for example, custom.shopping_style.

To set the type and values:

  1. Click the One drop-down next to Type.

  2. Select One value or List of values.

  3. Click Select type.

  4. Select Choice list (Single line text).

  5. Click Add description.

  6. Enter a description, for example, "Customer's preferred shopping style."

  7. Under Validation, enter the first value a subscriber can choose.

  8. Click Add item.

  9. Enter the next value.

  10. Enter each remaining value the same way, clicking Add item before each one.

Note:

One value stores a single entry for the metafield, and a List of values stores multiple entries. Seguno doesn't recommend a multiple-value choice list for email personalization. A choice list keeps every saved answer identical to one of your values, which keeps segments accurate.

To set customer access and save:

  1. Under Options, click the Customer Account API access drop-down.

  2. Select an access level.

  3. Click Save.

Option

What it does

No access

The default setting

Read

Customers can view the metafield in their account, for example, loyalty points, preferred sizes, or shopping styles

Read and write

Customers can view and edit the metafield in their account

Access is set per metafield, so one metafield can be Read while another is Read and write.


Part 2: Add the metafield to a popup or form

Add a Metafield field to the form section of a popup or form. Each answer a subscriber submits is written to that subscriber's customer metafield in Shopify.

To add the metafield field:

  1. From the Shopify admin sidebar, open Seguno Popups.

  2. Select Popups or Forms.

  3. Select an existing popup, or click Create popup.

  4. Click Customize.

  5. Select the Form section, or click Add section to add one.

  6. Click Add content.

  7. Select Metafield.

  8. Click the Metafield search field.

  9. Enter the metafield name, namespace, or key.

  10. Select the metafield, for example, Shopping Style.

To set how the question displays:

  1. Under Type, select Dropdown or Single-choice list.

  2. If you selected Single-choice list, select a Vertical or Horizontal layout.

  3. In Label, enter the question subscribers answer, for example, "What's your preferred style?"

  4. Optional: select Required so subscribers can't submit the popup without an answer.

To ask more than one question in the same popup, add a Metafield field for each metafield, starting from Add content.

To save and turn on the popup:

  1. Open the preview to confirm the question and values display correctly.

  2. Click Save.

  3. Toggle the popup on from the Popups page if it isn't active.


Part 3: Create a customer segment from the answers

A Shopify customer segment groups customers by their metafield value. Segment membership updates automatically as subscribers submit answers.

To create a metafield segment:

  1. From the Shopify admin, click Customers.

  2. Click the Expand icon on the segment creator.

  3. Click the segment builder.

  4. Enter the metafield name, or scroll through the list of filters to find it. Custom metafields start with metafields.custom.

  5. Select the metafield, for example, metafields.custom.shopping_style.

  6. Select = (Equals).

  7. Select the value to target, for example, Classic & Timeless.

  8. Click Run query.

  9. Click Save once the customer list shows the customers you want in the segment.

  10. In Segment name, enter a clear name, for example, Classic & Timeless Shoppers.

  11. Click Save.

The example segment uses this query:

WHERE metafields.custom.shopping_style = 'Classic & Timeless'

Note:

You don't need to filter the segment by email subscription status. Seguno Email Marketing sends only to subscribers who have opted in to email marketing, so the number of recipients may be lower than the segment size.


Part 4: Send a newsletter to the segment

Target a newsletter to the segment, sending content that matches subscribers' answers.

To send a newsletter to a metafield segment:

  1. From the Shopify admin sidebar, open Seguno Email.

  2. Select Newsletters.

  3. Open an existing newsletter, or click Create newsletter.

  4. In the Recipients section, click Edit.

  5. Select Subscribers within specific segments.

  6. In Search for segments, enter the segment name.

  7. Select the segment, for example, Classic & Timeless Shoppers.

  8. Click Save.

  9. In the Schedule section, click Send now to send immediately, or click Edit to choose a date and time.

Note:

A subscriber in more than one selected segment receives the newsletter once. A subscriber who is in both a targeted and an excluded segment doesn't receive the newsletter.


Part 5: Send a welcome email to the segment with Shopify Flow

A Shopify Flow workflow with the Customer joined segment trigger and the Seguno Email Marketing Send marketing email action emails subscribers when they join the segment.

To set the trigger:

  1. From the Shopify admin sidebar, open Flow.

  2. Click Create workflow.

  3. Click Select a trigger.

  4. In the trigger search bar, enter Customer joined segment.

  5. Select Customer joined segment.

  6. Click Select segment.

  7. Enter the segment name.

  8. Select the segment, for example, Classic & Timeless Shoppers.

To add the email action:

  1. Click the + node at the bottom of the trigger node.

  2. Select Action.

  3. Select Seguno Email.

  4. Select Send marketing email.

  5. Optional: click Add description.

  6. Optional: enter a name for the step, for example, "Classic & Timeless Shoppers welcome email."

To create the welcome email:

  1. In the Send marketing email panel, click Select template.

  2. Select a template, or select None (empty) to start from scratch.

  3. In Title, enter an internal name for the email.

  4. In Subject, enter the subject line.

  5. In Preview text, enter the preview text.

  6. Optional: to add a discount, under Discount, select Share the same code with all recipients or Generate a unique code for each recipient (recommended).

    1. Enter the discount name in the search field.

    2. Select the Shopify discount.

    3. Optional: select Automatically expire unused codes.

    4. Enter the number of days before unused codes expire.

  7. Click Create email.

  8. Enter the email content in the email editor.

  9. Click Exit to return to the workflow.

To turn on the workflow:

  1. Click Turn on workflow.

  2. Click Turn on.

Note:

The workflow emails only customers who join the segment after the workflow is on. Customers already in the segment don't receive the email, and segment join events can take a few minutes to trigger the workflow.


Common errors

Issue

Cause

Solution

A metafield doesn't appear in the Metafield search

Only certain metafield types are supported

Use one of the supported metafield types listed in this article

A customer's metafield value is blank after a submission

The field isn't required and the subscriber skipped it

Select Required on the field

Existing customers have no value

The popup was published before the metafield definition existed

Create the definition first, then collect the data again

The segment returns no customers

The metafield key in the query doesn't match the definition

Copy the exact key from the metafield definition

The Send marketing email step shows No email template has been selected

The email isn't created yet

Click Select template and create the email


Example

Fresh Skincare wants to recommend products by skin type. The team creates a customer metafield with the key custom.skin_type and the values Dry, Oily, Combination, Normal, and Sensitive.

Next, the team adds a required Metafield field to the signup popup. As subscribers answer, the team builds a segment for each skin type and recommends matching products in newsletters sent to each segment.


FAQs

Do I need to create the metafield in Shopify first?

  • Yes. Seguno Popups & Forms saves answers to an existing customer metafield definition. Seguno creates only its own engagement metafields.

Can I collect multiple metafields in a single popup?

  • Yes. Add a Metafield field for each metafield in the form section.

Does the Shopify Flow welcome email go to customers already in the segment?

  • No. The Customer joined segment trigger starts only for customers who join the segment after the workflow is turned on.

Do I need to filter the segment for email subscribers?

  • No. Seguno Email Marketing sends emails only to subscribers who have opted in to email marketing.

Can I use metafield values inside the email content?

Did this answer your question?