Checkout Rules

From Spiffy Stores Knowledge Base

Revision as of 12:29, 29 June 2024 by Admin (talk | contribs) (→‎Example Checkout Rules)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Article Level: Advanced

A Checkout Rule is a means of controlling the final part of the checkout process and allows the store owner to place limits on the quantities of items being purchased and to control the final selection of shipping and payment methods that are presented to the customer.

Checkout rules are available on our Pro plans or as an optional paid add-on, which can be enabled in the Accounts -> Add-ons section of your store's toolbox.

Creating Checkout Rules

To create a checkout rule, go to the Preferences -> Checkout rules section of your store toolbox, and follow the instructions below:

  1. Click the Add a Checkout Rule link
  2. Type in a description of the rule. This description may be displayed in the checkout, so make sure it means something to your customer.
  3. Select the rule action. You can choose to create a rule to
    • Deny Purchases
    • Deny Free Shipping
    • Set Maximum Quantity
    • Set Minimum Quantity
    • Set Quantity Range
    • Set a Shipping Tag
    • Set a Payment Tag
    • Disable Shipping Rates
  4. Enter the required quantities or tags as required for the rule action. A Shipping Tag or Payment Tag is a single word, starting with a letter and containing only letters and digits. The tag is used to associate the rule with a specific shipping rate or payment method.
  5. If rule is only going to run for a limited time, then enter a start date and optionally an end date. The rule will not be active until the start date and will no longer be available after the end date.
  6. You can associate a rule with a set of specific products, if required. The products can be selected by specifying which collection they belong to, or by specifying that all products with a specific product type, vendor or tag are to be used. If you don't specify a product, then the rule applies to all products.
  7. A rule can be configured so that it only triggers if a set of conditions are matched. Each of the conditions can be enabled by clicking does not check to change it to checks and then entering a value for the required limit.
    • Check the inventory level for the product. If the product variation in the cart is less than the specified value, then the rule is applied.
    • Check the quantity ordered. If the total quantity ordered for the product exceeds the specified amount, then the rule is applied.
    • Check the price of the product. If the price of the cart item is greater than the nominated limit, then the rule is applied.
    • Check the total value of the cart. If the total value of all items in the cart exceeds the specified limit, then the rule is applied.
    • Check the total value of the cart. If the total value of all items in the cart is less than the specified limit, then the rule is applied.
  8. The rule can be limited to only apply at certain times.
    • The rule is applicable at any time.
    • The rule can be limited to only apply between certain hours of the day, specified in 24-hour notation.
    • The rule can be limited to only apply outside certain hours of the day, specified in 24-hour notation.
    • The rule can be configured to only apply on one or more days of the week.
  9. Finally, the rule can be limited to apply to only a certain group of customers. You choose between the following options:
    • Only customers who have a specific customer tag.
    • All customers who don't have a specific tag.
    • Only customers shipping to a specific country.
    • All customers not shipping to a specific country.
    • Only customers shipping to a specific state/region within the store's country.
    • All customers not shipping to a specific state/region within the store's country.
    • Only customers shipping to an address that is less than or equal to a specified distance.
    • Only customers shipping to an address that is more than a specified distance.
  10. Once all the options have been selected, click Create Rule to add the rule to the list of checkout rules for your store.

Whilst checkout rules may appear complex at first, you will find that the advanced functionality provided by them makes it worthwhile to spend some time experimenting until you get it right. After you've created a rule, make sure you test it in your checkout to make sure you've set it up right!

Tagging Shipping Rates and Payment Methods

A rule may be created that generates either a shipping tag or a payment tag.

Shipping Rate Tags

A shipping tag allows you to override which shipping rates will be presented to the customer during the checkout process. If a shipping tag is present at checkout because a rule has triggered, then the only shipping rates that contain that tag will be available for the customer.

You can add a shipping tag to a shipping rate, by going to the Preferences -> Shipping & handling page and editing the required shipping rates. For each shipping rate, click on the rate to view the details of the rate. Click on edit to edit the rate.

A shipping tag can be added to a rate by entering one or more tags, separated by commas in the Shipping Tags field.

If a tag is added to a shipping rate, then that rate will only be displayed if a checkout rule specifies that tag as an action. If you want the shipping rate to be used even if there aren't any tags, then add the wildcard tag ("*") to the list of tags associated with the rate.

If no checkout rules are triggered that specify a shipping tag as an action, then all the untagged rates will be shown along with all rates that have a wildcard tag. If a tag is specified as part of a rule action, then only rates with that tag are displayed to the customer.

Save the results once you have finished.

Payment Method Tags

Payment methods can also be tagged in a similar fashion.

A payment tag can be added to a payment method when it is created or added at a later time by editing the payment method.

Tags are added to the payment methods in exactly the same way as shipping tags, including the use of wildcard tags. The tagged payment methods are also displayed in exactly the same fashion as shipping rates with tags.

Understanding Payment Method Tags

