> For the complete documentation index, see [llms.txt](https://squarebox-ai.gitbook.io/squarebox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://squarebox-ai.gitbook.io/squarebox/campaigns/campaigns-with-rules.md).

# Campaigns with Rules

A **Campaign with Rules** refines your audience dynamically by applying filters or conditions. Use this type for targeted communication that adjusts in real time based on customer attributes or behaviors.

**Steps to Create a Campaign with Rules:**

1. **Basic Campaign Setup**
   * **Name the Campaign**:
     * Example: **"Marathon Event - Location Reminder"**
   * **Select a Segment**:
     * Choose **"All Customers"** as the segment.
   * **Choose a Template**:

     * Select a pre-built reminder template or create one:

     **Example Template**:\
     \&#xNAN;*"Hi \[Name], this is a reminder for the 'Squarebox Marathon happening on \[Event Date]. Location: \[Event Location]. See you at the starting line!"*
2. **Apply Rules Dynamically**
   * Click **“Add Rule”** to filter registered participants:
     * **Condition**: **Registration = Yes**
   * This ensures the message is sent **only to participants who have registered** for the event.
3. **Schedule the Campaign**
   * Schedule the campaign to be sent **2 days before the event date**.
   * **Example Scenario**:
     * Event Date: **December 14th**
     * Schedule the campaign for **December 12th**.
   * The rules will dynamically include only those participants who meet the condition **(Registered = Yes)** at the time of sending.

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