We want to capture the NotReadyReasonCode as soon as an agent applies a new code using the out-of-the-box Finesse reason code drop-down. Is this possible, and just a matter of registering for a Notification Service, or is another approach required? We don't want to receive it when the call ends, or when the call enters wrap-up. Instead, we need to capture it as soon as the drop down is changed. Any guidance is appreciated.
You can't get the information when the agent makes the request (when they select it from the dropdown). You would need to get it when Finesse successfully makes the change. But, you will need to get ALL the agent state events, not just this particular scenario and you would need to filter it yourself.
If you are making a gadget, take one of the sample gadgets and add the logic in the handleUserChange method. You would probably need to store the last state & reason code and do a diff between the previous event and the current event.
If you are not making a gadget, this wouldn't really work, because a subscription to the notification service would be a second connection (The out of the box desktop being one), which is not supported.
We want to catch a 'pending' not ready request, but the handleUserChange() event does not fire.
Agent is Talking and selects a Not Ready Code (Pending).
We want to capture the selected NR code (Pending - Not Ready - Lunch), and remember it, to apply while the agent is in Wrap-up BEFORE the lengthy wrap-up timer expires. (We have a customer that wants to send a custom message to tell Finesse to go Ready while in Wrap-up). For this scenario, we want to pull the NR Reason Code ID, and
Our developer noticed that the user.isPendingStateChange() function doesn't appear to work, because it should return true in the scenario above, but it doesn't. Is this not working because the NR Reason Code IDs are not setup correctly, or does the function have an issue.
If you are trying to capture the pending state, then you are right that it won't go to the handleUserChange.
Unfortunately, there isn't a way to capture pending state as it is a browser side feature. If you notice, the pending state on the UI disappears if you refresh the browser (but the execution will still take place)
The user.isPendingStateChange() is working correctly. The documentation states: