# Understanding workflow actions

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

## What are actions

Actions are tasks that are executed when triggered or after specific conditions are met.

{% hint style="info" %}
A workflow can have **one or more actions** chained together and run in sequence.
{% endhint %}

## Types of actions

<details>

<summary>💌 Send email</summary>

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

* **Subject:** Enter a custom subject line to replace the default subject in the selected email template.
* **Email template:** Choose the email template you want to send to the customer.

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

**Trigger:** Product restock\
→ **Action:** Send back-in-stock email
{% endhint %}

{% hint style="success" %}
Personalize your notifications using dynamic variables: [Understanding personalization variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md)
{% endhint %}

</details>

<details>

<summary>🔔 Send push notification</summary>

{% hint style="warning" %}
Sending desktop push notifications requires that the browser permission settings are configured to **allow notifications** from a specific website.

**How to allow notifications in browser settings (User action)**

* 🌐 Google Chrome: <https://support.google.com/chrome/answer/3220216>
* 🦊 Mozilla Firefox: <https://support.mozilla.org/en-US/kb/push-notifications-firefox>
* 🔵 Microsoft Edge: <https://support.microsoft.com/en-us/microsoft-edge/manage-website-notifications-in-microsoft-edge-0c555609-5bf2-479d-a59d-fb30a0b80b2b>
* 🍎 Safari (Mac): <https://support.apple.com/en-vn/guide/safari/sfri40734/mac>
* 📱 Safari (iPhone/iPad — iOS 16.4+): Settings > Notifications > Safari and enable Allow Notifications.
  {% endhint %}

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

* **Title**: The title appears at the top of the notification. Use variables to personalize the message.
* **Body:** The main message of the notification, used to share details or prompt action.

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

**Trigger:** Product restock

**→ Action:** Send email (Send a back-in-stock notification to customers who requested a restock alert)

**→ Action:** Wait (Wait 1 day)

**→ Action:** Send push notification (Send a push notification to remind the customer the item is back)
{% endhint %}

{% hint style="success" %}
Personalize your notifications using dynamic variables: [Understanding personalization variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md)
{% endhint %}

</details>

<details>

<summary>📩 Send internal email</summary>

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

* **Email of recipient:** Enter the internal email address that should receive this notification.
* **Subject:** Add a subject line for the internal email, or use variables to include dynamic information.
* **Content:** Write the message to be sent in the internal email.

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

**Trigger:** New customer sign-up

**→ Action:** Send email (Send a welcome email containing a link to a high-value catalog or offer)

**→ Action:** Wait (Wait 2 days for the customer to interact)

**→ Condition:** An event occurred - Email clicked (Check if the customer clicked the link in the email)

**→ Action (If True):** Send internal email (Notify the sales team that this is a "Hot Lead" because they engaged with the content)
{% endhint %}

{% hint style="success" %}
Personalize your notifications using dynamic variables: [Understanding personalization variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md)
{% endhint %}

</details>

<details>

<summary>⏳ Wait</summary>

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

* **Time & Unit:** Set how long the workflow should wait before moving to the next step.

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

**Trigger:** New customer sign-up

**→ Action:** Send email (Send an initial welcome email)

→ **Action:** Wait (Wait 3 days before follow-up)

**→ Action:** Send email (Send follow-up brand story email)
{% endhint %}

</details>

<details>

<summary>🎁 Create discount code</summary>

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

* **Discount code:** Enter the custom code you want to generate or click “Generate random code” to create one automatically.
* **Discount type:** Select the type of discount you want to apply (Percentage/Fixed amount).
* **Discount value:** Specify the value of the discount based on the selected discount type.
* **Combinations:** Choose which types of discounts this code can be combined with, such as product, order, or shipping discounts.

{% hint style="success" %}
This code is only valid for the **specific customer and product** selected in the workflow.
{% endhint %}

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

**Trigger:** Product restock

**→ Condition:** Customer criteria - Order count (Check if the customer has multiple orders)

**→ Action (If True):** Create discount code (Create an exclusive VIP discount code)

**→ Action:** Send email (Send a back-in-stock notification email that includes the exclusive discount)<br>

Take a quick look: [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 %}

</details>

<details>

<summary>🚀 Update subscription status</summary>

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

* **New status:** Select the subscription status you want to update the customer to.

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

**Trigger:** New customer sign up

**→ Condition:** Customer criteria - Accepts marketing = True

**→ Action (If True):** Update subscription status - Engaged (If they accepted marketing)

**→ Condition:** Customer criteria - Accepts marketing = False

**→ Action (If True):** Update subscription status - Cancelled (If they did not accept marketing)
{% endhint %}

</details>

<details>

<summary>🏷️ Add customer tags</summary>

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

* **Tags:** Enter the tags you want to use to categorize the customer, separated by commas.

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

**Trigger:** New customer sign up

**→ Condition:** Customer criterias - Order count (Check if the customer has more than 5 orders)

**→ Action (If True):** Add customer tags (Add the "VIP" tag to the customer profile)\
\
Take a quick look: [Tag VIP customers based on purchase history](/xflow-app/workflows/get-started-with-workflow-templates-library/tag-vip-customers-based-on-purchase-history.md)
{% endhint %}

