Skip to main content
Custom Rules

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

Ryan Haidinger avatar
Written by Ryan Haidinger
Updated over a month ago

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 4 types of rule options available:

  • Character minimum

  • Character maximum

  • 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 your custom rules can begin to block checkout for customers who meet the requirements:

  1. Address Guard setup

  2. Shopify setup

Note: The Block Checkout functionality will not work until both steps are completed.


Step 1: 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.


Step 2: Shopify setup

Next, you'll need to enable the new Cart Validation Rule within your Shopify store. This is an important step, since the Block Checkout functionality will not work until this step is completed. 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.

Once the blocked characters are removed from checkout, the red outline will disappear and the customer will be allowed to continue with their order.


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?