cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
556
Views
0
Helpful
1
Replies

changing agent state to NOT_READY

Hi !

I am using Finesse API to change agent state, I facing error when try to change agent state to NOT_READY :

<ApiErrors>

  <ApiError>

    <ErrorType>Parameter Missing</ErrorType>

    <ErrorData>finesse.api.reasoncode.require_reasoncode</ErrorData>

    <ErrorMessage>The state change requires a valid reason code.</ErrorMessage>

  </ApiError>

</ApiErrors>

also, when change to LOGOUT or LOGIN it gives me 202 which mean ok but nothing happen on the finesse page.

it is only working when I change agent state to READY.

please help ..

1 Accepted Solution

Accepted Solutions

dekwan
Cisco Employee
Cisco Employee

Hi,

That error means that you have reason codes configured on the system, but you are trying to change the state to NOT_READY without a reason code. Per UCCE/UCCX spec, if reason codes are configured, you must provide one. You need to use the Change Agent State with Reason Code REST API, which essentially just has an additional tag of <ReasonCodeId>. To get the list of reason codes (and their ids) configured in the system, you need to use the Get Reason Code List REST API.

For the LOGOUT and LOGIN, both REST APIs are synchronous and will give a 202 successful if the request went through to UCCE or UCCX. This doesn't wait to see if it was a successful login/logout. What you need to do is to subscribe to the Finesse notifications to see what is the notification coming back. That will tell you the error you are getting with the login/logout. I would suggest using a REST client such as postman and XMPP client such as pidgin (for windows) or adium (for mac) to try out these REST API steps before attempting to program it.

Thanx,

Denise

View solution in original post

1 Reply 1

dekwan
Cisco Employee
Cisco Employee

Hi,

That error means that you have reason codes configured on the system, but you are trying to change the state to NOT_READY without a reason code. Per UCCE/UCCX spec, if reason codes are configured, you must provide one. You need to use the Change Agent State with Reason Code REST API, which essentially just has an additional tag of <ReasonCodeId>. To get the list of reason codes (and their ids) configured in the system, you need to use the Get Reason Code List REST API.

For the LOGOUT and LOGIN, both REST APIs are synchronous and will give a 202 successful if the request went through to UCCE or UCCX. This doesn't wait to see if it was a successful login/logout. What you need to do is to subscribe to the Finesse notifications to see what is the notification coming back. That will tell you the error you are getting with the login/logout. I would suggest using a REST client such as postman and XMPP client such as pidgin (for windows) or adium (for mac) to try out these REST API steps before attempting to program it.

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: