Documentation
Feedback
Guides
API Reference

Guides
Search
Access Control List

By default, all VTEX stores are configured to display all available products during every navigation session. The Access Control List feature allows you to create a list of users that can or cannot access specific products in the store.

Creating a specification

To configure the Access Control List, you must first create one of the following product specifications either through Catalog API or on VTEX Admin and set their values, which represent groups of customers that can be set on Master Data. All values for both specifications must be separated by ; (i.e.: 1;2;3).

Specification nameExample valuesDescription
_blocklist1;2;3Blocklist: Restricts product visibility based on the defined navigation values.
_allowlist1;2;3Allowlist: Enables product visibility based on the defined navigation values.

Do not set both specifications at the same time for the same product, otherwise the product will not be displayed in any scenario. Read Behavior for more information.

After creating the product specification, Intelligent Search automatically triggers a reindexing process to update the values in the search database.

Defining segmented navigation

To define segmented navigation, you must configure the accesscontrollist facet on the vtex-segment app. For example, acesscontrollist:1 can define navigation for a customer, where a certain product will not be displayed in the search results.


_14
query {
_14
productSearch(
_14
selectedFacets: [
_14
{key: "trade-policy", value: "1"},
_14
{key: "accesscontrollist", value: "1"}
_14
]
_14
)
_14
{
_14
products {
_14
productId,
_14
productName
_14
}
_14
}
_14
}

Behavior

Wherever the accesscontrollist facet is present, _blocklist and _allowlist can be applied to each product and result in one of the following scenarios:

_blocklist_allowlistResult
Empty value or nonexistent specificationEmpty value or nonexistent specificationThe product will always be visible.
Defined valueEmpty value or nonexistent specificationThe product will be visible unless the accesscontrollist value is included in _blocklist.
Empty value or nonexistent specificationDefined valueThe product will be visible only if the accesscontrollist value is included in _allowlist.
Defined valueDefined valueThe product will not be visible to anyone. This is an invalid scenario.
Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page