> ## Documentation Index
> Fetch the complete documentation index at: https://codebeans-cb-checkout-rules.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom rule examples

> Ready-to-copy custom rules for common store policies.

Each example lists the condition set, the conditions and the action. Remember that conditions describe the orders you want to **block**.

## Minimum order amount for a country

Block orders to the United States with a subtotal under \$50.

| Setting | Value |
| - | - |
| Condition set | Condition Set 1 |
| When Match | All Conditions |
| Condition 1 | Country / region · Is one of · United States |
| Condition 2 | Subtotal amount · Is less than or equal to · `49.99` |
| Target | Top of the checkout page |
| Message | `Orders to the United States need a subtotal of at least $50.` |

## Block P.O. Boxes for heavy orders

Allow P.O. Boxes for small parcels, but block them when the order weighs 20 kg or more.

| Setting | Value |
| - | - |
| Condition set | Condition Set 1 |
| When Match | All Conditions |
| Condition 1 | PO Box address · Is a PO Box address |
| Condition 2 | Total weight · Is greater than or equal to · `20` |
| Target | Shipping address · Address line 1 |
| Message | `Orders over 20 kg can't be delivered to a P.O. Box. Please enter a street address.` |

## Products that can't ship to certain countries

Stop a product from being shipped outside the countries where you are allowed to sell it.

| Setting | Value |
| - | - |
| Condition set | Condition Set 1 |
| When Match | All Conditions |
| Condition 1 | Product · Is one of · *the restricted products* |
| Condition 2 | Country / region · Is not one of · *the countries you can ship them to* |
| Target | Shipping address · Country |
| Message | `One or more items in your cart can't be shipped to this country.` |

## Wholesale collection for tagged customers only

Only customers tagged `wholesale` can buy from your Wholesale collection.

| Setting | Value |
| - | - |
| Condition set | Condition Set 1 |
| When Match | All Conditions |
| Condition 1 | Collection · Is one of · Wholesale |
| Condition 2 | Customer tags · Does not have any of these values · `wholesale` |
| Target | Top of the checkout page |
| Message | `Wholesale products are only available to approved wholesale customers. Please log in to your account.` |

> [!NOTE]
>
> Customer tags are only known when the customer is logged in. Guests have no tags, so this rule blocks them too.

## Limit quantity per order

Limit each order to 5 items from a limited-edition collection.

| Setting | Value |
| - | - |
| Condition set | Condition Set 1 |
| When Match | All Conditions |
| Condition 1 | Quantity in collection · Is greater than or equal to · `6` · Collection: Limited edition |
| Target | Top of the checkout page |
| Message | `You can buy up to 5 limited-edition items per order.` |

## Block disposable email domains

| Setting | Value |
| - | - |
| Condition set | Condition Set 1 |
| When Match | Any Conditions |
| Condition 1 | Email · Has any of these values (partial match) · `@mailinator.com`, `@tempmail.com`, `@10minutemail.com` |
| Target | Contact fields · Contact email |
| Message | `Please use a permanent email address so we can send your order updates.` |

## Minimum order for B2B buyers

Requires the Growth plan or higher.

| Setting | Value |
| - | - |
| Condition set | Condition Set 3 |
| When Match | All Conditions |
| Condition 1 | Customer is B2B · Is true |
| Condition 2 | Subtotal amount · Is less than or equal to · `499.99` |
| Target | Top of the checkout page |
| Message | `Business orders need a subtotal of at least $500.` |

## Shipping and billing countries must match

Reduce fraud risk by requiring the same country for shipping and billing. Requires the Enterprise plan.

| Setting | Value |
| - | - |
| Condition set | Condition Set 4 |
| When Match | All Conditions |
| Condition 1 | Shipping and billing countries do not match · Is true |
| Target | Billing address · Country |
| Message | `Your billing country must match your shipping country.` |

## No local pickup for subscriptions

Requires the Enterprise plan.

| Setting | Value |
| - | - |
| Condition set | Condition Set 4 |
| When Match | All Conditions |
| Condition 1 | Any product in cart has a selling plan · Is true |
| Condition 2 | Selected delivery option type · Has any of these values · Local Pickup |
| Target | Top of the checkout page |
| Message | `Subscription orders can't be picked up. Please choose a delivery option.` |

> [!TIP]
>
> Test every new rule with the **Testing** status before you make it **Active**. See [Rule status and testing](https://codebeans-cb-checkout-rules.mintlify.site/rules/rule-status-and-testing.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.