# Test an email campaign

Testing ensures your restock emails trigger correctly **in a real storefront scenario**—from subscription to restock and delivery.

{% hint style="info" %}
🎥 Walkthrough:&#x20;

[Watch our tutorial on testing the Global restock campaign end to end.](https://youtu.be/zyZZ5rRRHnI?si=zHH30e7-RNX3N-8W\&t=92)
{% endhint %}

{% hint style="info" %}

## Before you begin

Make sure you have:

* Your **campaign is created and Active**
* A **workflow is assigned** to the campaign
* An **email template** is selected in the workflow
* The product or variant you're testing is **out of stock**.

*Learn more:* [Create and launch a Restock campaign](/xflow-app/campaigns/create-and-launch-a-restock-campaign.md)
{% endhint %}

### Step-by-step: Test your email campaign

{% stepper %}
{% step %}

#### Check the “Notify me” widget on the storefront

{% hint style="success" %}

1. Open a product page for an **out-of-stock** item
2. Confirm the **Notify me** button or form is visible.
   {% endhint %}

If the widget doesn’t appear:

* Verify the product or variant is out of stock
* Make sure **XFlow Helper** is enabled in your theme
* Confirm the campaign status is **Active**
  {% endstep %}

{% step %}

#### Subscribe using the Notify me form

{% hint style="success" %}

1. Click the **Notify me** button
2. Enter a test email address
3. Submit the form
   {% endhint %}

**What to expect**

* A success message confirms the subscription
* The subscriber is saved in XFlow
  {% endstep %}

{% step %}

#### Restock the product (real-world test)

{% hint style="success" %}

1. Go to **Shopify admin > Products > Inventory**
2. Add inventory to the product or variant you subscribed to
3. Make sure the item becomes available for purchase.
   {% endhint %}

XFlow detects the restock automatically.
{% endstep %}

{% step %}

#### Confirm the email is sent

:white\_check\_mark: The assigned workflow runs

:white\_check\_mark: The back-in-stock email is sent based on your workflow timing

:white\_check\_mark: Delivery, opens, and purchases are tracked automatically

{% hint style="info" %}
If your workflow includes delays, wait for the configured time before checking your inbox.
{% endhint %}
{% endstep %}
{% endstepper %}

### What XFlow tracks for you

Once the campaign is triggered, XFlow automatically tracks:

* Email delivery status
* Email opens
* Purchases after notification

No additional setup is required.

### Related articles

{% content-ref url="/pages/tebcwaMIILdhj9EY0qrJ" %}
[Create and launch a Restock campaign](/xflow-app/campaigns/create-and-launch-a-restock-campaign.md)
{% endcontent-ref %}

{% content-ref url="/pages/95rbgFu8mYIAcHMimSPV" %}
[Manage campaigns](/xflow-app/campaigns/manage-campaigns.md)
{% endcontent-ref %}

{% content-ref url="/pages/Krk1ahZFMPcXWu3fDlwj" %}
["Notify me" widget: FAQs](/xflow-app/notify-me-widget/notify-me-widget-faqs.md)
{% endcontent-ref %}

***

#### 📩 **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_test_an_email_campaign&#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/campaigns/test-an-email-campaign.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.
