Choose when a shipping rule applies: conditions and groups
Use Shopify shipping rule conditions in When the rule runs to choose whether a ShipWith rule runs for every checkout or only when checkout details match.
Choose when the rule runs
- Always makes the rule's actions eligible to run for every delivery group and every available shipping method. You do not need to add conditions.
- When set conditions are met makes the rule's actions eligible only when at least one condition group matches. Add conditions to define the carts, customers, addresses, discounts, or shipping methods that the rule should affect.
If you select When set conditions are met, add at least one complete condition. An empty condition group does not match.
Combine conditions with AND and OR
Conditions in the same group use AND. Every condition in that group must match.
For example, use one group for a rule that should apply only when both of these statements are true:
- Cart subtotal is greater than or equal to
100. - Shipping country is one of
Canada.
Condition groups use OR. A rule can run when any one complete group matches.
For example, you could add a second group for Customer tag has any of VIP. The rule would then apply to either a Canadian order with a subtotal of at least 100, or an order from a customer tagged VIP.
Select Add condition (AND) to add another requirement to a group. Select Add group (OR) to add an alternative set of requirements. A rule can have up to 4 groups, with up to 10 conditions in each group.
Pick a condition
Add condition, Add condition (AND), Add group (OR), and the pencil on a condition card all open the condition picker. Use Search conditions to find a condition, then select it.
The picker lists every condition ShipWith offers. Some conditions cannot run together in one rule. Those appear greyed out under Can't be combined with your existing conditions, and you cannot pick them. When you change a condition with its pencil, that condition is left out of the check, so you can swap it for one that fits with the rest. The operators offered for a condition can also depend on your other conditions.
ShipWith picks the rule's Function input from its conditions. It keeps the current input while that input supports all of them, and otherwise switches to one that does. To see or change the input, open the Advanced card in the sidebar (Show advanced settings) and select the pencil to open Change function input. Inputs that do not support your conditions appear under Doesn't support your conditions.
Filter which shipping methods an action can change
The Shipping method condition checks the titles of the shipping methods currently available in a delivery group. It also limits the rule's actions to the methods that match the condition. Methods that do not match remain outside that rule's action targets.
For example, suppose a delivery group has Standard Shipping, Express Shipping, and Local Pickup. A group with these conditions:
- Shipping country is one of
United States. - Shipping method contains
Shipping.
matches Standard Shipping and Express Shipping, but not Local Pickup. The rule's actions can change the two matching methods only. Any method names or other targets set in an action narrow that matching set further.
This filtering happens separately for each available shipping method. It is different from a cart, customer, discount, or address condition, which normally matches or does not match for the delivery group as a whole.
Run a rule only when another method is shown
The Visible shipping method condition checks which shipping methods are still shown after your earlier rules ran. Unlike Shipping method, it does not limit which methods the actions can change. It only decides whether the rule runs.
Use it for upgrade options. For example, suppose you hide all methods and then other rules show Briefpost or Pakket under different conditions. Add a final rule with:
- Visible shipping method is one of
BriefpostandPakket(one title per line). - Action: Unhide specific delivery method(s)
Brievenbuspakket.
Brievenbuspakket then shows whenever one of the base methods shows, without copying their conditions.
This rule must run after the rules that show the base methods, so give it a later priority. Is not one of and does not contain match when none of the listed methods are shown.
How delivery groups affect matching
Shopify can divide one checkout into more than one delivery group, such as when products ship from different locations. ShipWith evaluates the rule separately for each group.
Cart-wide and customer conditions use the same checkout information in each group. Shipping address conditions use that group's delivery address, and Shipping method conditions use that group's available method titles. As a result, the same rule can match one delivery group but not another.
Test matching and nonmatching checkouts
Test both sides of the rule before relying on it:
- Set Status to Live and select Save. Check that the rule page shows no This rule is not running at checkout banner.
- Create a checkout that matches one full condition group. Confirm that the action changes only the expected shipping methods in every delivery group.
- Create a checkout that fails at least one required condition in each group. Confirm that the action does not change any shipping methods.
- If you use a Shipping method condition, test a group that has both matching and nonmatching method titles. Confirm that only matching methods can be changed by the rule.
- If the checkout has multiple delivery groups, check every group in both tests. A result in one group does not prove that the other groups matched.
For example, for a rule with Cart subtotal is greater than or equal to 100 AND Shipping country is one of Canada, test a Canadian checkout above 100 and another checkout that is below 100 or uses a different country. If the rule also requires Shipping method contains Express, confirm that an available Express Shipping method can be changed while Standard Shipping stays unchanged.
