02-17-2017 05:27 PM
Is there a way to change the state and reason code for a user using the REST API?
I have tried using the reasonCodeId and code tags to assign a nested in the user tag. No matter what I try making this call only changes the agent's state to NOT_READY without a reason code.
I have been able to change the state using:
URL : https://<adrres>:8445/finesse/api/User/<user id>
Type: GET
XML:
<User>
<state>NOT_READY</state>
</User>
Solved! Go to Solution.
09-06-2019 01:54 AM
Hi dekwan,
yes, the reason code is listed there.
But I found the issue. It's a security constraint:
For Agent State Change Without Reason Code:
Agents can only act on their own User objects. Supervisors can act on the User objects of agents who belong to their team.
For Agent State Change With Reason Code:
Users can only act on their own User objects.
This means, that a supervisor cannot change agents state with reason code. The reason code must always "Supervisor initiated".
The reason why I'm trying this is following: I want to set the state of the agents from an external application. An application send this data to Finesse API so the states on both systems are synchronized. Because of this, I created a "SystemSupervisor" who has all agents assigned. For the request I'm using this user/supervisor to set the state of the agents.
Thanks for your help and your patience.
09-06-2019 09:42 AM
Hi,
Ah yes. The supervisor cannot change the agent's state with a reason code. I wasn't aware that you were trying to change it for a user vs the user itself.
Thanx,
Denise
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide