Product Variant Option

Product Variant Option allows you to automatically tag your products in your Shopify store based on each product variant available option names, for example Size, Color, Style or Material.

Smart Tags will tag your product with the value of the variant option. See the examples section for a better idea what tags will be created.

The above figure shows an example product in Shopify that has two available option names: Color and Size, and the option values Salmon Pink, S, M and L.

The product will only be tagged if it has the specified variant option name. If the product gets updated and the variant option was removed, the tag will be removed.

You can also have the option to set the minimum stock quantity that the variant should have. If the variant has less than the minimum quantity, the product will not be tagged.

If the product stock quantity gets updated, the tag will be added if it meets the minimum stock quantity. It will be removed if it does not.


In this article


Add Product Variant Option smart tag

  1. From Smart Tags dashboard, click Add a smart tag from menu bar.

    Note: You can create multiple Product Variant Option smart tag, each for a different variant option name.
  2. Select Smart Tag Type > Product Variant Option from the dropdown list.
  3. Fill in the options available.

    Note: See Product Variant Option options to learn about the options available.
  4. Remember to click Save to keep changes or Cancel to discard changes.


Product Variant Option options

The following table shows the options available for Product Variant Option:

Option Description Default Required?
Variant Option Name Name of the variant option, for example Size, Color or Style Empty Yes
Minimum Stock Quantity The minimum stock quantity for the product to be tagged. If the product variant has less that the minimum value, the product will not be tagged.

If it is not set, the minimum is set to zero.
0
Prefix Prepend each tag with the prefix.
Leave blank if you don't want the tag to be prefixed with anything.

See example on how to use the prefix option.
Empty

Example uses

Tag product based on its variant option name

In this example, we will show how to tag the product based on its Size values.

Note: This example applies the same to other variant option names, for example Size, Style, or Material, depending on your Shopify store setup.
  1. Add Product Variant Option smart tag
  2. Set Variant Option Name to Size.
  3. Set Minimum Stock Quantity value to 0.
  4. Optional: We highly recommend that you set a Prefix with value "size-" so that you can tell that the type of tag. In this case, the tag here is the Size value of the product
  5. Click Save to keep changes.

The following table shows an example product and its variants.

Product Title Geeky Striped T-Shirt
Variants Size Quantity

S 3

M 0

L 5
XL 1

The above example will produce the following tags for the above product:

Without prefix With prefix "size-"
S
M
L
XL
size-S
size-M
size-L
size-XL
Note: The product will be tagged with size-M since we have set the minimum stock quantity to zero (0). See the next example to only apply tags if product variant has at least a certain quantity in stock.

Tag product based on its variant option name only if it is in-stock.

In this example, we will show how to tag the product based on its Size values, only if it has at least certain number of inventory quantity.

This is really useful if you have a collection filter that is based on tags and would only want products to appear in the result if it is in-stock.

Note: This example applies the same to other variant option names, for example Color, Style, or Material, depending on your Shopify store setup.
  1. Add Product Variant Option smart tag
  2. Set Variant Option Name to Size.
  3. Set Minimum Stock Quantity value to 1.
  4. Optional: We highly recommend that you set a Prefix with value "size-" so that you can tell that the type of tag. In this case, the tag here is the Size value of the product
  5. Click Save to keep changes.

The following table shows an example product and its variants.

Product Title Geeky Striped T-Shirt
Variants Size Quantity

S 3

M 0

L 5
XL 1

The above example will produce the following tags for the above product:

Without prefix With prefix "size-"
S
L
XL
size-S
size-L
size-XL
Note: The product will not be tagged with size-M since we have set the minimum stock quantity to one (1).

Prepend tag with a prefix

Prepending the tag with a prefix helps with organizing the tags in your Shopify store.

Using it lets you know the type of tag, differentiating it from other tags that the product has.

Simply add Product Variant Option smart tag and set the Prefix option to "size-", for example.

Product Title Geeky Striped T-Shirt
Variants Size Quantity

S 3

M 0

L 5
XL 1

The following table shows the result tags with and without the prefix

Without prefix With prefix "size-"
S
L
XL
size-S
size-L
size-XL

Still need help? Contact Us Contact Us