Restricting a product so that it can only be purchased by new customers
In this guide, we'll show you how to set up a product so that it can only be purchased by customers who haven't yet made a purchase. This is great for samples and first time free products.
Note: This functionality requires the customer to have or create an account for access. There's more on that below.
You'll start by locking your free sample product. You can search for it by name in the Locksmith search bar to create that lock.
Next, you'll need to set a key with two different conditions:
Permit if the customer is signed in, and
permit unless the customer has purchased "*"
In order for Locksmith to know whether or not a customer has made a purchase before, you'll need to require your customers to be signed in to access that product. That's the first condition.
The second condition checks the customer's order history to see if they've made any purchases at all. The asterisk you put in the in the product field tells Locksmith to look for any purchase at all. Also, you'll need to enable the "invert" option on this condition. Here's how that looks:
When the full key is created, it looks like this:
When this is all set, the customer will be prompted to log in when they try to access the product. If they already have a purchase in their history, they'll see the Access Denied message.