11-15-2021 09:01 AM
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:
Solved! Go to Solution.
11-15-2021 12:47 PM
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
11-15-2021 10:38 AM
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
11-15-2021 10:40 AM
Hello Denis,
Sorry typo mistake, i did correct it to 45 but still the same problem.
Amer
11-15-2021 12:47 PM
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
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