Custom Rules

Learn how to create custom address rules based on your shipping policies

Ryan Haidinger avatar
Written by Ryan Haidinger
Updated this week

Overview

The custom rules feature allows you to build unique logic requirements your brand has during the checkout process on your Shopify Store. For example, you may want to block a particular type of special character from appearing on Address Line 1. Address Guard will parse the address during checkout > catch any such characters > and then prevent the checkout from occurring until the customer fixes the issue.

Today there are 3 types of rule options available:

  • Character minimum

  • Prevent special characters

  • Custom block rule

You can add as many custom block rules as you like to ensure checkout matches your requirements.

Note: This feature is only available to Shopify brands.


Get Started

There are two steps to follow to ensure Custom Rules function on your store.

  1. Address Guard setup

  2. Enable Cart Validation in Shopify

Address Guard Setup

To begin setting up your custom rules, go to: Rules & Tags > Custom Rules

Once you're on the Custom Rules area, you can begin to setup your unique rules. Please follow these steps:

  1. Click Add Rule , on the top right.

  2. Select the type of rule from the Rule Type dropdown.

  3. Select which Address fields should be checked for this rule (via dropdown).

  4. Enter in the content condition for why this rule will trigger (i.e.: your custom text).

  5. Customize the error message which will appear to customers.

  6. Once completed, click Submit to finalize the creation of your new rule.

Shopify Setup

Next, we need to add the new cart validation rule to your Shopify store. This is a one-time process only.

  1. Click Settings on the bottom left.

  2. Click Checkout and scroll down to the very bottom area called Checkout rules.

  3. Click Add Rule , and select Cart Validation.

  4. Click the Cart Validation rule in the table and click Save, then click Turn on.

Note: Make sure the checkbox "Allow all customers to complete checkout" is not selected


How custom rules appear during checkout

When the customer enters in a value that is based on a custom rule you have enabled, a red error outline will appear around the checkout field, with your error message showing below it. The customer will be prevented from completing checkout, until the issue is resolved.


Supported Address Fields

Today we support all of the major address fields during Checkout including:

  • First name

  • Last name

  • Company

  • Address Line 1

  • Address Line 2

  • City

  • Zip Code

  • Phone

Did this answer your question?