Hi Domen,
In case you only have those scenarios, it should be fine and you can use shared groups as well, just not via APIs. For now, the only correct way to set shared groups is by loading accounts with balances containing shared groups through CSV files, as shown in this tutorial:
https://github.com/cgrates/cgrates/blob/master/data/tariffplans/oldtutorial/Actions.csv#L6As a sample of SharedGroups.csv you can check as below in order to apply different sorting logic of shared balances on each account.
SharedGroups.csv
#Id,Account,Strategy,RatingSubject
SHARED_A,
cgrates.org:TEST_ACCOUNT1,*highest,
SHARED_A,cgrates.org:TEST_ACCOUNT1,*highest,
At the same time, you can also implement your scenario using Attributes and still use APIs, as in here:
{
"method": "APIerSv2.SetAttributeProfile",
"params": [
{
"Tenant": "
cgrates.org",
"ID": "ATTR_REDIRECT_ACC",
"FilterIDs": [
"*prefix:~*req.Account:TEST_ACCOUNT"
],
"Attributes": [
{
"Path": "*req.Account",
"Type": "*constant",
"Value": "GROUP_ACCOUNT"
}
],
"Weight": 20
}
],
"id": 6
}
Please note that you may need to add "prefix_indexed_fields": ["*req.Account"] in the attributes section of cgrates.json if you follow the template API sample I provided.
Thanks,
Armir