I want to get the Date and Time of an Agent's first response to chat messages using the GenesysCloud API.

I want to checkwhether it was possible to get the Date and Time of an Agent's first response to chat messages using the GenesysCloud API. I need to calculate how much time it took for the agent between Answered(taking the agent's interaction) and the first response.

What we were able to determine:
/api/v2/analytics/conversations/{conversationId}/details
tAlert, tAnswered, tTalk etc - none of these indicate the exact time of the agent's first response and how to calculate this.

/api/v2/conversations/{conversationId}/recordings
This API allows you to read the exact time of the first response but it is not indicated in any clear way that it is the FIRST response so for the system it is hard to indicate.

Is there a specific API to determine the exact time or can you point out how to calculate this correctly?

Hi Ankit,

If you have the conversationId you can GET /api/v2/conversations/messages/{conversationId}/messages/{messageId} API to retrieve the conversation.

From there you can look at the participants array in the conversation. Each participant has a startTime and endTime attribute of when they joined the conversation. The agent participating in the conversation can be identified by their userid.

I hope that helps.

Thanks,
John Carnell
Director, Developer Engagement

Hi @John_Carnell
I am facing a similar problem. Can you please suggest how to get messageID?
Unfortunately, using /api/v2/conversations/messages/{conversationId}/messages I get a 404 and a message that there is no such conversationID - and I am sure it is correct.

Best regards,
Mateusz

From my past interactions here, 404 errors need to go through Genesys Cloud support.

@mateuszporebiak, @draeder is correct. If you're sure the ID is correct, validate that your user has appropriate access to the conversation. i.e. you're not being blocked by division configuration. If you can't tell why you're getting the 404, you'll need to open a case with Care as we do not have access to your data via the forum to investigate that.