CONFIG TARGET
Config Target
{
"name": "Business Unit 1",
"target": "business-units/b1",
"parent": "tenants/self"
}
Config values are defined on specific targets, each target belongs to some level and has a parent target.
Targets form a tree (one tree per value kind).
The deeper into the tree you are the more specific the targets are, see inheritance for more info.
Config levels
Config levels include:
- global (
tenants/all
) (shared by all tenants) - tenant (
tenants/self
) - business unit group (
business-unit-groups/*
) - business unit (
business-units/*
) - workstation (
business-units/*/workstations/*
)
Targets exist on specific level, and generally target's parent is on the higher level (in this list).
Example:
- target on business unit level:
business-units/b1
- target on workstation level:
business-units/b1/workstations/w1
However, there are some exceptions:
- Business unit group's parent can be another group.
- Business unit's parent can be either a group or the tenant itself (BU is not a part of any group).
- Global target's parent is
root
, this target does not exist and is used to represent a beginning of the target tree. - Workstation targets contain their business unit's id because workstation ids are only unique in the business unit scope.
How to know what targets exist?
All of accessible targets for a user are predefined in the service, and you can not define new ones in the service itself.
Global
target is the default value for a specific configuration kind, so it has to be defined on the kind itself. Tenant
targets are created when a new tenant is created in the IAM system of the HiiRetail.
Business Unit
and Business Unit Group
targets share the same scope and inheritance hierarchy as the entities from the
Business Unit Management (BUM) API.
To create new targets in the CCC you need to define them in the BUM API, and they will be picked up automatically. Be aware
that you have to specify 'customer-configuration'
as a group type of group that you want to use as a target.
Workstation
targets exist as Devices from OCMS API.
To see the specific store workstations in the CCC API and the adjacent UIs you will have to set up the underlying OCMS
template that they use to communicate in HiiRetail to be a Device template. CCC will then pick up the workstation list
for all the business units.
Inheritance
Since all the targets exists as a part of some inheritance tree (like default -> tenant -> business unit group -> ... -> business unit -> workstation
),
the defined config values are always passed down the tree when requested. This means that if you request a value from some
lower level, e.g. business unit
and it is not defined there, CCC will traverse the tree upwards until it finds a value,
or if it can't find one, it will return 404.
Examples:
put("tenants/self", 123)
get("tenants/self") // 123
get("business-units/b1") // 123, inheritedFrom: tenants/self
get("business-units/b1/workstations/w1") // inheritedFrom: tenants/self
put("business-units/b1", 456)
get("tenants/self") // 123
get("business-units/b1") // 456
get("business-units/b1/workstations/w1") // 456, inheritedFrom: business-units/b1
More on config values definition and how it interacts with target inheritance here.
Also see Gotchas when defining config kinds