# 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>


---

# 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://squarebox-ai.gitbook.io/squarebox/campaigns/campaigns-with-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.
