B2B (Business to Business) is an abbreviation used in e-commerce in reference to commercial transactions between companies.
In other words, B2B stores only sell their products to other stores. Because of that, their environments require user authentication, since these are usually blocked, completely or partially, for anonymous users.
It is quick and easy to provide a B2B environment for your IO store. Follow the step by step below and learn how to make your store's content available only to users of other customer stores.
The key element that ensures the security of the displayed content is the Challenge Trade Policy block, responsible for checking if the store's user is allowed to browse the B2B environment.
Check out the Challenge Trade Policy documentation to configure it correctly in your store and proceed to the next steps.
With the Challenge configured, it's time for you to define what the access criterion will be - in other words, the condition rule that will allow a user to browse your store.
To define the condition rule, you first need to choose which of your store's Trade Policy it will be applied to. Each Trade Policy must have its Condition Rule defined individually, since each one has its own catalog, price and logistics particularities.
Make sure you fully understand what the Trade Policies for VTEX stores are before performing the steps below:
- Access the Trade policies section in the admin's sidebar;
- Choose the desired Trade Policy. You can edit an existing one, by clicking on Edit, or create one from scratch, by clicking on New Trade Policy.
- In the Condition Rule field, define an access criterion of your choosing for the users who will access the trade policy in question. For example: if only logged in users can access store content, your Condition Rule could be something like
️ The value entered in the Condition Rule field can be any one of your choosing. Remember to choose an intuitive condition and a clear rule, since both will be added to Master Data later for the user's verification to be successful.
In this last step, you will create a link between the Condition Rule and the user profiles you want to have access to the store.
In other words, you will add a field in the profile forms of the users in question (through the admin's Master Data). That field is able to indicate whether the user is qualified to browse your store, according to the criterion you set forth.
- Access Master Data from the admin's sidebar;
- In the Profile System box, click on the settings icon;
- Select the option Data structure inside the Configurations box;
- Once in the new window, access the Data Entities tab;
- In the customer's Data Entity, create a user field. According to the previous example, we could create a Boolean type
approvedfield, with two possible options:
true(logged in) and
false(not logged in)
- Add the newly created field to the forms of the target user in order to verify and grant access to these customers.
There you go! After completing all the steps, your store is ready and safe to focus your sales to other companies!
Updated about 19 hours ago