# Tag-based Collections & Products

This page shows how to use **customer tags** with B2B Lock to control **which collections/products** different customers can see.

Think of it as:

> “If customer has tag X → show catalog Y.”

***

#### 1. Core pattern

The basic pattern is:

1. Decide **which customers** should see a catalog segment.
2. Give them a **tag** (e.g., `wholesale`, `eu-distributor`, `vip`).
3. Create a B2B Lock rule:
   * **Step 1:** choose what to protect (products/collections).
   * **Step 2:** allow access **only for customers with that tag**.
   * **Step 3:** customize lock message for everyone else.

***

#### 2. Example 1 – Wholesale collection for wholesale-tagged customers

**Goal**\
Allow only `wholesale` customers to see the **Wholesale** collection.

**Step 1 – Lock content**

* Target: **Hide collections**
* Select: collection “Wholesale”

**Step 2 – Control access**

* Condition:
  * **If the customer is tagged with `wholesale`**

Result:

* Wholesale-tagged customers:
  * See the Wholesale collection in navigation and can browse normally.
* Everyone else:
  * Don’t see the collection; if they hit the URL directly, they see a lock message.

***

#### 3. Example 2 – Distributor-only products

**Goal**\
Only customers tagged `distributor` can see certain products.

**Step 1 – Lock content**

* Target: **Hide products**
* Select: all SKUs you want to limit to distributors.

**Step 2 – Control access**

* Condition:
  * **If the customer is tagged with `distributor`**

Result:

* Distributor-tagged customers:
  * See those SKUs in collections and product pages.
* Others:
  * Don’t see them in collections/search; direct URL can be locked.

***

#### 4. Example 3 – Region-based catalogs

**Goal**\
US distributors see a US collection; EU distributors see an EU collection.

**Tags**

* Customers in the US: `us-distributor`
* Customers in the EU: `eu-distributor`

**Two locks:**

1. Lock for US collection

* Step 1:
  * Target: **Hide collections → US-Wholesale**
* Step 2:
  * Condition: **If the customer is tagged with `us-distributor`**

2. Lock for EU collection

* Step 1:
  * Target: **Hide collections → EU-Wholesale**
* Step 2:
  * Condition: **If the customer is tagged with `eu-distributor`**

Result:

* US distributors see **only** the US catalog.
* EU distributors see **only** the EU catalog.

***

#### 5. Tips for designing tag-based catalogs

* Prefer **collection-level locks** when possible:
  * Easier to manage than many product-level rules.
* Keep tag names aligned with **business groups**:
  * `wholesale`, `us-distributor`, `eu-distributor`, `vip`.
* Use product/collection naming and structure to mirror segments:
  * e.g., `Wholesale – US`, `Wholesale – EU`.

When tags and collections match real-world segments, B2B Lock rules become easy to read:\
“You’re `wholesale` → you see the wholesale collection.”


---

# Agent Instructions: 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:

```
GET https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/tags-segments-and-catalog-strategy/tag-based-collections-and-products.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
