# Lock conditions

### **Logged-in customer:**

If you create a lock with this condition, the customers will be immediately redirected to the Login page of your store (or any pages that you choose in the **“Redirect to”** section).

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

### **Selected customers:**

There are two types of this condition, **Automate condition** and **Manual**.&#x20;

1. The **Automate condition** option will help you manage the customers to be able to see the locked site by the customer tag. Then once the customers access the locked site, they will be redirected to the Login page of your store (or any pages that you choose in the **“Redirect to”** section).&#x20;

The customer tag will be added to the customer account in the **Customers folder** of Shopify.&#x20;

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

You also can use **other conditions** for this **Automate** option:

* **The customer's email contains:** Show content to customers logging in to your store with email ID that contains the text you put in the setting.&#x20;

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

* **B2B customer:** Show content for customers that have B2B account. The B2B account is determined by the company information in their account. If the account doesn't have this information, the app will hide content from them.&#x20;

<figure><img src="/files/2UajBgULZGuKMHHcAF7I" alt=""><figcaption></figcaption></figure>

2. The **Manual** option will help you choose and manage the customers who can be able to view the locked site

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

### **Visitors with passcode:**

This condition will make the customers enter a passcode to view the locked site. They will be redirected to the lock page which has a passcode input field.

<figure><img src="/files/45KQ1l5Lk9maDfe2yzKV" alt=""><figcaption></figcaption></figure>

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

### **Secret link:**&#x20;

Just like the **“Visitors with passcode”** condition, the customers will need a code to add to the tail of the page URL. Then they will be able to see the locked site.&#x20;

The normal link has this form: abc/product/special

The secret link will be like this: abc/product/specia&#x6C;**?access=test1234**

The URL tail: **?access=test1234** is the code you have to set up in the app setting. You will have to create a code tail and add it to the tail of the page URL you want to access that locked page

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

Then once the customers access the locked site, they will be redirected to the lock page.

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

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

### Country restriction:&#x20;

This lock condition allows you to hide content based on customer's IP address. If the customer's IP is outside of the country you set up in the app, the lock will be activated.&#x20;

***We take data from customer's IP and location to activate the lock (not from the Shopify Market data)***

You can either configure which countries are granted access to the locked content or are restricted from seeing the content:&#x20;

* **Allow only these countries:**

<figure><img src="/files/5W8kzKriZVAJjpIQPFkW" alt=""><figcaption></figcaption></figure>

* **Block these countries:**&#x20;

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

{% hint style="success" %}
**Need support?**

If you do encounter any difficulty while proceeding these steps, don’t show any hesitation to contact us promptly via the email address [support@samita.io](https://samita.io/pages/contact)
{% 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://docs.samita.io/b2b-lock-password-protect/lock-1/lock-conditions.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.
