Available strategies

Currently SDK only allows to define two-level hierarchy with single level or receivers by setting the “SingleLevelReceiver” strategy for the channel.

To set the strategy, start building the channel with this strategy. ChannelBuilder will set up levels for you. Below is an example how to set up the “SingleLevelReceiver” strategy.

ChannelBuilder.hierarchicalChannel("google-demo-channel", "google-merchant-adapter", 
    "Google merchant center - shopping", 
    "https://en.wikipedia.org/wiki/File:Google_2015_logo.svg",
    ChannelHierarchyMutationStrategy.SINGLE_LEVEL_RECEIVER);

This will create following hierarchy configuration:

"hierarchy": {
    "isHierarchical": true,
    "level": 0,
    "levels": [
        {
            "level": 0,
            "name": "Global",
            "strategy": "SingleLevelReceiver",
            "externalChannelAttributesOverride": {
                "requireReceiversOnSubmit": true
            }
        },
        {
            "level": 1,
            "name": "Receivers",
            "strategy": "SingleLevelReceiver"
        }
    ]
}