# Restricting customers to a specific collection

With Locksmith, it is simple to lock down a specific collection, so that it can only be viewed by a specific set of customers. However, some merchants want to take it one step further and make sure that those customers can *only* access their collection, while the rest of the store is restricted to them.

### Part 1: Create the collection lock

Add a lock to the collection that you want these customers to access. Use the search bar in Locksmith to search for the collection by name:<br>

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

Under "Keys", choose how these customers will gain access. You can use whatever method of access you want. The most common way of granting access in this scenario is to use "customer tags" to grant access:

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

Make sure the "Force open other locks" setting is turned on for this lock. Use the following guide to do this: [Using the "Force open other locks" setting](/keys/more/using-the-force-open-other-locks-setting.md) . **This setting is important.**

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

### Part 2: Create a lock covering the rest of the store

In order to make sure that these customers can't see the rest of your store, you need to actually add a lock to your "entire store":

![](/files/verEhuBwLx6iYx2dkTJG)

For your key condition, you need to use the "invert" option to obtain the opposite of the first key condition:

<figure><img src="/files/mriU5gixtHQVZxiNdzee" alt=""><figcaption><p>The invert option in the context of the rest of the key condition settings.</p></figcaption></figure>

Use the guide here if you need more guidance on how to invert your key condition:

{% content-ref url="/pages/WvgSxoLu5Yu2LN8UhkxS" %}
[Inverting conditions in Locksmith](/keys/more/inverting-conditions-in-locksmith.md)
{% endcontent-ref %}

{% hint style="info" %}
If this is a private collection, no further action necessary. If the collection is meant to be viewed by all customers, you'll also want to use the ["force open other locks](/keys/more/using-the-force-open-other-locks-setting.md)" setting on the lock for the entire store.
{% endhint %}


---

# 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://www.locksmith.guide/tutorials/more/restricting-customers-to-a-specific-collection.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.
