All posts

Set Shopify Product Tags Automatically by Conditions

To set Shopify product tags automatically, create a product rule in SO: Auto Tags and select the product fields that must match. The rule applies the tags you specify when its AND or OR logic passes. Rules are evaluated in near real time from Shopify webhooks.

Match vendor, product type, title, or tags

Vendor, product type, title, and tags give a product rule four ways to use existing catalog values. Choose vendor or product type when the assigned value defines the group. Title can narrow the selection by product name, while a tags condition lets an existing tag qualify the product for another rule-applied tag.

  • Select vendor when products from one vendor need the same tag.
  • Choose product type when that field defines the products included.
  • Match title when the product name supplies the qualifying value.
  • Check tags when an existing classification should lead to another tag.

Choose the price field that controls the tag

Product rules support price, compare-at price, minimum variant price, and maximum variant price. Price and compare-at price let the rule evaluate those two product values separately. Minimum and maximum variant price cover the two ends of the variant price range, so choose the boundary that represents the products you want tagged.

  • Use price when the product price is the qualifying field.
  • Pick compare-at price when that comparison value should decide eligibility.
  • Set a minimum or maximum variant price condition when a range boundary controls the result.

Filter by inventory, status, publishing, or dates

Inventory quantity handles stock-based conditions. Status accepts active, draft, or archived, while published state provides a separate publication condition. Created date and updated date let the rule qualify products by those timestamps instead of relying only on catalog or price fields.

  • Apply inventory quantity when stock determines which products receive the tag.
  • Select active, draft, or archived as the required product status.
  • Choose published state when publication should control the match.
  • Add created date or updated date when timing defines the product group.

Combine product conditions with AND or OR

With AND logic, every condition must match before the rule applies its tags. With OR logic, any one matching condition is enough. A cleanup tag limited to one vendor, one product type, and active status calls for AND; a review tag that accepts either draft or archived status calls for OR.

  • Choose AND when all selected fields describe one narrow product group.
  • Choose OR when separate qualifying states should apply the same tag.
Rule controls for product tagging priority, enable state, and duplicated rules

Set the rule result, priority, and enable state

A rule stores a resource type, its conditions, AND or OR logic, the tags to apply, an enable flag, and a priority. Set the resource type to products, enter the tag result, and decide whether the rule should begin enabled. Priority controls evaluation order: lower numbers run first, and the default priority is 10.

  • Keep the enable flag off when the rule is not ready to process events.
  • Assign a lower priority number to evaluate that rule earlier.
  • Leave priority at 10 when the default evaluation position is suitable.
  • Expect a duplicated rule to start disabled with "(Copy)" appended to its name.

Test one product before enabling the rule

Save the rule disabled, then run Data Reprocess against one resource ID. Inspect its result in the Activity Log before switching on the enable flag. The log records each rule trigger with a timestamp, a status of Success, Failed, or Pending, and details; filters cover category, status, and date range.

  • Enter one resource ID to limit the reprocess check to that product.
  • Read the recorded status and details before changing the enable flag.
  • Enable the rule after the checked result produces the intended tag.

Keep metafields out of product conditions

Product conditions operate on standard Shopify fields. Metafield-based conditions require Shopify Flow or a feature request, so do not substitute a metafield for vendor, product type, title, tags, price, compare-at price, minimum or maximum variant price, inventory quantity, status, published state, created date, or updated date.

More posts on SO: Auto Tags are on the blog.

Read more posts