Skip to content

Data scopes

Data scopes are a concept inherent to channels and channel scopes. It's used to store data into multiple layers, like attributes of a data model.

This concept is also used to assign scope(s) to a data model or a value in application and system configuration.

Note

When referring to scopes in data, we use the semantics "data scope" and "data scope code", which in terms of store data, relate to "channel code" and "channel scope code".

This generalization exists because Amarant may be used for purposes other than e-commerce where stores may not exist as a feature.

For example, a product might have a particular set of attributes made of attribute codes and values.
If any of its attributes are configured as non-global, their values are allowed to be different in each data scope.

Imagine having three stores. Their currency and locale configuration might differ.
By editing products on a particular data scope level, we can assign different prices, names, descriptions and other attributes to them.

Same logic applies for system configuration.
A configuration parameter can be assigned to a different value within a particular data scope, if the value is allowed to be scoped, depending on its definition in system configuration.

To summarize, data scopes are basically a list of channel scope codes mapped to their parent channel code.

See also: channels, attributes

Value inheritance


Scoped values inherit parent values by default.

If a value is not found within the requested data scope and data scope code, it falls back using this strategy until it finds the first available value:

  • find by requested data scope and data scope code "default"
    • this will be skipped if the requested data scope code is already "default"
  • find by data scope "default" and data scope code "default"
    • this will be skipped if the requested data scope and data scope code are already both "default"

Switching the data scope


To switch to a different data scope, use the top right scope list option.
You will be prompted to confirm before the switch is done.

Switch data scope

Note

If a user account has limited access to data scopes, not all available scopes will be visible in the list.