[AudioHook] How to retrieve the agent's user ID in real-time?

The use-case is as follows:

  • Server receives the "open" message on call start which has the "conversationId".
  • We want to retrieve the agent's "userId" when the agent picks up the call.

To do this, we found that the "v2.detail.events.conversation.{id}.user.start" would be useful. I see that the user start event is defined as: "The UserEndEvent gets emitted when user/agent session ends.". However, this event does not always get pushed to the server despite subscribing to the topic. I have noticed cases where there is a "user.end" event, but no corresponding "user.start" event.

Need clarification on:

  • What do we mean by "user/agent session starts"?
  • Is there alternative approach for solving this problem?
  • Why don't we receive the "user.start" event? We first subscribe to the queue conversations, and soon as the conversation starts, we subscribe to the conversation topics, including user.start. Is the event getting missed out?

Let me know if any additional information / clarification is required!

1 Like

Hi

If I understand correctly , you are looking for the userId of the agent picking up the call. Did you try using
[GET /api/v2/conversations/messages/{conversationId}/messages/{messageId} ] based on the conversation Id. (https://developer.genesys.cloud/devapps/api-explorer#get-api-v2-conversations-messages--conversationId--messages--messageId-) API

The participants lookup in this will help you details of the agent's user ID as well !!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.