# Complex rules

These examples show how to combine multiple conditions using nested groups. Use the **>** button to create subgroups with different match logic (all vs any).

<div data-with-frame="true"><figure><img src="/files/d1RedHsmIZrkmf2Gn2rC" alt="Rules editor showing condition groups" width="563"><figcaption></figcaption></figure></div>

## Training new employees

**Rule type:** Incoming message

A logistics company wants to help new routing staff learn company acronyms and response time requirements.

**Conditions (all must match):**

* Message sent to <routing@company.com> OR assignee is the new employee
* Message contains at least one abbreviation (ETA, POD, BOL, etc.)
* Label "Driver" is present
* Message has been in inbox for 5+ minutes

**Actions:**

* Add note with common acronym definitions
* Add note reminding of 15-minute SLA

<div data-with-frame="true"><figure><img src="/files/ygZUgYdjn4PMwQWET7Tj" alt="Nested conditions for training rule" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/191nmF9Gqcyz8CyMEtMT" alt="Result showing acronym help" width="563"><figcaption></figcaption></figure></div>

## Track invoices and payment reminders

**Rule type:** Outgoing message

A project manager sends invoices to two customers and needs to track payments.

**Conditions (any must match):**

* Recipient ends with @acme.com
* Recipients include both <lisa@company.com> AND <arthur@company.com>
* Attachment name ends with .pdf OR .xls

**Actions:**

* Add label "Project Beta Invoices"
* Set conversation color to yellow
* Snooze for 15 days (payment reminder)

<div data-with-frame="true"><figure><img src="/files/wMkoTpF0OasS0lm7MnYL" alt="Nested conditions for invoice tracking" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/RlfM7PhLQrtEwIchMQYv" alt="Result showing label and snooze" width="563"><figcaption></figcaption></figure></div>

## Quick to-do workflow

**Rule type:** User actions → New comment

A salesperson uses a shortcode (#td) to quickly move conversations to a to-do list.

**Conditions (all must match):**

* Comment is a task
* Comment text ends with "#td"
* User is assigned OR user initiated the action

**Actions:**

* Add label "To-do"
* Archive from inbox

<div data-with-frame="true"><figure><img src="/files/PUPJEkWPzjMhPQaZIVyu" alt="Nested conditions for to-do workflow" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/2Qd1o7KQAcbScPKWLLid" alt="Result showing to-do label" width="563"><figcaption></figcaption></figure></div>


---

# 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://missiveapp.com/docs/advanced-features/rules/examples/complex-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.
