> 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/content-to-lock/collections.md).

# Collections

Lock specific collections behind access rules while the rest of your store stays public.

The **Collections** content type locks one or more specific collections — useful for gating an entire category of products (a wholesale line, a members-only range, a seasonal drop) without having to select every product inside it individually.

## Create the lock

1. Open **Locks** in the app's navigation.
2. Click **Create lock**.
3. Give the lock a descriptive name, for example "B2B collection — login required."

## Choose Collections as the content to lock

4. On the **Lock setup** tab, in the content picker, select **Collections**.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-185c3c3f343476aadce6c954b33390845729dde6%2Fscreenshot-locks-content-picker-collections.png?alt=media" alt="The content picker with Collections selected as the content type to lock."><figcaption><p>Select Collections in the content picker to lock one or more specific collections.</p></figcaption></figure>

5. Use the collection picker to search and select the collections you want to lock. You can select more than one collection for the same lock.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-8045fe7c9ce586ef5e699995cbd6f36c87a29cb5%2Fscreenshot-locks-collections-picker.png?alt=media" alt="The collection picker showing a search field and a list of selectable collections."><figcaption><p>Search and select the specific collections you want to lock.</p></figcaption></figure>

{% hint style="warning" %}
Locking collections may require a paid plan depending on your current plan.
{% endhint %}

6. Click the **Unlock rules** tab to continue.

## Add an access rule

7. Add at least one rule — for example, **Selected customers** if only a hand-picked list of accounts should see this collection.
8. Configure the rule's settings. See [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md) for the full catalogue of available rules.
9. Add every required condition to the access key. All conditions must be satisfied. See [Combining rules](/b2b-lock-password-protect/access-rules/combining-rules.md).

## Choose a lock behavior

On the same **Unlock rules** tab, the right-hand sidebar has a **Blocked visitor behavior** panel — configure it alongside your rule:

10. For a locked collection you can hide the price and Add to cart button on every product inside it, or fully hide the collection from listings, menus, and search so it doesn't appear at all to visitors who don't qualify. Review [Lock behavior overview](/b2b-lock-password-protect/lock-behavior/overview.md) for the full set of options, including [Hide from menus](/b2b-lock-password-protect/lock-behavior/hide-from-menus.md) and [Hide from search engines](/b2b-lock-password-protect/lock-behavior/hide-from-search-engines.md).

## Save

11. Click **Save**. The lock takes effect on your storefront as soon as the app embed is enabled.

## Related docs

* [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md)
* [Lock behavior overview](/b2b-lock-password-protect/lock-behavior/overview.md)
* [Manage locks](/b2b-lock-password-protect/locks/manage-locks.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/content-to-lock/collections.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.