By default, all payment methods are available to all customers at all times. We can use the Checkout Rules to change the list of payment methods that the customer can use by creating one or more rules and conditions that use payment method tags.

It's important to understand that when a checkout rule is matched using a payment tag, that it's a positive selection of which payment method to display. The rule defines which payment methods to include in the list of payment methods available to the customer at checkout.

When no checkout rules have been matched, the default set of payment methods is displayed. This default set includes all payment methods which don't have a tag, and all payment methods that have a wildcard ('*') tag.

For example, no rules have been matched, so we'll see -

  • Payment Method 1 (No tags)
  • Payment Method 2 (Tag '*')
  • Payment Method 3 (Tag '*,tag3')
  • Payment Method 4 (Tag '*,tag3,tag4')

However, we won't see -

  • Payment Method 5 (Tag 'tag5')

Now, once a rule has been matched, we display all the payment methods associated with that tag, plus any wildcard methods.

For example, if we have a matched rule that specifies tag 'tag3', then well see -

  • Payment Method 2 (Tag '*')
  • Payment Method 3 (Tag '*,tag3')
  • Payment Method 4 (Tag '*,tag3,tag4')

Note that the untagged payment method was not included.

Now, if we have a matched rule that specifies tag 'tag4', then well see -

  • Payment Method 2 (Tag '*')
  • Payment Method 4 (Tag '*,tag3,tag4')

Note that the method tagged with '*,tag3' was not included, as the wildcard is only recognized if it is the only tag for the method. In this case, the wildcard is only used for the default set of payment methods if no rules have been matched.

Multiple rules can be matched using multiple tags, so if we end up with 'tag4' and 'tag5', we'd see -

  • Payment Method 2 (Tag '*')
  • Payment Method 4 (Tag '*,tag3,tag4')
  • Payment Method 5 (Tag 'tag5')

If you want to use logic that specifies that a payment method is not to be used, for example you don't want bank deposits to be available for customers who reside outside of Australia, then you need to reverse the logic to make the default set of payment methods exclude the bank payment method. The logic would then be reversed, and you would include bank payments if the customer is in Australia.

Also, to make this reverse logic work, you would need to add the wildcard ('*') to all untagged payment methods. We'd actually recommend that you do this anyway, as it means that you'll be less likely to get unexpected results when adding new checkout rules using payment tags.

Managing Checkout Rules

Once a rule is created, it is added to the bottom of the Checkout Rules list for the store. You can change the order in which rules are checked by dragging the required rule up or down the list into the required position with the drag icon on the left of the row containing the rule.

Rules can also be paused at any time, and once you have finished with a rule, it can be deleted.

Checkout Rules Processing for Customers

Once a rule is triggered at checkout, the customer will be presented with a special checkout page which shows the items in the cart that have exceeded the limits set by the rule. The customer is offered the choice of adding or removing items from the cart to try to match the rule's quantity limits.

Example Checkout Rules

We'll update this section further as more example uses for checkout rules pop up. They are so flexible and have some many uses that we think this section might grow pretty quickly.

Example Rule: Restrict a shipping rate so it only applies to customers that are within a certain distance from you

This is a two part tutorial. You first create a shipping tag, and you then add the tag to a shipping rate.

First, create the rule.

  1. Go to the Preferences > Checkout rules section of your store's admin.
  2. Click the Add a Checkout Rule button.
  3. For the Name, enter "Local Shipping" or whatever you prefer. For the Action, choose Set a Shipping Tag.
  4. In the Enter Shipping Tag field enter "LOCAL".
  5. Scroll down to the Rule is applied to all customers section, and click the options until you get to the "customers with shipping distance up to" option.
  6. Enter 5km (or whatever you prefer) in the Enter distance field.
  7. Click the Create Rule button.


Next, create the shipping rate.

  1. Go to the Preferences > Shipping & Handling section of your store's admin.
  2. Add a shipping rate. What kind of rate you add depends on how you have your shipping set up.
  3. For the Name, enter "Local Shipping" or whatever you prefer. For the Shipping Cost, set to zero if this is for a free pickup or free local delivery.
  4. Save your shipping rate, then click on it to edit it.
  5. Click the small edit link, and you'll see there's a new section titled Shipping Tags
  6. In the Enter Shipping Tag field enter "LOCAL".
  7. Click Save.
  8. Ensure you edit your other rates. You must add the "*" (wildcard) and "LOCAL" Shipping Tag to your other rates if you want local customers to see the other rates as well as this one. If you don't want them to, don't add it.

Example Rule: Disable Shipping Rates if the cart contains an item to cover shipping or local delivery

It's possible to use a Checkout Rule to disable the standard shipping rates that would normally apply.

You might like to do this if you've already added an item to the cart that covers the shipping costs. The cart item that covers the shipping costs would have a tag which can then be used to activate the Checkout rule that disables the standard shipping rates.

All standard shipping rates are disabled, including rates that are selected using Shipping Codes.