Agent information using the web messaging SDK

I am using the SDK for web messenger/messaging (headless) to build a custom UI and it seems there is a lack of access to information about agents I'm wondering if I'm just overlooking. So a few questions:

  1. Is there any way to tell if any agents are available so I can tell users before offering them an agent?
  2. Is there any way to get any kind of estimated wait time or position in line while a user is waiting for an agent.
  3. Can I tell when an agent has joined the conversation (answers a call) or left the conversation (end messaging)?
  4. Do I have access to any personal information about the agent like their name or avatar that I can display to users?
1 Like

Hi @dlundin
The Guest APIs at the moment are not exposing any information about the internal conversation.

  1. You would need to build your own Node.JS type of App to exposed non-authenticated API into our internal Public APIs, eventually.
  2. Same as above. Or, you could leverage In-Queue flows for Messaging, which provide native Architect Built-In Variables to access Position in Queue and Estimated Wait Time: what this means is that you could provide this information back to end-user in the form of a text-message response, once the conversation starts.
  3. Agent-join event is not available. Agent-left event is being provided by the new Conversation Disconnect feature (now in Beta), so combination of messagesReceived and conversationDisconnected events should give you what you need.
  4. Agent's public facing profile (name and image) are exposed as attributes within messagesReceived (documentation will redirect you appropriately)

You say the agent's public profile are exposed as attributes within messagesReceived but when I looked at one of those returned from the SDK, I don't see any agent info. Here's an example. The channel attribute does seem to include the from piece that would have the agent's info.

{
  "time": 1678221685718,
  "publisher": "MessagingService",
  "event": "messagingservice.messagesreceived",
  "data": {
    "messages": [
      {
        "text": "This is from an agent",
        "direction": "Outbound",
        "id": "2b15ec04e1a949d21386bcab75dd318c",
        "channel": {
          "time": "2023-03-07T20:41:25.371Z",
          "type": "Private"
        },
        "type": "Text",
        "metadata": {},
        "originatingEntity": "Human"
      }
    ]
  }
}

I suspect I need to do something on the admin side to enable a public profile but I'm not seeing that. I see the docs (Add an agent name and image - Genesys Cloud Resource Center) say to an an "Agent" section to your profile but when I click "Add new section", I don't see "Agent" as an option.

Hello,

The "Agent" section should be defined in Genesys Desktop - Admin UI - Directory - Profile Fields.
From what I observed, it is pre-defined if you have web chat/message available in your Genesys Cloud org.
I don't think it can be manually created - the section contains a "name" Text field and a "profileImage" Image field. The UI only allows to create new fields of type Text or Tag (not Image).
I think the "profileImage" is to store information about the Agent image/avatar - " Add an agent image" in the article you referenced above.

Are you able to set/see the agent image (Person Details - clicking on the user avatar/camera icon - this should open an Upload Picture modal window - with a tab named "Agent Image")?
If yes, it might be worth trying to set it (in case this also enables the Agent section).
If not, I would suggest to open a case with Genesys Cloud Care so they can investigate. Customer data cannot be investigated from this forum.

Regards,

1 Like

@dlundin please double-check permission: we added a note here at step 5.e on how to configure Agent's public-facing Name and Image: Add an agent name and image - Genesys Cloud Resource Center (including necessary permissions).

1 Like

I did not have the permissions needed to add the Agent section to my profile but I got one of our account admins to do so. I do now have an Agent section and it has my name on it although I'm not allowed to edit it. However, I'm still getting the same result. Messages from the agent just contains channel: { type: 'Private' }. I also don't see an agent's name when using your own chat widget.

The permissions mentioned in Add an agent name and image - Genesys Cloud Resource Center, do I need those permissions when acting as an agent? Or do those permissions only apply to changing your profile. As I noted, I had an admin add the Agent section and set my name. Do I need those permissions in order for my profile information to be provided to the chat widget?

1 Like

Hi Damon,

I don't believe you'd need those permissions for the send portion. Have you checked that your Messenger Configuration has the "Humanize your conversation" toggle enabled?

Ah thanks! That seemed to be the stone I needed to turn over. I did not have that setting on when using the Genesys chat widget. I did have the setting on for my custom UI but I think I might have updated that setting and then not changed the configuration for the deployment. I made sure I was using the latest configuration and now it seems that in both my custom UI and the Genesys chat widget I'm getting the agent info.

Sorry, I guess I still have a followup question. Even though I am now seeing my agent's name, the agent's avatar is not appearing. The instructions above suggest all I needed to do is upload an image to my profile (which you can see I've done in the screenshot above) and then it should be available. I shouldn't need to add it to the Agent section. But there's no avatar in your chat widget as you can see here.
image

Glad that helped! As for the agent avatar, have you checked that you have configured both a Profile Picture (shown to your org/colleagues) and an Agent Image? When you click your profile picture, you should also see a tab for the agent image. If you don't see this, it's likely behind the same Edit permission your admin used to configure your agent name.

Hope this helps!

1 Like

Yep, that was it. I've now got my name and avatar!

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