Skip Navigation
Expand
API Chats are ending unexpectedly
Answer ID 12823   |   Last Review Date 04/29/2024

Why are end-users marked as absent, although replying?

Environment:
Chat API
Oracle B2C Service
 
Issue:
Agents utilizing the Chat API integration experience abrupt terminations of ongoing conversations. Despite actively engaging with users, agents receive unexpected messages indicating that the conversation has ended.
 
Resolution:
To facilitate real-time communication between end users and the chat server, it's imperative to maintain a continuous getMessages loop within the client application. This loop ensures that as soon as a response is received from a getMessages call to the chat server, a new getMessages request is promptly dispatched. By adhering to this protocol, the chat engagement remains active throughout its duration, fostering an optimal user experience.

Any interruption in the getMessages loop can disrupt the flow of communication between the client application and the chat server. If there is a delay of over one minute since the last getMessages call, the absent handler is triggered. This signifies a period of inactivity in the chat engagement, leading to the behavior in which the chat is ended unexpectedly on the end-users side.

To ensure seamless chat connectivity in end user client applications, it's recommended to implement the following best practices:
•    Regularly iterate the getMessages loop to maintain active communication with the chat server.
•    Monitor and manage any potential delays or interruptions in the getMessages loop to prevent triggering of the absent handler.
•    Implement logging and monitoring mechanisms to track API usage, monitor performance metrics, and capture relevant diagnostic information. Log API requests and responses for audit purposes and monitor key performance indicators to identify any potential issues or bottlenecks.

More information in regards to the getMessages API Call, can be found in our documentation here.