# Understanding workflow triggers

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

## What are triggers

Triggers define **when a workflow starts**.

A trigger listens for a specific event. When the trigger occurs, the workflow is automatically executed, and relevant data is passed to subsequent workflow steps.

{% hint style="info" %}
Every workflow can have only 1 trigger. Without a trigger, a workflow cannot run.
{% endhint %}

## Types of triggers

<table data-full-width="false"><thead><tr><th width="110.33953857421875">Event</th><th width="176.09197998046875">Event type</th><th>When it fires</th><th>Data available</th></tr></thead><tbody><tr><td>Product restock</td><td><strong><code>product.restocked</code></strong></td><td>Inventory changes from 0 to > 0</td><td><p><code>Product/variant ID</code></p><p><code>Inventory level</code></p><p><code>Subscriber list</code> </p><p><code>Campaign ID</code> </p><p><code>Restock timestamp</code></p><p><code>Location/warehouse</code></p></td></tr><tr><td>Customer signed up</td><td><strong><code>customer.signed_up</code></strong></td><td>Customer submits "Notify Me" form</td><td><p><code>Email</code></p><p><code>Product/variant ID</code> </p><p><code>Timestamp</code></p><p><code>Source</code></p><p><code>Consent</code></p></td></tr></tbody></table>

{% tabs %}
{% tab title="Product restock" %}

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

Starts when a product that was out of stock becomes available again.

{% hint style="info" %}
*Example:*

**Trigger:** Product restock\
→ **Action:** Send back-in-stock email<br>

Prebuilt workflow: [Send a back in stock notification](/xflow-app/workflows/get-started-with-workflow-templates-library/send-a-back-in-stock-notification.md)
{% endhint %}

{% hint style="success" %}
✨ Explore more pre-built workflow templates: [Get started with workflow templates library](/xflow-app/workflows/get-started-with-workflow-templates-library.md)
{% endhint %}
{% endtab %}

{% tab title="New customer sign up" %}

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

Starts when a customer signs up to be notified about a product in Notify me form

{% hint style="info" %}
*Example:*

**Trigger:** New customer sign up\
→ **Action:** Send welcome email\
\
Prebuilt workflow: [Welcome new subscribers with a discount email](/xflow-app/workflows/get-started-with-workflow-templates-library/welcome-new-subscribers-with-a-discount-email.md)
{% endhint %}

{% hint style="success" %}
✨ Explore more pre-built workflow templates: [Get started with workflow templates library](/xflow-app/workflows/get-started-with-workflow-templates-library.md)
{% endhint %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Learn more: [Available triggers, actions, and conditions](/xflow-app/workflows/available-triggers-actions-and-conditions.md)
{% endhint %}

## How triggers work

Triggers work automatically. Once set up, no manual action is needed for the workflow to run.

{% stepper %}
{% step %}
An event happens in the system (for example, a product comes back in stock).
{% endstep %}

{% step %}
The trigger listens for that event.
{% endstep %}

{% step %}
When the event occurs, the trigger automatically activates the workflow.
{% endstep %}

{% step %}
Event data is passed to the next steps in the workflow.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Want a full picture? Learn more about how workflows work: [How workflows work](/xflow-app/workflows/how-workflows-work.md)
{% endhint %}

## Common workflow triggers use cases

<table><thead><tr><th width="234.34881591796875">Trigger</th><th>Common use cases</th></tr></thead><tbody><tr><td>Product restock</td><td><ul><li>Send a notification to all waitlist subscribers once the subscribed product is back in stock</li><li>Alert the internal team about high-demand restock</li><li>Create a limited-time discount for waitlist customers</li><li>Implement VIP early access (send to VIPs first, then general waitlist)</li></ul></td></tr><tr><td>Customer signed up</td><td><ul><li>Send an immediate confirmation email</li><li>Thank the customer for signing up</li><li>Set expectations about notification timing</li><li>Offer signup incentive (e.g., discount for waitlist)</li></ul></td></tr></tbody></table>

## Examples of workflow triggers

{% hint style="info" %}

#### Example 1: Product restock

**Trigger:** Product restock

→ **Condition:** Customer criteria: Order count. **Order count > Greater than 0**\
→ **Action:** Create discount code\
→ **Action:** Send email\
\
🔗 Learn more: [Back in stock with exclusive discount for loyal customers](/xflow-app/workflows/get-started-with-workflow-templates-library/back-in-stock-with-exclusive-discount-for-loyal-customers.md)
{% endhint %}

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

{% hint style="info" %}

#### Example 2: New customer sign up

**Trigger:** New customer signs up

→ **Action:** Send an initial **welcome email** to the new customer.\
→ **Action:** Wait 3 days\
→ **Action:** Send a **follow-up brand story email**.\
\
🔗 Learn more: [Welcome email series for new subscribers](/xflow-app/workflows/get-started-with-workflow-templates-library/welcome-email-series-for-new-subscribers.md)
{% endhint %}

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

## Related articles

{% content-ref url="/pages/3ajXS0dZtcdbezZlA3XI" %}
[Available triggers, actions, and conditions](/xflow-app/workflows/available-triggers-actions-and-conditions.md)
{% endcontent-ref %}

{% content-ref url="/pages/NWmkFOfstlDd2472afEb" %}
[Create a workflow](/xflow-app/workflows/create-a-workflow.md)
{% endcontent-ref %}

{% content-ref url="/pages/2vPjRx3iv0sn0W8FiqsT" %}
[Assign a workflow to your campaign](/xflow-app/workflows/assign-a-workflow-to-your-campaign.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_understanding_workflow_triggers&#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/understanding-workflow-triggers.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.
