Instance Introduction
This instance involves only the login, forceLogin, resetSkill, and getAgentEvent interfaces.
The following figure shows the business logic.
- An agent invokes the login interface. If the value of retcode is 0, sign-in is successful. If the value of retcode is 100-002, the sign-in fails because the agent has signed in from another client. The agent can invoke the forceLogin interface to forcibly sign in. If the value of retcode is 0, forcible sign-in is successful.
- When the agent has successfully signed in, the CC-Gateway adds the Set-GUID header to the response headers of the HTTP request. The value of the Set-GUID header can be, for example, JSESSIONID=279fe21d-2caa-4437-84c3-ab9e9dae20f5.AgentGateway0. In the value, 279fe21d-2caa-4437-84c3-ab9e9dae20f5.AgentGateway0 is the GUID, which is used by the CC-Gateway to authenticate the interfaces invoked by the agent.
- After obtaining the GUID, the agent can invoke the resetSkill interface to sign in to a specified skill queue.
- As shown in Figure 1, the agent event polling mode is used. After signing in to the skill queue, the agent periodically invokes the getAgentEvent interface to obtain agent events in polling mode. This interface is not only used to obtain agent events, but also the heartbeat line between the agent and CC-Gateway.
As shown in Figure 2, the agent event push mode is used. After the agent sign-in is successful and the skill queue sign-in is complete, the event is directly pushed to the callback address transferred during sign-in. The agent only needs to invoke the agent heartbeat interface to maintain the heartbeat between the CC-Gateway and the third-party callback address.
When the CC-Gateway uses dynamic authentication, the GUID is dynamically updated. After the GUID is updated, a Set-GUID header is added to the response headers of the HTTP requests of the getAgentEvent interface and agent heartbeat interface. The agent needs to obtain and update the GUID accordingly and uses the new GUID when invoking other interfaces.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot