# Loyalty program enrollment

<figure><img src="/files/B2XBb2vP1fEdcQIyL1gO" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

## Before you begin

Not sure where to use this template? Check out [Get started with workflow templates library](/xflow-app/workflows/get-started-with-workflow-templates-library.md)
{% endhint %}

## About this template

When a new subscriber signs up and has **made at least one purchase**, automatically **tag** them for loyalty program and send a **loyalty welcome email** explaining the benefits.

## Step-by-step guide to set up this template

{% stepper %}
{% step %}

### Trigger – New customer sign up

This trigger activates the workflow when a user submits a Notify me form on your store (not during checkout).

{% hint style="success" %}
📝 Learn more about triggers: [Understanding workflow triggers](/xflow-app/workflows/understanding-workflow-triggers.md)
{% endhint %}

<figure><img src="/files/fab4tW1hJAAPvTugbcnA" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Condition – Customer criterias: Order count

Set the condition to: **Order count → Greater than or equal to → 1**. This means the customer has placed at least one order.

{% hint style="success" %}
📝 Learn more about conditions: [Workflow condition: Customer criteria](/xflow-app/workflows/understanding-workflow-conditions/workflow-condition-customer-criteria.md)
{% endhint %}

<figure><img src="/files/NnKbyBxUTA0avMLvoyu9" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Action – Add customer tags

In **True** path, add a tag `loyalty member` to the customer to include them in your loyalty program.

{% hint style="warning" %}
In the **False** path, no further action is taken. If the customer has no orders, the workflow does nothing, no tag is added and no email is sent.
{% endhint %}

{% hint style="success" %}
📝 Learn more about actions: [Understanding workflow actions](/xflow-app/workflows/understanding-workflow-actions.md)

📝 Learn more about variables: [Understanding personalization variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md)
{% endhint %}

<figure><img src="/files/pOrBP9u2ROVd6OiTrm9T" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Action – Send email

Send a welcome email to the customer for the loyalty program.

{% hint style="success" %}

1. Enter the **email subject**.
2. Select the **email template** that you have prepared in advance.
   {% endhint %}

{% hint style="info" %}
If you don’t have an **email template** yet, check out [Create an email template](/xflow-app/email-templates/create-an-email-template.md)

Read more about the **variables** you can use in email: [Available variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates/available-variables-in-email-templates.md)
{% endhint %}

<figure><img src="/files/SfMpnuWzjpcpTCxNB7Wi" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="success" %}
All done! Returning customers are now automatically added to your loyalty program and welcomed with a special email.
{% endhint %}

{% hint style="info" %}
**🌟 Pro Tip:**

* Set the order count to **greater than or equal to 1** to identify returning customers.
* Use a clear and consistent loyalty tag for easy segmentation.
* Personalize the welcome email to highlight loyalty benefits:&#x20;
  {% endhint %}

## Common use cases

The **Loyalty program enrollment** workflow template is commonly used when:

* You want to automatically enroll returning customers into a loyalty program.
* You want to recognize and reward customers who have purchased before.
* You want to segment loyal customers for future campaigns.

***

#### 📩 **Need help?**

We’re here to make your XFlow experience smooth and successful.\
Our support team is always ready to assist you—no matter how big or small your question is.

<a href="https://admin.shopify.com/apps/xflow?chat=true&#x26;utm_source=foxecom&#x26;utm_medium=help_center_xflow_loyalty_program_enrollment&#x26;utm_campaign=cta_button&#x26;utm_term=chat_now" class="button primary" data-icon="comment-lines">Chat now</a> <a href="mailto:contact@help.xflow.so" class="button secondary" data-icon="envelopes">Message us</a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.foxecom.com/xflow-app/workflows/get-started-with-workflow-templates-library/loyalty-program-enrollment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
