NEWDiscoverShipGoal– turn cart progress into bigger baskets
All articles

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 4 conditions in each group.

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.

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:

  1. Set Status to Live, select Save, and wait for Shopify sync to show Synced.
  2. Create a checkout that matches one full condition group. Confirm that the action changes only the expected shipping methods in every delivery group.
  3. Create a checkout that fails at least one required condition in each group. Confirm that the action does not change any shipping methods.
  4. 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.
  5. 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.