Locksmith
Install LocksmithContact us
  • Quick Start
  • 💡Basics
    • A Locksmith Overview
    • Creating locks
    • Creating keys
    • Compatibility with other apps and Shopify features
    • Removing Locksmith
  • 🔆Tutorials
    • Approving customer registrations
    • Creating restricted wholesale products
    • Hiding product prices and/or the add to cart button
    • Selling digital content on Shopify
    • More tutorials...
      • Setting up multiple price tiers
      • Customizing messages
      • Customizing the customer login page
      • Customizing the registration form
      • Customizing the passcode form
      • Customizing Locksmith’s "Access denied content" messages, and redirecting customers
      • Customizing the email list signup form
      • Showing multiple prompts on the same page
      • Showing content only to specific Markets
      • Input lists
      • Protecting against bots
      • Earn recurring revenue on your exclusive content using ReCharge
      • Use Locksmith and PayWhirl together to grant access based on subscriptions
      • Liquid locking basics
      • Restricting checkout from the cart
      • Confirmation key condition
      • Restricting customers to a specific collection
      • Passcode-specific redirects
      • Grow your subscriber lists with Klaviyo
      • Use Klaviyo as an access control list
      • Use Mailchimp to collect customer emails
      • Hiding out-of-stock products
      • How to use a private browsing session
      • Granting access to variants by visitor input
      • Offering different variants by postal code
      • Locking products by tag
      • Locking multiple pages at once
      • Making a product accessible exclusively from the direct product link
      • Creating private team areas
      • Importing customers in bulk
      • Disabling Locksmith for certain theme files
      • Adding translations to your Locksmith messages
      • Redirecting using Locksmith
      • Locking variants
        • Limiting the scope of variant locks using the product tag key condition
        • Handling JavaScript DOM errors caused by variant locks
      • Locking the customer registration form
      • Locking the search results page in your store
      • How to clear cache for a single website
      • Disabling Locksmith for certain theme files
      • 🛠️Manual mode
      • Grant access for a limited time when using passcodes or secret links
      • Testing Locksmith on unpublished themes
      • Locking blog posts
      • How to access your browser's dev tools
      • Restricting the cart for mixed products and combinations of products
      • Locking products by vendor
      • How do I hide my Shopify store's header and footer
      • Hiding navigation links for locked resources
      • Hiding products from product-grids
      • Restricting a product so that it can only be purchased by new customers
      • Automatically managing the seo.hidden metafield using Locksmith
      • Locking the home page
      • Setting up checkout validation with Locksmith
      • How to hide theme sections, blocks, and snippets
  • 🔑Keys: Access methods in Locksmith
    • About key conditions
    • Customer account keys
    • Passcode keys
    • Secret link keys
    • Visitor location keys
    • More about keys...
      • Inverting conditions in Locksmith
      • Combining key conditions
      • "Has purchased..." key
      • Using the "Force open other locks" setting
      • Custom Liquid key-condition basics
      • Manual mode
      • Excluding content from locks
      • IP address keys
      • Newsletter keys
      • Limiting the scope of variant locks using the product tag key condition
  • 🌻FAQs
    • Why aren't my locks working?
    • FAQ: I see blank spaces in my collections and/or searches when locking
    • Can Locksmith hide content from my in-store search?
    • Locksmith is not working with my page builder app
    • What should I do if my site is loading slowly?
    • I'm the administrator of my site and I cannot access pages because of Locksmith locks.
    • More FAQs...
      • I'm having trouble using Locksmith with a site speed optimization app.
      • The app isn't loading. What do I do?
      • Can Locksmith protect shipping methods, billing methods, or coupon codes?
      • I switched themes, and Locksmith isn't working
      • Why isn't my passcode, secret link, newsletter, or location key working?
      • Can Locksmith lock Shopify's public JSON API for my online store?
      • Why are my customers seeing a reCAPTCHA when logging in?
      • My passcode or newsletter prompt is not updating on my store when I change it.
      • My featured collections on my home page only show one product.
      • My infinite scrolling doesn't show all of my products.
      • My customers have to enter their e-mail address into the Mailchimp key every time they visit.
      • How do I know which customers have used a certain key?
      • Why is Locksmith adding information to my orders?
      • Locksmith isn't installing correctly!
      • Locksmith is not uninstalling correctly!
      • How does Locksmith affect search engines and SEO?
      • How do I change where customers are redirected to after registration on Shopify
      • The thing I want to lock isn't showing up in the Locksmith search
      • I am getting an "already taken" error when trying to create a metafield definition for seo.hidden
      • How do I add a hero banner image to Locksmith's access messages
  • 📒Policies
    • Usage agreement
    • Locksmith's pricing policy: Pay what feels good
    • Privacy policy
    • Data policy
    • Contact us
  • 🔦Developer Tools
    • Locksmith Admin API
    • Locksmith Storefront API
    • Locksmith variables
    • Unsupported functionality
    • Requests from Locksmith
  • More developer docs...
    • Using the Admin API with Locks
  • App Integrations
    • Easy Appointment Booking
Powered by GitBook
On this page
  • Step 1: Add your inputs to an external file
  • Supported file formats
  • Step 2: Locksmith Configuration
  • Options
  • Syncing
  • Step 3: Use with specific key conditions
  • Email Addresses
  • Passcodes
  • Secret links

Was this helpful?

Export as PDF
  1. Tutorials
  2. More tutorials...

Input lists

