Failure Handling for Task Routing Clients
Task Routing applications that use the Finesse APIs must be able to handle failure scenarios involving Finesse and CCE services.
To recover REST and XMPP connections, follow the steps described for failure recovery earlier in this chapter.
Once you recover the connections, perform more actions to recover nonvoice media state and nonvoice dialogs. The actions you perform depend on whether your application is built with the Finesse REST APIs or the finesse.min.js javascript library.
Recovery Actions for Finesse REST APIs
If your application is built with Finesse REST APIs, perform these actions to recover nonvoice media state and nonvoice dialogs:
-
Use the Media GET API to synchronize your application with the state of the agent in the application's media. For example: https://finesse_server/finesse/api/User/userId/Media/mediaId.
-
If the maxDialogLimit, interruptAction, or dialogLogoutAction settings do not match the settings set by your application at sign-in time, use the Media Sign In API to reset the settings. The Sign In API returns an "agent already logged in" error. This error is expected. The API call does not affect the agent's state in the media. The call does, however, reset the agent's maxDialogLimit, interruptAction, and dialogLogoutAction settings in the media.
-
Use the nonvoice Dialog LIST method to synchronize the application with the set of dialogs that the agent currently is assigned. For example: https://finesse_server/finesse/api/User/userId/Media/ mediaId/Dialogs.
Typically, the set of dialogs does not change when you use this command. However, in some failure cases, such as double PG failures, the set of dialogs changes when you use this method.
Recovery Actions for Finesse.min.js Javascript Library
Media settings (maxDialogLimit, interruptAction, and dialogLogoutAction) can become out of sync after a failure.
If your application is built with finesse.min.js, when getting the media object for the application, tell the media object the media options. The finesse.min.js library uses these settings to ensure that the media object associated with your application's agent has the correct settings after recovering from a failure.
For example: