cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4850
Views
0
Helpful
16
Replies

Changing agent state and code with API

bhouston15
Level 1
Level 1

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>

16 Replies 16

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.

dekwan
Cisco Employee
Cisco Employee

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