> 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/getting-started.md).

# Getting started

Start protecting Shopify storefront content with Sami B2B Lock, Password Protect.

**Sami B2B Lock, Password Protect** lets you control who can view content and purchase products in your Shopify store. Use a Lock to protect a whole website, selected products, collections, pages, blogs, custom URLs, the cart page, or checkout—then decide which visitors can continue and what everyone else sees.

The app is designed for stores that need experiences such as wholesale-only pricing, members-only pages, private product launches, password-protected collections, customer-specific content, or checkout restrictions.

## What you can do

With Sami B2B Lock, Password Protect, you can:

* Protect your whole website or a specific part of your storefront.
* Lock all products, selected products, variants, product tags, vendors, collections, pages, blogs, articles, URLs, the cart page, or checkout.
* Grant access with customer login, customer tags, B2B customer status, selected customers, passcodes, secret links, subscriptions, confirmation prompts, and other conditions.
* Limit access by date, weekly schedule, country, IP address, storefront language, order history, cart contents, cart quantity, or cart total.
* Hide price, Add to cart, product listings, navigation links, or search-engine visibility for blocked visitors.
* Send visitors to another page after access is granted, or add tags to an eligible Shopify customer account.
* Let visitors request a passcode or secret link, then review and send access from the app.
* Customize the Lock's messages, colors, templates, and translations for each storefront language.

## How a Lock works

Every Lock has three parts:

| Part                | What it decides                  | Example                                              |
| ------------------- | -------------------------------- | ---------------------------------------------------- |
| **Content to lock** | What needs protection            | A wholesale collection or one product variant        |
| **Access rules**    | Who is allowed through           | A signed-in customer with the `wholesale` tag        |
| **Lock behavior**   | What blocked visitors experience | Hide price and Add to cart, then show a login prompt |

When a visitor opens protected content, Sami Lock checks the configured conditions. If all required conditions are satisfied, the visitor can continue. If not, the Lock applies the selected behavior, such as showing a message, hiding product information, displaying a passcode field, or redirecting the visitor.

{% hint style="info" %}
For Checkout Locks, conditions work differently: they decide when the checkout error message should appear and checkout should be blocked. See [Checkout](/b2b-lock-password-protect/content-to-lock/checkout.md) for the complete flow.
{% endhint %}

## Before you begin

Before creating a Lock, make sure you have:

1. Installed the app in the Shopify store where the Lock will be used.
2. Enabled the **Sami Lock** app embed on the Shopify theme you want to protect.
3. Identified the storefront content to protect and the customer audience that should be allowed through.
4. Prepared any Shopify data required for the rule, such as customer tags, products, collections, or test customer accounts.

{% hint style="warning" %}
Creating a Lock in the app does not affect the storefront until the Sami Lock app embed is enabled on the relevant theme.
{% endhint %}

## Start here

Follow these guides in order when setting up the app for the first time:

1. [Install the app](/b2b-lock-password-protect/quick-start/installation.md) from the Shopify App Store and approve its permissions.
2. [Enable the app embed](/b2b-lock-password-protect/quick-start/enable-app-embed.md) from the app Dashboard so Sami Lock can run on the storefront.
3. [Create your first lock](/b2b-lock-password-protect/quick-start/quickstart.md) with a simple product and logged-in-customer example.
4. [Learn how locks work](/b2b-lock-password-protect/quick-start/how-locks-work.md) before creating more advanced rules.

## Choose the right guide

After the initial setup, use the guide that matches your goal:

| Your goal                                                                | Start with                                                                                            |
| ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| Protect products, variants, collections, pages, blogs, URLs, or checkout | [Content to lock](/b2b-lock-password-protect/locks/overview.md#content-types-you-can-lock)            |
| Decide which customers can access protected content                      | [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md)                          |
| Hide prices, menus, product links, or configure redirects                | [Lock behavior overview](/b2b-lock-password-protect/lock-behavior/overview.md)                        |
| Send passcodes or secret links after a visitor asks for access           | [Request access overview](/b2b-lock-password-protect/request-access/overview.md)                      |
| Change colors, templates, messages, or translations                      | [Design & customization](/b2b-lock-password-protect/design-and-customization/colors-and-templates.md) |
| Check an issue with the Lock or app embed                                | [FAQ](/b2b-lock-password-protect/help/faq.md)                                                         |

## Need help?

If you encounter an issue while setting up a Lock, start with [Troubleshooting & FAQ](/b2b-lock-password-protect/help/faq.md). You can also contact <support@samita.io> with your store URL, Lock name, affected page, expected result, actual result, and a screenshot.


---

# 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/getting-started.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.
