07-13-2023 03:16 PM
I have a gadget to make outbound calls in finesse and it is working as required but i am having challenges in returning agent to the previous state. Is there a way to get the status or track the agent status before making the call. I can return them to Ready state but if the agent was in Not-ready state before making the call, i want to put them back to the same state.
Solved! Go to Solution.
07-13-2023 11:16 PM - edited 07-14-2023 02:39 AM
Hey
In your handleUserChange event you can do something like this :
function handleUserChange(userevent) {
currentState = user.getState();
oldState = newState;
newState = currentState;
if (oldState === "NOT_READY" && newState === "OUTBOUND") {
savedOldState = "NOT_READY"
} else {
savedOldState = "READY"
}
}
currentstate = user.getState
07-13-2023 11:16 PM - edited 07-14-2023 02:39 AM
Hey
In your handleUserChange event you can do something like this :
function handleUserChange(userevent) {
currentState = user.getState();
oldState = newState;
newState = currentState;
if (oldState === "NOT_READY" && newState === "OUTBOUND") {
savedOldState = "NOT_READY"
} else {
savedOldState = "READY"
}
}
currentstate = user.getState
07-14-2023 05:31 AM
Thank You Thomas for the help.
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