How does Smart Tags work?

Rule-based tagging with Smart Tags

The power of Smart Tags comes from the ability to enable you to create complex tagging rules to fit your business needs. 

Smart Tags will then use these rules to decide if a product, order, or customer in your store should be tagged or have the tag previously added by Smart Tags to be removed or updated.

Types of Smart Tags rules

There are 2 types of Smart Tags rules:

- Preset Rules: These are a set of commonly-used tagging rules that majority of Shopify merchants find themselves frequently need for their businesses. We have made them readily available and easy to use for anyone to quickly get started.

- Custom Rules: For Shopify merchants that have complex business needs, Custom Rules enables them to define the rules to match their exact requirements. You can use any of the fields made available by Shopify’s API and more! 

Read more about available Smart Tags rules.


Keeping your tags in-sync with your rules

There are three (3) approaches that Smart Tags take to ensure that the tags are in-sync with your rules.

  1. Manually running the background job
  2. Real-time tagging
  3. Auto-scheduled reconcilliation task

1. Manually running the background job

The background job retrieves all products, order and customers from your store. It will then process each item with all the active Smart Tags rules that you have created, after which the tags will be added / removed / updated depending on these rules.

You manually click on the "Process and tag store” action on your Smart Tags dashboard to kick-start the background job to process the items in your store.

Usually, you would only need to run this when you have created new rules or have updated existing rules, so that the changes can be applied to your items. This will take the longest time to complete since it will need to re-process all items.

After running the background job, you can then rely on the Real-Time Tagging feature to keep your tags in-sync.

2. Real-time tagging

When certain events take place (for e.g when items are created/updated), Shopify will send webhooks to Smart Tags, The app will then proceed to process the items agasint the relevant rules in your store and update the tags accordingly.

For e.g if a product is updated, the product will be re-processed and its tag will be updated according to the active rules. 

This will ensure that the tags are in-sync as soon as possible.

Here’s a list of events that Smart Tags listens to and which kind tags are updated.

# Event Affected Tags
1 Product Created/Updated Product
2 Customer Created/Updated Customer
3 Order Created/Updated Order, Customer and the associated Product(s)
4 Order Line Item Fulfilled/Refunded Order and the associated Product(s)

3. Auto-scheduled reconcilliation task

At specified intervals, Smart Tags will run a reconcilliation task by retrieving all new / changed items since the last reconciliation task, and re-process it to ensure that all of these items has been processed and tag. 

By default, the interval is set to every six (6) hours. The interval can be set at Smart Tags > Settings > Auto-schedule Reconcile > Auto-schedule Interval.

This task is a fallback measure that ensure that tags are in-sync with your rules.