> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/keys/more/limiting-the-scope-of-variant-locks-using-the-product-tag-key-condition.md).

# Limiting the scope of variant locks using the product tag key condition

By default, Locksmith's [variant locks](/tutorials/more/locking-variants.md) apply to all matching option/value combinations. For example, you'll typically see something like this:<br>

<figure><img src="/files/c6di7SBHZLj5f6dCKpyN" alt=""><figcaption></figcaption></figure>

Once a variant lock is created, you can limit which products it applies to by using the key condition labelled "If the product is tagged with":

<figure><img src="/files/l6OPng7ifi63v0YdRQWl" alt=""><figcaption><p>Type "product" in the popover filter, as shown above, to more easily find the correct key condition</p></figcaption></figure>

You'll use any existing product tags to denote which products you want the variant lock to apply to, or create new product tags if needed.

If you want the lock to **apply to variants on one product tag only**, and leave all other products untouched, for example, you'll use an inverted key condition like so:

<figure><img src="/files/1f7wV0t8yzzsv9dkFNPE" alt=""><figcaption></figcaption></figure>

Then, **as a separate key,** add in your conditions for access to the product. So if you want to allow access to the variant with a sign in, that will look like this:

<figure><img src="/files/8Q4WUgPsGs93AwdGRrUv" alt=""><figcaption></figcaption></figure>

The result of this is that all matching variants will automatically be unlocked if the product is NOT tagged with "Snowboard". In other words, **the variant lock will only apply to products tagged with "Snowboard"**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.locksmith.guide/keys/more/limiting-the-scope-of-variant-locks-using-the-product-tag-key-condition.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
