cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
900
Views
10
Helpful
3
Replies

Change State Gadget not working

Hello,

 

I am trying to change the agent state to not active with reason code via API, here is the code i am using:

 

var label = user.getReasonCodeLabel()

var state = "NOT_READY";
rc = {id: '25'} ;
user.setState(state,rc, {
error : handleChangeStateError
};

 

I am getting error :

<ApiError>
<ErrorType>Invalid Input</ErrorType>
<ErrorData>finesse.api.reasoncode.not_valid</ErrorData>
<ErrorMessage>The Reason Code specified in the request does not exist</ErrorMessage>
</ApiError>
</ApiErrors>

 

Although i am sure of the ID i ran the get command on the chrome:

<ReasonCode>
<uri>/finesse/api/ReasonCode/45</uri>
<category>NOT_READY</category>
<code>20</code>
<label>CallBack</label>
<forAll>false</forAll>
<systemCode>false</systemCode>
</ReasonCode>
 
What could be the issue here?
 
Amer
1 Accepted Solution

Accepted Solutions

TO ALL,

 

the problem was related to cache, i first tried a wrong id, and after i changed it the finesse didnt take the change even with the nocache at the URL, the only way to make it work was to restart finesse tomcat.

 

Thank you Dinese for the help.

 

Amer

View solution in original post

3 Replies 3

dekwan
Cisco Employee
Cisco Employee

Hi,

 

From the code you pasted and the output of the GET, the ID shows to be 25 in the code, but 45 in the output. The id is the number from the uri, so it should be 45 in this case.

 

Thanx,

Denise

Hello Denis,

 

Sorry typo mistake, i did correct it to 45 but still the same problem.

 

Amer

TO ALL,

 

the problem was related to cache, i first tried a wrong id, and after i changed it the finesse didnt take the change even with the nocache at the URL, the only way to make it work was to restart finesse tomcat.

 

Thank you Dinese for the help.

 

Amer