> For the complete documentation index, see [llms.txt](https://responsive-media.gitbook.io/advanced-free-shipping/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://responsive-media.gitbook.io/advanced-free-shipping/core-concepts/how-it-works.md).

# How It Works

## The Basics

Every shipping discount has two main parts:

1. **Conditions** - When should the discount apply?
2. **Targets** - Which shipping rates get discounted, and by how much?

## Conditions: When Does the Discount Apply?

Conditions are the requirements customers must meet to get the discount. You can add as many conditions as you need, and **all conditions must be met** for the discount to apply.

### Simple Example: Free Shipping Over $50

The most common shipping discount:

**Condition**: Cart total ≥ $50\
**Target**: All shipping rates → Free

If the cart is $50 or more, shipping is free. Simple.

### Multiple Conditions (AND Logic)

When you add multiple conditions, **all of them must be true**:

**Example: Free shipping for US orders over $50**

* Condition 1: Cart total ≥ $50
* Condition 2: Country is US

Both must be met: The cart must be $50+ **AND** the customer must be in the US.

{% hint style="info" %}
Think of multiple conditions as "all of these requirements together." Every condition narrows who qualifies.
{% endhint %}

### Common Condition Combinations

{% tabs %}
{% tab title="Location + Value" %}
**Free shipping for California orders over $50**

* Cart total ≥ $50
* Province is CA

Must meet both the value threshold and location requirement.
{% endtab %}

{% tab title="Product + Customer" %}
**Free shipping on winter coats for VIP customers**

* Product contains "Winter Coat"
* Customer tag contains "VIP"

Must have the product AND be a VIP.
{% endtab %}

{% tab title="Multiple Products" %}
**Free shipping when cart has both Product A and Product B**

* Product contains "Product A"
* Product contains "Product B"

Both products must be in cart.
{% endtab %}
{% endtabs %}

## Targets: What Gets Discounted?

Targets define which shipping rates get the discount and how much:

### Which Rates?

* **All shipping rates** - Discount applies to every shipping option
* **Cheapest rate** - Only the lowest-cost option gets discounted
* **Specific rates** - Target rates by name (e.g., "Standard Shipping")

### Discount Types

* **Free** - Shipping becomes $0
* **Percentage off** - Reduce by a percentage (e.g., 50% off)
* **Fixed amount off** - Reduce by a dollar amount (e.g., $5 off)
* **Fixed price** - Set to a specific price (e.g., flat $3 shipping)

{% hint style="info" %}
Learn more about discount types in the [Discount Types](/advanced-free-shipping/core-concepts/discount-types.md) guide.
{% endhint %}

## Complete Example

**Goal**: Free shipping for US orders over $50

**Setup**:

* Condition 1: Cart total ≥ $50
* Condition 2: Country is US
* Target: All shipping rates → Free

**How it works**:

* US customer, $60 cart → ✓ Both conditions met → Free shipping
* US customer, $40 cart → ✗ Cart too small → Normal shipping
* Canada customer, $60 cart → ✗ Wrong country → Normal shipping

***

## Advanced: Multiple Rule Groups (OR Logic)

{% hint style="info" %}
Most users won't need this feature. If you're just starting out, you can skip this section.
{% endhint %}

By default, all your conditions work together (AND logic). But what if you want to give customers **multiple different ways** to qualify?

That's where **rule groups** come in. Each rule group is a separate set of conditions, and customers only need to meet **one** rule group to get the discount.

### When to Use Multiple Rule Groups

Use multiple rule groups when you want "either/or" logic:

* VIP customers or orders over $100
* US orders over $50 or Canadian orders over $75
* Buy from Collection A or buy from Collection B

### Example: VIP or High Value

**Goal**: Free shipping for VIPs OR anyone spending $100+

**Setup**:

* Rule Group 1: Customer tag contains "VIP"
* Rule Group 2: Cart total ≥ $100
* Target: All shipping rates → Free

**How it works**:

* VIP customer, $30 cart → ✓ Rule Group 1 met → Free shipping
* Regular customer, $150 cart → ✓ Rule Group 2 met → Free shipping
* Regular customer, $30 cart → ✗ Neither rule group met → Normal shipping

### Example: Regional Thresholds

**Goal**: Different cart minimums for different countries

**Setup**:

* Rule Group 1:
  * Country is US
  * Cart total ≥ $50
* Rule Group 2:
  * Country is CA
  * Cart total ≥ $75
* Target: All shipping rates → Free

US customers need $50. Canadian customers need $75.

{% hint style="info" %}
For more details on multiple rule groups, see [Multiple Rule Groups (OR Logic)](/advanced-free-shipping/advanced-features/multiple-rule-groups.md).
{% endhint %}

***

## How Discounts Are Evaluated

When a customer reaches checkout:

1. Check all conditions in the first rule group
2. If all conditions are met → Apply discount ✓
3. If not, check the next rule group (if you have multiple)
4. If no rule groups match → No discount

{% hint style="info" %}
For most discounts with just one rule group, it's simple: do all the conditions match? If yes, apply the discount.
{% endhint %}

## Best Practices

<details>

<summary>Start Simple</summary>

Begin with 1-2 conditions. Most successful shipping strategies are straightforward: "Free shipping over $50" or "Free shipping for US orders over $50."

</details>

<details>

<summary>Test Your Logic</summary>

Use Test Mode to verify your discount works as expected. Enter \*\*ABC123\*\* as the first name at checkout to test.

</details>

<details>

<summary>Use Clear Names</summary>

Name your discounts descriptively: "US Free Shipping $50+" tells you exactly what it does.

</details>

<details>

<summary>Don't Over-Complicate</summary>

More conditions = fewer customers qualify. Only add conditions that truly matter for your business.

</details>

## Next Steps

* [**Browse All Conditions**](/advanced-free-shipping/conditions-cart-and-order/cart-total.md) - See all available condition types
* [**Discount Types**](/advanced-free-shipping/core-concepts/discount-types.md) - Learn about free, percentage, and fixed discounts
* [**Use Cases**](/advanced-free-shipping/common-use-cases/use-cases.md) - Copy real-world discount examples
* [**Test Mode**](/advanced-free-shipping/core-concepts/test-mode.md) - Learn how to test discounts safely


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://responsive-media.gitbook.io/advanced-free-shipping/core-concepts/how-it-works.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
