> For the complete documentation index, see [llms.txt](https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/lock-core-concepts/goal-based-guides-i-want-to.../hide-wholesale-collections-from-guest-users.md).

# Hide wholesale collections from guest users

**Goal**\
Hide one or more **wholesale collections** from guests and show them only to logged-in or approved customers.

**When to use this recipe**

* You have a collection like **“Wholesale” / “B2B Catalog” / “Distributor Products”**.
* You want regular visitors to see only your retail catalog.

***

#### Step 0 – Before you start

Identify:

* The **wholesale collection(s)** you want to hide.
* Whether access is granted to **any logged-in customer** or only **tagged wholesale customers**.

***

#### Step 1 – Lock content

1. Go to **Apps → B2B Lock → Locks → Add lock**.
2. In **Step 1 – Lock content**:
   * Name the rule:\
     `Hide wholesale collections from guests`
   * Choose **Hide collections** (or equivalent target type).
   * Select the collections you want to hide (e.g., “Wholesale”, “B2B Only”).

> (Screenshot idea: collection selector with “Wholesale” checked.)

***

#### Step 2 – Control access

Choose who can see those collections:

**Option A – Any logged-in customer**

* Condition: **If the customer is signed in**\
  → All registered customers see wholesale collections; guests do not.

**Option B – Only approved wholesale customers**

* Condition: **If the customer is tagged with `wholesale`**\
  → Only tagged wholesale customers see them.

Steps:

1. In **Step 2**, add your condition (signed in or tag-based).
2. If using tags, ensure your customers are correctly tagged (e.g., synced from B2B registration app).

***

#### Step 3 – Advanced settings

Optional refinements:

* Exclude any collections that must stay visible (e.g., “Retail”).
* Customize what happens if a guest hits a wholesale collection URL directly:
  * Show message “This collection is for wholesale customers only. Please log in or request access.”

Click **Save**.

***

#### Check your storefront

1. As a **guest**:
   * Wholesale collections should not appear in navigation, collections lists, or search results.
   * Direct access to their URL should show your lock message.
2. As a **logged-in or tagged wholesale customer**:
   * The same collections should appear and behave normally.


---

# 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-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/lock-core-concepts/goal-based-guides-i-want-to.../hide-wholesale-collections-from-guest-users.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.
