Much appreciate your help.
Community is a rich knowledge builder with people like you.
Original Message:
Sent: 05-08-2024 17:37
From: Anton Vroon
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
Sure, through this together pretty quickly, so could probably be done better.
Contracts:
Configuration
Output example:
In the flow, remember to set default value for the boolean to false, check for empty list etc
That Boolean Assignment
------------------------------
Anton Vroon
Original Message:
Sent: 05-08-2024 02:35
From: Khurshid Ali
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
Hello @Anton Vroon, Thanks for your input.
Sorry to ask this. can you please share a screenshot of the data action how to put this in the response and call flow.
------------------------------
Khurshid Ali,
Consultant / Developer / Tech Lead,
NCR Voyix,
khurshid.ali@ncrvoyix.com,
New Delhi,
India
Original Message:
Sent: 05-05-2024 18:03
From: Anton Vroon
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
One option is to use:
Expand authorization
Then, where 123-456-789 is the user id, it would look like:
In your data action response template, you want an array, with a path like:
$.entities[0].authorization.roles[*].name
And then in your flow, do findfirst(Task.ReturnedArray, "Your Supervisor Role Name") >= 0
if -1 then not found, if 0 or more than they have the role
------------------------------
Anton Vroon
Original Message:
Sent: 05-05-2024 02:45
From: Khurshid Ali
Subject: How to validate (logical decision) if the user has a 'supervisor role' using API?
Hello Community,
I am new and learning Genesys cloud and data actions on a fast pace as per the requirements.
I want to validate on my digital bot flow if the user is a supervisor, if yes, take one action if not, take another action.
have explored these APIs:
GET /api/v2/authorization/subjects/{subjectId}: Returns a listing of roles and permissions for a user.
GET /api/v2/users/{subjectId}/roles: Returns a listing of roles and permissions for a user.GET
both gives me a list of users or roles.
How do I either filter specific role to a user or specific user to a role? I believe either would work for me.
Thanks.
#ArchitectureandDesign
#ConversationalAI(Bots,AgentAssist,etc.)
#Integrations
------------------------------
Khurshid Ali,
Consultant / Developer / Tech Lead,
NCR Voyix,
khurshid.ali@ncrvoyix.com,
New Delhi,
India
------------------------------