> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecharlie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Combined Rules

> Create advanced routing rules using multiple conditions

Combined rules let you create sophisticated order routing logic by combining multiple conditions. Build rules that consider cart value, customer status, tags, and product collections together.

<Info>
  Combined rules are **preference rules**—they prioritize locations rather than block them.
</Info>

## How combined rules work

A combined rule evaluates multiple conditions and routes matching orders to specific location groups. You define:

1. **Conditions** — What criteria must be met (cart, customer, product)
2. **Operator** — How conditions are evaluated (AND / OR)
3. **Location groups** — Where matching orders should route

## Available conditions

| Condition              | Description                          | Operators                               |
| ---------------------- | ------------------------------------ | --------------------------------------- |
| **Total quantity**     | Total number of items in the cart    | Greater than, Less than, Equal to, etc. |
| **Total amount**       | Cart value in your store currency    | Greater than, Less than, Equal to, etc. |
| **B2B status**         | Whether the customer is a B2B buyer  | Is B2B, Is not B2B                      |
| **Customer tag**       | Tags assigned to the customer        | Has any of, Has none of                 |
| **Product collection** | Collections containing cart products | Is in any of, Is not in any of          |

## Condition operators

### Number conditions (quantity, amount)

| Operator                  | Description                         |
| ------------------------- | ----------------------------------- |
| **Greater than**          | Value must exceed threshold         |
| **Less than**             | Value must be below threshold       |
| **Equal to**              | Value must match exactly            |
| **Greater than or equal** | Value must meet or exceed threshold |
| **Less than or equal**    | Value must be at or below threshold |
| **Not equal to**          | Value must be different             |

### List conditions (tags, collections)

| Operator                           | Description                                        |
| ---------------------------------- | -------------------------------------------------- |
| **Has any of / Is in any of**      | Matches if ANY selected value is present           |
| **Has none of / Is not in any of** | Matches if NONE of the selected values are present |

## Match conditions: AND vs OR

| Operator                                | Behavior                                            |
| --------------------------------------- | --------------------------------------------------- |
| **All conditions must match** (AND)     | Order must meet EVERY condition to trigger the rule |
| **At least one condition matches** (OR) | Order needs to meet just ONE condition to trigger   |

<Tip>
  Use **AND** for precise targeting (e.g., high-value B2B orders). Use **OR** for broader rules (e.g., VIP customers or large orders).
</Tip>

## Create a combined rule

<Steps>
  <Step title="Go to Order Routing">
    Navigate to **Charlie → Settings → Order routing** or **Shopify → Settings → Shipping and delivery → Order routing**.
  </Step>

  <Step title="Add a Combined rule">
    Click **Add rule** and select **Combined location rule**.
  </Step>

  <Step title="Name your rule">
    Give your rule a descriptive name (e.g., "VIP high-value orders", "B2B wholesale routing").
  </Step>

  <Step title="Add conditions">
    Click **Add condition** and configure each one:

    * Select condition type
    * Choose operator
    * Set value(s)
  </Step>

  <Step title="Choose match operator">
    Select whether **all conditions must match** (AND) or **at least one condition matches** (OR).
  </Step>

  <Step title="Configure location groups">
    Add location groups to define
  </Step>
</Steps>
