Skip to main content
A custom rule blocks checkout when the order meets conditions you choose. For example: block checkout when the cart contains a fragile product and the address is a P.O. Box.
Conditions describe the orders you want to block. If the conditions are true, checkout stops and the customer sees your message.

How a custom rule is built

A rule block with When Match set to All Conditions, two conditions joined by AND, and an action with a target and an error message.

One rule block: block US orders with a subtotal under $50.

Create a custom rule

1

Open the builder

On the Home page, click Add new rule and choose Custom Rule.
2

Name the rule

Under Rule Details, enter a Rule title that describes what the rule blocks, for example Minimum order for US. Only you see the title.
3

Choose a condition set

Under Choose condition set for this custom rule, click a set. Click N conditions on a set to see which conditions it includes. Sets that aren’t in your plan are marked with a badge.
You can’t change the condition set after the rule is saved. Switching sets before you save clears every condition you’ve added.
4

Add conditions

In the rule block, choose All Conditions or Any Conditions under When Match. Then, for each condition, choose a Field, an Operator and a value. Click + Add condition to add more.
5

Set the action

Under Action, choose the Target, which is where the message appears on the checkout page. Then write the message under Translation for error message. English is required.
6

Add more rule blocks (optional)

Click + Add another rule block to add another check, with its own conditions and message. With two or more blocks, choose a Rule Application Mode.
7

Check the preview and save

The Preview card on the right explains the rule in plain words, and lists anything that is still missing. Choose a status, then click Save.

Rule Application Mode

When a rule has two or more rule blocks, choose how they work together:
With Apply all matching rules, every matching block shows its message. With Apply only the first matching rule, checking stops at the first match and later blocks are skipped.
Every block is checked. Each block whose conditions match shows its own message. Use this when the blocks check unrelated problems.

Rule Complexity Budget

Shopify limits how much data a checkout rule can hold. The Rule Complexity Budget bar shows how much of the 10,000-byte limit your rule uses. When you go over the limit, the Save button is disabled. To reduce the size, remove conditions, use shorter values or messages, or split the rule into two rules.

Status and checkout behavior

Custom rules use the same Rule status (Active, Testing, Deactivated) and Checkout behavior settings as preset rules. See Rule status and testing and Common rule settings.
Custom rules don’t have a separate country setting. To limit a custom rule to certain countries, add a Country / region condition.

How many custom rules you can have

Deactivated custom rules don’t count toward the limit. When you reach it, the builder shows Custom rule limit reached with a link to upgrade.

Can’t find the condition you need?

Click + Request condition in the builder, or contact us. Tell us what you want to check, and we’ll let you know how to set it up.