Rule Builder Deep Dive

This section explains every part of the Rule Builder in detail. Use it as a reference when you’re not sure what a field means or how a setting will behave.

The Rule Builder always follows the same 3-step flow:

Step 1 – Lock content → Step 2 – Control access → Step 3 – Advanced settings

Step 1 – Lock content

In Step 1, you define the identity and scope of the lock:

  • What you call this rule (for your own management).

  • Which part of the store it applies to.

1. Rule basics

Rule name

  • Internal name shown in the Locks list.

  • Best practice: use a clear, descriptive pattern, e.g.:

    • Hide prices from guests

    • Wholesale collection – only for wholesale tag

    • Lock entire site – B2B only

Status (Active / Inactive)

  • Active: rule is applied to your storefront.

  • Inactive: rule is saved but not enforced.

  • Use Inactive to temporarily disable a lock without deleting it.


2. Target: what you lock

You choose a target type, then select the specific objects (products, collections, pages, etc.) to apply it to.

Typical target options:

  1. Entire website

    • Locks the whole storefront behind your conditions.

    • Use for B2B-only or private stores.

  2. Hide prices

    • Keeps products visible but removes prices (and optionally “Add to cart”) for blocked visitors.

    • Can be applied to:

      • All products

      • Selected collections

      • Selected products

  3. Hide products

    • Completely hides selected products from collections, search, and direct access for blocked visitors.

  4. Hide collections

    • Hides selected collections from menus, lists, and search for blocked visitors.

  5. Lock specific pages (CMS / blog / URL)

    • Targets individual pages, blogs, or custom URLs.

    • Typically used for wholesale info pages, partner portals, documentation, or landing pages.

Depending on your plan and version, you may see slightly different naming or additional specialized targets (e.g., for blogs).


3. Scope selection

After choosing a target type, you usually define scope:

  • All (e.g., all products)

  • By collection (select one or more collections to include)

  • By product (search and select specific products)

  • By page/URL (select from a list or input a path)

This ensures the lock is applied only where you intend.


4. Price-specific options (for Hide prices)

When the target is Hide prices, additional fields are available:

  • Hide price on selected catalog

    • Decide whether to hide:

      • Just the price text

      • Also “Add to cart” buttons

  • Hide price on Google (if available in your version)

    • Prevents prices from being exposed via search results, feeds, or structured data as much as possible.

    • Useful for protecting B2B or contract pricing.


Step 2 – Control access

In Step 2, you define who can unlock or see the content you targeted in Step 1.

You do this by adding conditions. Each condition is like a test:

“If this statement is true for the visitor, then they are allowed.”

You can use a single condition for simple cases or combine multiple with AND/OR for advanced logic.

5. Main condition types

Below are the most common conditions you’ll see.

Signed-in customer

  • Condition: Customer is signed in / not signed in.

  • Used for:

    • “Hide prices from guests”

    • “Lock page for logged-in users only”

Customer tags

  • Condition: Customer is tagged with / not tagged with…

  • Uses Shopify customer tags like wholesale, b2b-approved, silver, gold.

  • Core of most B2B & segmentation flows.

Passcode

  • Condition: Visitor must enter a passcode.

  • Good for invite-only content without creating accounts.

Secret link

  • Condition: Visitor must come via a unique URL token.

  • Use for hidden collections or private campaigns shared by link.

Specific customers (emails)

  • Condition: Customer email is / is not in this list.

  • Grants access only to selected customer accounts.

Email subscribers / opt-in

  • Condition: Customer has subscribed with their email.

  • Use to gate content by subscription state.

Age verification

  • Condition: Visitor has confirmed age.

  • Use for alcohol, adult content, or other restricted products.

Geo / market / IP-based conditions (if included in your plan)

  • Conditions based on:

    • Shopify Markets

    • Country/region

    • IP ranges

  • Useful when content or catalog access depends on location.

Custom Liquid (advanced)

  • Lets a developer write Liquid logic to evaluate complex requirements (e.g., metafield values, more complex segmentation).


