# Exit Rules

Exit rules define when a customer should be removed from an automation workflow, ensuring they no longer receive unnecessary follow-ups once specific conditions are met. Retainful provides two key options for setting exit rules:

### **1. Placed Order**

This rule is based on a customer’s order history and includes flexible conditions:

* **Overall/Since the Start of the Workflow**: Tracks orders placed during or before the workflow.
* **Equals**: Removes the customer if the number of orders matches a specific value.
* **Greater Than or Equal To**: Exits customers who meet or exceed the specified number of orders.
* **Less Than or Equal To**: Removes customers whose order count falls within or below the defined limit.

<figure><img src="/files/mY6wdkbacO4eZJ1ScKPB" alt=""><figcaption><p>Placed Order</p></figcaption></figure>

### **2. Order Status**

This rule focuses on the status of an order and includes conditions like:

* Contains: Exits customers whose orders match a specific status (e.g., "Completed" or "Processing").
* **Does Not Contain**: Removes customers whose orders do not match the specified status.

<figure><img src="/files/H1PUorFg2FW4Hb3bjGiw" alt=""><figcaption><p>Order Status </p></figcaption></figure>

By configuring these exit rules, you can ensure your workflows remain efficient, relevant, and tailored to customer actions, enhancing their overall experience while reducing redundancy.

{% hint style="danger" %}
**NOTE**\
\
Exit rules are only available in **Post-Purchase Automation** workflows, as they are specifically designed to manage follow-ups based on customer purchase behavior.
{% endhint %}


---

# 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://help.retainful.com/automations/automation-workflow-settings/exit-rules.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.
