> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/b2b-lock-password-protect/access-rules/customer-tags.md).

# Customer tags

Restrict a lock to customers whose account carries one or more specific tags.

The Customer tags rule checks whether the visitor's signed-in customer account has a specific tag applied to it. It's the rule behind most wholesale and VIP-tier locks, since Shopify tags are the easiest way to segment customer accounts without building anything custom.

## How it works

This rule only evaluates tags on the account of a customer who is currently logged in. If you add more than one tag to the rule, satisfying **any one** of the listed tags is enough — you don't need all of them at once. If you specifically need a customer to hold every one of several tags, add a separate Customer tags rule for each required tag inside the same access key (since rules in one key combine with AND).

## Adding the rule

1. Open the lock you want to protect and click the **Unlock rules** tab.
2. Add an access rule and choose **Customer tags** from the **Condition type** dropdown.

   <figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-3be61f289dcac8ba73f628ae6ae1cd8f67e04fc2%2Fscreenshot-access-rules-customer-tags-add.png?alt=media" alt="Access rule picker with Customer tags selected and a tag search field"><figcaption><p>Adding the Customer tags rule and searching for a tag to match.</p></figcaption></figure>
3. Search for and select one or more tags. Tags you type that don't already exist on any customer can typically still be entered — they'll simply never match until you apply that tag to an account.
4. Choose whether the rule should match **If** (the customer has one of the listed tags) or **Unless** (the customer does not have any of them).
5. Optionally set a per-rule **Redirect URL**, used only if this specific rule denies the visitor.
6. Save the lock.

## Common example: wholesale tag

A typical setup: tag your wholesale accounts with `wholesale` in Shopify, then:

1. On the **Lock setup** tab, set the content to lock to your wholesale-priced products or collection.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-5d66ec5de69cdaf89251e5f3428956a4c3052b73%2Fscreenshot-example-wholesale-content.png?alt=media" alt="The Lock setup tab with Specific products chosen as the content type and three products listed under Restricted products."><figcaption><p>Pick the wholesale-priced products this lock should cover.</p></figcaption></figure>

2. Click the **Unlock rules** tab to continue.
3. Add the Customer tags rule, enter `wholesale`, and leave it matching **If**.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-0e782f6428b6643ceb213b9f9977bedf048051a4%2Fscreenshot-example-wholesale-tag-rule.png?alt=media" alt="The Customer tags condition with Rule logic set to If and a wholesale tag chip below the Tags field."><figcaption><p>The condition heading confirms what you built: If the customer is tagged with wholesale.</p></figcaption></figure>

4. In the same tab's right-hand sidebar, under **Blocked visitor behavior**, turn on [Hide price and Add to cart](/b2b-lock-password-protect/lock-behavior/hide-price-and-add-to-cart.md) so untagged visitors see the page but not the price, instead of a full block.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-dd5a3e5c9544e1c50ed67c62f1915021e757c2b8%2Fscreenshot-example-wholesale-hide-price.png?alt=media" alt="The Blocked visitor behavior panel with Hide product price and atc selected in its dropdown."><figcaption><p>Choose Hide product price and atc so untagged visitors still see the product page.</p></figcaption></figure>

5. Save.

{% hint style="info" %}
The app's Quick Setup list on the Locks page includes a ready-made **Wholesale-only products** template that pre-fills exactly this pattern — a customer-tag rule against price and Add to cart — so you can start from it instead of building it from scratch.
{% endhint %}

## Result on the storefront

With the wholesale example above, customers whose account has the `wholesale` tag see the normal price and buy box. Guests and signed-in customers without that tag can still browse the product page, but the price and buy buttons are replaced with the configured lock message.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-b4c33c48f09251c50a824a6cfbd988d99eb9092a%2Fscreenshot-storefront-tag-hide-price.png?alt=media" alt="A live storefront product page seen by an untagged visitor: product image, title, and colour options are all visible, with a Login to see price link where the price would be and no Add to cart or Buy it now button."><figcaption><p>The result of the example: visitors without the wholesale tag can browse the product, but the price and buy buttons are replaced.</p></figcaption></figure>

The default replacement text may say **"Login to see price"**. Because a signed-in customer can still be missing the required tag, consider changing it to something more specific, such as **"Wholesale access required"**. See [Hide price and Add to cart](/b2b-lock-password-protect/lock-behavior/hide-price-and-add-to-cart.md).

## Related docs

* [B2B customer](/b2b-lock-password-protect/access-rules/b2b-customer.md)
* [Selected customers](/b2b-lock-password-protect/access-rules/selected-customers.md)
* [Combining rules](/b2b-lock-password-protect/access-rules/combining-rules.md)
* [Add customer tags after access](/b2b-lock-password-protect/lock-behavior/customer-auto-tags.md)


---

# 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://docs.samita.io/b2b-lock-password-protect/access-rules/customer-tags.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.