6. Combining conditions with AND / OR

Each lock can have multiple conditions. You connect them with AND and OR to express real logic:

  • AND = all must be true

    • Example:

      • Signed in AND tagged wholesale

      • Result: only logged-in wholesale customers get access.

  • OR = any can be true

    • Example:

      • Tagged wholesale OR came via secret link

      • Result: either approved wholesale customers or very specific invitees get access.

You can also stack several rules for a single lock, for instance:

  • Rule 1: allow wholesale

  • Rule 2: allow partner

  • Rule 3: allow secret link

  • Everyone else: blocked → sees lock message

This flexibility removes the need for multiple overlapping locks that are hard to manage.


7. Tips for designing clean rules

  • Start with the simplest rule that meets your need (e.g. just login, or just one tag).

  • Add complexity only when you really need it (e.g. combining regions or tags).

  • Be consistent with tags (e.g., always use wholesale instead of mixing wholesale, wholesale_customer, etc.).

  • Keep rule names aligned with conditions, so future you (or your colleague) can understand them at a glance.


Step 3 – Advanced settings

Step 3 controls how the lock is experienced by visitors and allows you to fine-tune edge cases.

Think of Step 2 as the logic and Step 3 as the UX layer.

8. Lock message

When a visitor doesn’t meet your conditions, B2B Lock shows a lock message instead of the protected content.

Common fields:

  • Title / headline

    • Short message summarizing the reason, e.g.

      • “Wholesale access only”

      • “Login to view prices”

  • Body text

    • Explain who the content is for and what to do next:

      • “This section is reserved for approved B2B customers. Please log in or request an account.”

  • Buttons / links

    • “Login”, “Create account”, “Request access”, “Contact us”, etc.

    • Point them to Shopify login, registration, or a contact/registration page.

Good lock messages guide the visitor; they don’t just block them.


9. Behaviour for login / signup

Depending on the lock type, you may enable:

  • Show login form or button

    • Direct users to the correct login page.

  • Show signup or application link

    • Useful when you allow users to apply for a B2B account.

For B2B-only stores, always make sure the lock screen gives a clear path to becoming an approved customer (even if it’s via manual contact).


For passcode locks:

  • Passcode field – set the actual password.

  • Case sensitivity – decide if PASS and pass are treated the same.

  • Remember access – whether to store the passcode result so the user doesn’t have to re-enter it repeatedly.

  • Error message – what to show when the passcode is wrong.

For secret link locks:

  • Token behaviour – define what happens when the URL is accessed without a token.

    • Show lock message.

    • Optionally redirect somewhere else.


11. Exclusions & fine-tuning scope

When you lock a broad target (like the entire site or a whole collection), Advanced settings may allow you to define exceptions:

  • Exclude products from a collection lock.

  • Exclude specific pages/URLs from an “entire website” lock (e.g., Contact or About pages that should remain public).

This lets you design more nuanced experiences without creating many separate locks.


12. Session, schedule & timing

Depending on your version, you may see options like:

  • Session duration / remember unlock

    • How long an unlock (login/passcode/secret link) is remembered.

  • Start date / End date

    • Automatically activate or deactivate a lock at specific times.

Typical uses:

  • Pre-launch / early access pages.

  • Time-limited promotions or partner access.


13. Error states & redirects

Advanced settings also influence what happens when things go wrong or are blocked:

  • Error / denial message

    • Specific text shown on a blocked checkout or restricted page.

  • Redirect target (if supported)

    • Where to send users who hit a forbidden page (e.g., homepage, info page, or a soft landing explaining access).

Design these messages carefully so they reduce confusion and increase conversion for the right users.


Putting it all together

The Rule Builder is designed so that:

  • Step 1 answers: “What am I protecting?”

  • Step 2 answers: “Who is allowed to see it?”

  • Step 3 answers: “What does everyone else see, and are there exceptions?”

Once you’re comfortable with each field in these three steps, you can confidently design complex, but maintainable, B2B and access-control scenarios for your Shopify store.

Last updated

Was this helpful?