Menu
Feedback
Start here
Tutorials


Tutorials
Customer relations management
How to limit access to the store using a trade policy
How to limit access to the store using a trade policy

You can limit access to a store for a number of different reasons, such as when it has a B2B site on which only registered, authorized companies may browse, or when it is an environment for exclusive customers.

This can be achieved by using Master Data v1 and the store’s sales policy.

This article describes how Master Data v1 works. It is important that you evaluate which Master Data version meets the needs of your operation or is already in use.

Creating a cluster of customers

The first step is to create a cluster which will identify those customers that can access the store. To learn how to create a cluster of customers, read our manual.

Changing a trade policy

After creating a cluster, you must include a rule in the trade policy allowing access to the site only to customers in that cluster.

  1. In the VTEX Admin, click Store Settings > Channels > Trade Policies.
  2. In the sales policy used, click Alter.
  3. In the Conditional Rule field, enter the value ClusterName=”true”. Note that the value ClusterName must be changed to the name of the field in the data entity.
  4. Click on the Save button.

{"base64":"  ","img":{"width":1246,"height":529,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":46608,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/master-data/customer-relations-management/limiting-access-to-the-store-by-means-of-the-trade-policy_1.png"}}

In the above configuration, only customers with the value “true” (using a Boolean field – where values are either true or false) can access the site.

However there are other possibilities for configuration. For instance, you can configure ClusterName="false" – where only customers with the field value false can access the site, or ClusterName="silva" – where only customers with the value silva in the field used for the cluster can access the site.

Registering customers with access

In the case of B2B, where the store does not know which customers may have access, a form will have to be created for them to register their details. The store will then use Master Data to verify the details and decide whether or not to grant access. For this configuration, see our manual for B2B stores.

Learn more

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Import customer data
« Previous
Adding a record on a Master Data form
Next »
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback