# Workflow condition: An event occurred
_zwfp61x7.jpg)
* New to workflows? Take a quick look at[How workflows work](https://docs.foxecom.com/xflow-app/workflows/how-workflows-work) and[Understanding workflow conditions](https://docs.foxecom.com/xflow-app/workflows/understanding-workflow-conditions) to get up to speed.
* You can also check out the [Workflow condition: Customer criteria](https://docs.foxecom.com/xflow-app/workflows/understanding-workflow-conditions/workflow-condition-customer-criteria) to unlock more flexible workflow paths.
## Description
**An event occurred** condition checks whether a specific customer action or system event has happened.
How to use
* **Event:** Select event type.
* **Email:** Select the email used in any action within the workflow (*Optional* — leave blank to apply to all emails).
## Available events
| Available events | Condition | Evaluates to | Use case |
| --------------------- | ----------------------- | --------------------------------------------------------------- | ----------------------------------------- |
| Email opened | `email.opened` | True if customer opened any email in this workflow | Send follow-up only if customer engaged |
| Email clicked | `email.clicked` | True if customer clicked any link in the email | High-intent customers get priority offers |
| Customer unsubscribed | `customer.unsubscribed` | True if customer opted out of notifications | Stop all further communications |
| Customer purchased | `customer.purchased` | True if customer bought the product (within attribution window) | Stop follow-ups after conversion |
*Explore more*: [Available triggers, actions, and conditions](https://docs.foxecom.com/xflow-app/workflows/available-triggers-actions-and-conditions)
## Example of workflow condition: An event occurred
**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**
**→ Action (If False):** Send email (Send win-back email with special offer)

**Trigger:** New customer sign up
**→ Action:** Send email (Send promotional email with CTA links)
**→ Action:** Wait (Wait for email delivery and potential click)
**→ Condition: An event occurred -** **Email clicked** (Check if customer clicked email link)
**→ Action (If True):** Add customer tags (Tag customer as engaged)
⚠️ Without **CTA links in your email**, the “Email clicked” event cannot be detected.

**Trigger:** New customer sign up
**→ Action:** Send email (A marketing or promotional email is sent to the customer)
**→ Action:** Wait (The workflow pauses (e.g., for 7 days) to monitor the customer's interaction with the email)
**→ Condition:** **An event occurred - Customer unsubscribed**
**→ Action (If True):** Update subscription status - Cancelled (If the customer chose to opt-out, the system automatically updates their profile status to Cancelled to stop all future marketing)
_3IvX6LMu.jpg)
**Trigger:** Product restock
**→ Action:** Send email (Send an initial "back in stock" notification to customers who requested an alert)
**→ Action:** Wait (The workflow pauses for 1 day to give the customer time to see the first email and complete a purchase)
**→ Condition:** **An event occurred - Customer purchased** (if the customer has made a purchase since the initial notification was sent)
**→ Action (If False):** Send email (if the customer has not purchased, send a follow-up "low stock warning" email to create urgency)

## Best practices
* **Add a Wait step:** Include a **Wait action** before adding a condition. This gives your customers a little breathing room to open the email and check out your message.
* **Include a clickable link:** If you want to track **Email clicked**, make sure your email includes a button or link. No link \= no clicks to track 😉
* **Create urgency with follow-ups:** Use the **False** path (for customers who haven’t purchased yet) to send a friendly reminder, such as a *“Limited stock available!”* message. This can help encourage last-minute conversions.
* **Keep your mailing list clean:** Use the **Unsubscribe** condition to automatically remove users who opt out. This helps maintain a healthy list and ensures you’re only communicating with engaged subscribers. *Learn more:* [How the unsubscribe link works?](https://docs.foxecom.com/xflow-app/email-templates/email-templates-faqs/how-the-unsubscribe-link-works)
## Related articles
How workflows work
Available triggers, actions, and conditions
Get started with workflow templates library
Create a workflow