Anshul_Batheja | 2021-08-20 10:37:38 UTC | #1
hi,
I am looking into the notification services that genesys provides for various topics. I tried out subscribing to various topics using the notification tester to receive message events like topic a for a user, a queue, a recording but none of those events had actual message bodies in them. The data was more around the participants like agent data or customer(guest) context. Can some help me with the topics to subscribe, to get the active chat conversation text, both from customer and agent. I am referring to: Use the notification service (genesys.cloud) page
Jerome.Saint-Marc | 2021-08-20 10:49:42 UTC | #2
If it is about WebChat v2, v2.conversations.chats.{conversationID}.messages for messages and typing indicators See Agent Chat APIs
Regards,
Anshul_Batheja | 2021-08-20 11:21:13 UTC | #3
Hi, i know these API that you have mentioned and have been using them already, but wanted to check if i could make async calls to store the conversation data externally when chat message is received or sent from customer or agent.
Jerome.Saint-Marc | 2021-08-21 09:58:14 UTC | #4
"Can some help me with the topics to subscribe, to get the active chat conversation text, both from customer and agent." The only notification topic that carries the chat message/content is v2.conversations.chats.{conversationID}.messages. It will be triggered whenever the customer or the agent sends a message.
Regarding API requests, GET /api/v2/conversations/chats/{conversationId}/messages is the way for a user to retrieve messages of a WebChat v2 conversation (previous messages exchanged in the conversation). But as stated in the API request description (the link above): "The current user must be involved with the conversation to get its messages.". So this request is only supported for authorization/bearer token related to a user context/credentials (Implicit Grant, Authorization Code Grant, SAML Bearer grant) and only if the user making this request is a participant of the chat conversation. So it won't work with a Client Credentials Grant token.
Otherwise, you'll have to retrieve the messages via the recording of the chat conversation (if you have created and enabled a Policy to record chat conversations). After the chat conversation is terminated and when the recording is ready, you can retrieve the exchanged messages via GET /api/v2/conversations/{conversationId}/recordings.
Regards,
Anshul_Batheja | 2021-08-23 11:44:14 UTC | #5
hi,
i checked for the mentioned topic but i dont see it listed. I can see there is a topic for userid and messages associated with that, but nothing related to v2.conversations.chats.{conversationid}.messages
 |
 |
Could you send me a screenshot if possible of the topic that you are referring to.
Thanks.
Jerome.Saint-Marc | 2021-08-23 11:49:15 UTC | #6
It is not listed in the Notification Tester (in Developer Tools) drop-down list. But you can type it manually in the text area.
Regards,
Anshul_Batheja | 2021-08-23 12:57:39 UTC | #7
Thanks. It worked.
Anshul_Batheja | 2021-08-23 13:01:48 UTC | #8
I had one more question: subscription to the message API does give us the messages, but how about the Agent details like name, profile pic etc, how do we get that. I am creating a custom widget which would need to reconnect when customer navigates from one page to the other. This widget should show the message history, along with Agent details like name and profile pic. Subscribing to this topic(API) should give me the messages but not agent details. Need help on that
Jerome.Saint-Marc | 2021-08-23 13:44:07 UTC | #9
The topic (v2.conversations.chats.{conversationID}.messages) I mentioned above is for the Agent side. Not the customer side.
Guest Chat API is described here.
Regarding reconnect when navigate between pages: Note that the Genesys Widgets v2.0 - built-in customer side UI already supports this. If the widgets libraries and scripts are loaded on a different page, they will attempt to reconnect to the same chat session (id stored as cookie), if the session has not timed out (a couple of seconds to reconnect a session - WebChat is synchronous). Genesys Widget v.2 will automatically display the past transcript and participants.
If you are doing this with the Guest Chat API directly, when you navigate to a different page, you just need to reconnect your websocket. The Create a new chat must not be called again - otherwise, it will generate a different chat session. See here for details on reconnecting a guest
To get the list of members, you can leverage this API request to get the members of the chat. You whould get agent nickname, and profile picture.
Regards,
Anshul_Batheja | 2021-08-23 13:53:38 UTC | #10
I was using this already, it needs two API calls to get to the agent details, not the member API that you mentioned but conversation{id}/chat and then user{id} but it increases the load time when navigating or reconnecting. Thats the reason i wanted to know more about the genesys widget UI. I cant use the Genesys Widget 2.0 UI as it is not very flexible in terms of the UX/CX. Genesys Out of the box widget does have a lesser load time, maybe uses some cached message technique. Nevertheless, thanks a lot for your help!
system | 2021-09-23 13:51:18 UTC | #11
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11794