{% hint style="success" %}
Personalize your notifications using dynamic variables: [Understanding personalization variables in email templates](/xflow-app/email-templates/understanding-personalization-variables-in-email-templates.md)&#x20;
{% endhint %}

</details>

<details>

<summary>🛒 <em>Create draft order (Coming soon)</em></summary>

</details>

<details>

<summary>💬 <em>Send message (Coming soon)</em></summary>

</details>

<details>

<summary>📱 <em>Send SMS (Coming soon)</em></summary>

</details>

## How actions work

{% stepper %}
{% step %}
A trigger starts the workflow.
{% endstep %}

{% step %}
The workflow runs each action using data from the trigger or conditions.
{% endstep %}

{% step %}
Each action runs only after the previous one has finished.
{% endstep %}

{% step %}
Information created or updated by one action can be used in later actions.
{% 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 %}

## Preview actions before running your workflow

When building a workflow, you can preview how each action works before activating it.

Preview mode lets you test your action settings (such as emails) using sample data, ensuring everything works as expected.

This is especially useful for:

* Checking email content and variables
* Verifying workflow logic
* Testing with real customer and product data.

Learn [Preview actions in a workflow](/xflow-app/workflows/preview-actions-in-a-workflow.md)

## Common workflow actions use cases

<table><thead><tr><th width="234.34881591796875">Action</th><th>Common use cases</th></tr></thead><tbody><tr><td>Send email</td><td><ul><li>Send back-in-stock notifications to customers</li><li>Deliver welcome or confirmation emails</li><li>Follow up with customers who didn’t purchase after restock</li><li>Send promotional or discount emails</li><li>Share order updates or important announcements</li></ul></td></tr><tr><td>Send push notification</td><td><ul><li>Notify customers when a product is back in stock</li><li>Send real-time alerts for time-sensitive offers or low inventory</li><li>Remind customers to complete a purchase</li><li>Announce limited-time promotions or discounts</li><li>Share important updates that require immediate attention</li></ul></td></tr><tr><td>Send internal email</td><td><ul><li>Alert inventory team when 100+ customers waiting</li><li>Notify manager of high-demand products</li><li>Daily digest of restock activity</li><li>Low inventory warnings with waitlist data</li></ul></td></tr><tr><td>Wait</td><td><ul><li>Delay follow-up messages after the initial notification</li><li>Give customers time to complete a purchase</li><li>Space out messages to avoid over-messaging</li><li>Create timed sequences (for example, wait 24 hours before sending a reminder)</li></ul></td></tr><tr><td>Create discount code</td><td><ul><li>Incentivize immediate purchase ("10% off if you buy today")</li><li>VIP exclusive discounts</li><li>Loyalty reward for patient waitlist customers</li><li>Limited-time urgency ("Code expires in 48 hours")</li></ul></td></tr><tr><td>Update subscription status</td><td><ul><li>Mark subscriptions as Delivered after a notification is sent</li><li>Update status to Engaged when a customer interacts with a message</li><li>Set status to Converted after a successful purchase</li><li>Mark subscriptions as Completed when the workflow finishes</li><li>Cancel subscriptions if the customer opts out or no longer qualifies</li></ul></td></tr><tr><td>Add customer tags</td><td><ul><li>Segmentation: "High-Intent-Customers", "VIP-Waitlist"</li><li>Product interest tracking: "Interested-Blue-Tshirt"</li><li>Engagement level: "Email-Engaged", "Never-Opened"</li><li>Lifecycle stage: "Waitlist-Converted", "Waitlist-Non-Converter"</li><li>Future targeting: Use tags in future campaigns</li></ul></td></tr><tr><td>Create draft order</td><td><em>Coming soon</em></td></tr><tr><td>Send message</td><td><em>Coming soon</em></td></tr><tr><td>Send SMS</td><td><em>Coming soon</em></td></tr></tbody></table>

## Examples of workflow actions

{% hint style="info" %}

### Example 1: Send email

**Trigger:** Product restock

**→ Action:** Send email (Send a back in stock notification to customers who requested a restock alert)\
\
🔗 Learn more: [Send a back in stock notification](/xflow-app/workflows/get-started-with-workflow-templates-library/send-a-back-in-stock-notification.md)
{% endhint %}

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

{% hint style="info" %}

### Example 2: Send internal email

**Trigger:** New customer sign up

**→ Condition:** Customer criterias - Order count: Check if customer has high order value (Proceeds if the condition is True)

**→ Action:** Send internal email (Notify sales team about high-value subscriber)\
\
🔗 Learn more: [Internal notification for high-value new subscribers](/xflow-app/workflows/get-started-with-workflow-templates-library/internal-notification-for-high-value-new-subscribers.md)
{% endhint %}

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

{% hint style="info" %}

### Example 3: Wait

**Trigger:** New customer sign up

**→ Action:** Send email (Send initial engagement email)

**→ Action:** Wait (Wait for email delivery and potential engagement)

**→ Condition:** An event occurred - Email opened (Check if "An event occurred")

**→ Action (If False):** Send email (Send win-back email with special offer)\
\
🔗 Learn more: [Win-back campaign for inactive subscribers](/xflow-app/workflows/get-started-with-workflow-templates-library/win-back-campaign-for-inactive-subscribers.md)
{% endhint %}

<figure><img src="/files/iXHxCpon1IV6s64bcLbS" 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_actions&#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-actions.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.
