Add Rules

Add rules to your rates to hide, show, or adjust the ship cost based on a variety of conditions and variables

ASR avatar
Written by ASR
Updated over a week ago

When you are setting up the app for the first time, first see if using rules is enough to accomplish your requirements. 

In the next section we will cover how to use product groups. But, before you try adding product groups, see if the logic and conditions of rules can achieve your goals. 

Add a rule

Edit any rate in the app, by clicking Edit Rates next to a product group, and then clicking Edit next to the rate. This will open the rate. 

Scroll down and locate the Rules section. 

In the Rules section you can choose a rule type from the dropdown menu and then click Add Rule to configure it. 

Explore the Variables you can use to set your conditions.

Explore how to target those variables, whether it's any, each, or all, of products in the group or order. 

Then choose a comparison operator

And then enter the values. You can enter a single value or multiple comma separated values. Learn more about using comma separated values

You can also decide to add additional conditions by clicking + Add Condition

Choose a different variable and value. 

Then save the rule.  

This rule will hide the Free Shipping rate when the Title of any product in the order contains either 'Watermelon' or 'Potato' and the total weight of the products from the group exceeds 10lbs.

Targeting products within rules

For rules that target products as a condition here are the three main variables you can use:

  • Title

  • Vendor

  • SKU

Tags, Collections, Product Type or not available.

And then you can use the following comparisons:

  • equals

  • contains

  • starts with

  • ends with

  • is not equal to

  • does not contain

  • does not start with

  • does not end with

So you can have a rules like: 

  • Set rate to free shipping... when... Title... of any product... contains... 'Apple'

  • Add to ship cost.... $10... when... SKU... of any product... ends with... '-10'

  • Hide rate when... Vendor... of any product... equals... 'Acme' 

The available variables ( Title, Vendor, SKU ) are based on the information that Shopify provides in their request for rates. 

If you aren't currently using SKUs, then SKU is a good way to categorize and target products in rules.

For instance, if you are trying to hide a rate when a certain group of products are present, you could add a "-H" to the end of each SKU for those products. 

Then you can use a rule like this:

  • Hide rate when....SKU....of any product....ends with...'-H' 

If you are using SKUs, perhaps you can hijack the Vendor field instead, if the Vendor isn't being used for anything important. 

For instance, if you are trying to offer free shipping on some products within different vendors, and your two vendors are 'Acme' and 'Globex', you can change the vendor fields for some products from 'Acme' to 'Acme Free Shipping', and from 'Globex' to 'Globex Free Shipping'. 

Then you can use a rule like this: 

  • Only show rate when...Vendor...of each product...contains...'Free Shipping'

If you absolutely cannot make use of Title, SKU, or Vendor, then you can make use of the "Product Property" variables, which requires adding liquid code to your theme to convert any product variable into a Line Item Property, which can be accessed by the app at checkout. 

Learn more about Rules

For a more in depth explanation and illustrations of using Rules, and how the logic of rules get evaluated, and other tips and tricks visit the link below. 

Next in Getting Started

Getting Started with Advanced Shipping Rules

Before you Start

Configuring Rates

Testing Rates and Going Live

Common 'gotchas' while setting-up the app

Did this answer your question?