Click HERE to see how Saviynt Intelligence is transforming the industry. |
05/29/2024 08:22 AM - edited 05/30/2024 07:05 AM
How we can utilize values selected as part of multi select in dynamic attribute in form?
{
"roles":{
"primary_role":{
"role":"[B2B] Insights"
}
},
"data-access": {
"organization": [
{
"data_view": "xyz Corporation",
"unit_group": "unittype_b2b_account",
"unit_group_display_name": "Account",
"role": "[B2B] Insights"
},
{
"data_view": "xyz Corporation",
"unit_group": "GTMU1",
"unit_group_display_name": "GTMU1",
"role": "[B2B] Insights"
},
{
"data_view": "xyz Corporation",
"unit_group": "GTMU2",
"unit_group_display_name": "GTMU2",
"role": "[B2B] Insights"
}
],
"segments": [
{
"data_view": "xyz Corporation",
"role": "[B2B] Insights",
"field": "k_bp_development_cycle_flag_combined_alt",
"field_display_name": "Development Cycle",
"option": "Live"
}
]
},
"username":"john.doe@xyz.org",
"email":"john.doe@xyz.org",
"company_account_id":"r773W",
"first_name":"John",
"last_name":"Doe",
"login_blocked": "true"
}
05/29/2024 08:17 PM
Can you elaborate your requirement
05/30/2024 07:04 AM
@rushikeshvartak Please find the elaboration below:
We have configured dynamic attributes in the form. One of the dynamic attribute is multi select. It needs to be sent in the above payload.
If only 1 is selected, then we need to pass only 1 in the payload. If more than 1 are selected, then we need to pass all the values in the payload.
Let’s say GTMU1 and GTMU2 were selected in the form, then the load will look like above. But if only GTMU1 is selected, then it will be as below-
form?
Note - Role information is coming from form (DA) as well. We have hardcoded as of now.
{
"roles":{
"primary_role":{
"role":"[B2B] Insights"
}
},
"data-access": {
"organization": [
{
"data_view": "xyz Corporation",
"unit_group": "unittype_b2b_account",
"unit_group_display_name": "Account",
"role": "[B2B] Insights"
},
{
"data_view": "xyz Corporation",
"unit_group": "GTMU1",
"unit_group_display_name": "GTMU1",
"role": "[B2B] Insights"
}
],
"segments": [
{
"data_view": "xyz Corporation",
"role": "[B2B] Insights",
"field": "k_bp_development_cycle_flag_combined_alt",
"field_display_name": "Development Cycle",
"option": "Live"
}
]
},
"username":"john.doe@xyz.org",
"email":"john.doe@xyz.org",
"company_account_id":"r773W",
"first_name":"John",
"last_name":"Doe",
"login_blocked": "true"
}
05/30/2024 07:12 AM
Ok this needs to be passed from create account json ? if yes send draft JSON
05/30/2024 08:07 AM - edited 05/30/2024 08:56 AM
If GTMU1 is passed in DA -
{ "accountIdPath": "call1.message.username", "call": [ { "name": "call1", "connection": "acctAuth", "url": "https://XXX/admin/v1/users", "httpMethod": "POST", "httpParams": "{\"roles\":{\"primary_role\":{\"role\":\"${requestAccessAttributes.get('primaryRole')}\"}}, "data-access": { \"organization\": [ { "data_view\": \"ABC Corporation\", \"unit_group\": "unittype_b2b_account", "unit_group_display_name": "Account", "role": \"${requestAccessAttributes.get('primaryRole')}\" }, { \"data_view\": \"ABC Corporation\", \"unit_group\": \"GTMU1\", \"unit_group_display_name\": \"GTMU1\", \"role\": \"${requestAccessAttributes.get('primaryRole')}\" } ], "segments": [ { \"data_view\": \"ABC Corporation\", \"role\": \"${requestAccessAttributes.get('primaryRole')}\", \"field\": \"k_bp_development_cycle_flag_combined_alt\", "field_display_name": "Development Cycle", \"option\": \"Live\" } ] }, \"username\":\"${user.email}\",\"email\":\"${user.email}\,\"company_account_id\":\"${user.username}\,\"first_name\":\"${user.firstname}\",\"last_name\":\"${user.lastname}\",\"login_blocked\": true}", "httpHeaders": { "Authorization": "${access_token}", "Accept": "application/json" }, "httpContentType": "application/json", "successResponses": { "statusCode": [ 200 ] } } ] }
If GTMU1.GTMU2 is passed in DA -
{ "accountIdPath": "call1.message.username", "call": [ { "name": "call1", "connection": "acctAuth", "url": "https://XXX/admin/v1/users", "httpMethod": "POST", "httpParams": "{\"roles\":{\"primary_role\":{\"role\":\"${requestAccessAttributes.get('primaryRole')}\"}}, "data-access": { \"organization\": [ { \"data_view\": \"ABC Corporation\", \"unit_group\": "unittype_b2b_account", "unit_group_display_name": "Account", "role": \"${requestAccessAttributes.get('primaryRole')}\" }, { \"data_view\": \"ABC Corporation\", \"unit_group\": \"GTMU1\", \"unit_group_display_name\": \"GTMU1\", \"role\": \"${requestAccessAttributes.get('primaryRole')}\" },{ \"data_view\": \"ABC Corporation\", \"unit_group\": \"GTMU2\", \"unit_group_display_name\": \"GTMU2\", \"role\": \"${requestAccessAttributes.get('primaryRole')}\" } ], "segments": [ { \"data_view\": \"ABC Corporation\", \"role\": \"${requestAccessAttributes.get('primaryRole')}\", \"field\": \"k_bp_development_cycle_flag_combined_alt\", "field_display_name": "Development Cycle", \"option\": \"Live\" } ] }, \"username\":\"${user.email}\",\"email\":\"${user.email}\,\"company_account_id\":\"${user.username}\,\"first_name\":\"${user.firstname}\",\"last_name\":\"${user.lastname}\",\"login_blocked\": true}", "httpHeaders": { "Authorization": "${access_token}", "Accept": "application/json"}, "httpContentType": "application/json", "successResponses": { "statusCode": [ 200 ] } } ] }
05/30/2024 08:14 AM
05/30/2024 08:55 AM
It works when hardcoded and we are not facing issue with dynamic attribute. We need to pass the values separately that are selected in the multi select dynamic attribute.
We need to take comma separated values and pass it individually in the payload as expected
05/30/2024 12:48 PM
You can use substring and pass to call1 and second to call 2
05/31/2024 07:40 AM
We will have to use that for each value selected in dropdown. Since requestor can select more than 2 (up till 14), is there any other alternate?
06/03/2024 08:11 PM
None
06/10/2024 10:18 AM
06/10/2024 10:21 AM - edited 06/10/2024 10:22 AM
Can you share sample value and expected output
06/10/2024 02:34 PM
06/10/2024 06:55 PM
Is attribute name is unit_group?
Can you make bold what are changes per use case?
06/11/2024 04:58 AM
06/27/2024 01:41 AM
Hi @Ran
We need a call to understand your use case. Could you please provide your availability for a call as requested on the ticket #INC-2035919
Regards,
Dhruv Sharma
06/27/2024 03:09 AM
If there is a dynamic attribute named attribute1 with two values selected value1, value2. It get stored as comma separated values value1, value2
So, the "${requestAccessAttributes.get('attribute1')} should be able to give you "value1,value2". Post this you can use the string functions to get the respective values value1 and value2 respectively.
Kindly leverage the logic and create your JSON accordingly.
Regards,
Dhruv Sharma