How to use Locksmith's Input List feature to work with large numbers of inputs

PreviousShowing content only to specific MarketsNextProtecting against bots

Last updated 1 month ago

Was this helpful?

Locksmith gives you the ability to use input lists for managed sets of , , or . They're useful when you have a very large number of possible inputs.

Note: Any time you have 1000+ inputs, it is recommended to use input lists over their vanilla counterparts. Input lists can handle millions of entries, so you have a lot of flexibility here.

Step 1: Add your inputs to an external file

Input lists are stored externally! So you'll need to create a file that is accessible via a URL, adding all of the values to it that you would like to use.

The most straightforward way to do it is to simply use Google sheets:

Google Sheets must be formatted as a document having a single column of input values, one value per row.

Supported file formats

In addition to Google Sheets, sources may be of the following formats:

  • TXT (one input value per line)

  • CSV (a single column of input values, one value per row)

  • JSON (an array of strings)

  • Microsoft Excel XLSX (a spreadsheet having a single column of input values, one per row)

  • JSON array provided by a Mechanic cache endpoint ()

Important: The source file must be either unauthenticated OR must be a Google Sheet or Google Doc that has been shared with the following email address: input-lists@locksmith-app.iam.gserviceaccount.com. If you send a notification directly to this email address, it may bounce. However, as long as the document is properly shared with that email address, Locksmith will be able to access it.

Step 2: Locksmith Configuration

Input lists are configured in your Locksmith account settings. To find this area, open the Locksmith app and go to the Settings area (using the left-hand navigation):

Input lists are available in the "Extensions" area:

Options

An input list has four options:

  • Name

  • Source URL

  • Input values are case-sensitive (enable to require an exact case match)

  • Default usage limit per input list item - allows you to specify a default usage limit for any items that you add to the list. This is a great way to add unique inputs - simply enter 1 as the usage limit and each input can only be used once.

  • Partial match - when this option is enabled, Locksmith will accept submissions that contain an input list value, rather than requiring an exact match. This is useful for matching part of an email address ( e.g. the domain of the email address) or other partial string. Partial matching is available for any input list (including when they are used for passcodes, secret links, and email addresses) but for performance reasons, can only be used with input lists that have fewer than 1000 values. If you need to grant access to a larger list of values, and then a few partial matches, you can create two separate input lists and two separate keys.

Syncing

When an input list is synchronized with its source, any new items found in the source file will be added to Locksmith's copy of the list. Any items that are no longer found in the source file will be removed from Locksmith's copy of the list.

Input lists that are sourced from Google Drive will be automatically synchronized whenever the source file is changed. (When used with Google Sheets, this allows for interesting flexibility: one could use a Google Form that saves data to a Google Sheets file, which then feeds into an input list. Whenever the form is submitted, Locksmith would automatically sync a new value into the input list.)

All input lists may be synchronized manually, by using the "Sync input list" button for the respective list.

Step 3: Use with specific key conditions

Once you've created at least one input list, you may use it when configuring a new key condition in your lock settings, by choosing one of the "Permit if..." options that mentions input lists. When adding keys to you locks, use the corresponding options...

Email Addresses

When configuring your key condition, select the "Permit if the customer has an email address from an input list…" option to have Locksmith compare customer inputs with items in your input list:

More information on using customer account key conditions here:

Passcodes

When configuring your key condition, select the "Permit if the customer gives a passcode from an input list…" option to have Locksmith compare customer input with items in your input list

As with Locksmith's other passcode conditions, you may configure this condition to "remember" returning customers who are logged in. If this option is enabled, Locksmith will compare previously-accepted passcodes from the customer's records with current items in the selected input list. This means that removing previously-used items from the input list will result in the relevant returning customers being "forgotten".

More information on using passcodes here:

Secret links

When configuring your key condition, select the "Permit if the customer arrives using a secret link code from an input list…" option to match the visitor's current URL with items in your input list:

As with standard secret link keys, Locksmith will be trying to find matching secret link codes in the following parts of the URL:

  • The URL's "search" portion. For example, in a URL that looks like "https://example.com/?foo=bar&baz&ls=qux", Locksmith will consider items in your input list having the value "foo=bar&baz&ls=qux".

  • Any component in the URL's "search" portion. For example, in a URL that looks like "https://example.com/?foo=bar&baz&qux", Locksmith will consider items in your input list having one of these values: "foo=bar", "baz", "ls=qux".

  • The "ls" query parameter, if present. For example, in a URL that looks like "https://example.com/?foo=bar&baz&ls=qux", Locksmith will consider items in your input list having the value "qux".

This means that you may form your shared URLs in any of the following ways, using an example secret link code of "foobar" to illustrate:

Feel free to combine either option with other query parameters, like so:

As with Locksmith's other secret link condition, you may configure this condition to "remember" returning customers who are logged in. If this option is enabled, Locksmith will compare previously-accepted secret link codes from the customer's records with current items in the selected input list. This means that removing previously-used items from the input list will result in the relevant returning customers being "forgotten".

More information on using secret links here:

All other input lists are automatically synchronized on a regular basis (currently at , subject to change without notice).

.

.

🔆
passcodes
secret links
email addresses
https://www.google.com/sheets
read more about Mechanic here
midnight UTC
Customer account keys
Passcode keys
https://example.com/?foobar
https://example.com/?ls=foobar
https://example.com/?foobar&utm_source=baz&..
https://example.com/?ls=foobar&utm_source=baz&..
Secret link keys