Using injectMessage or similar to share information with the agent

Before we begin a chat using the WebChat v2 widget, we gather information from the user. I'd like to inject that information to the conversation as the first message with it visible to both user and agent. For example:

Product: XXXX
Problem: 'Power supply issue'
Serial Number: 584958349804850934

When I use injectMessage, the user can see the summary but the agent cannot. Is there a way to send a message via the Widget API that both can see?

Hello,

With Widgets/WebChat v2, you can use the WebChatService sendMessage command to send a message programmatically (message sent on behalf of the customer/guest).

Regards,

Hello Jerome,

I have one question about injectMessage, it's possible to display the message that was injected in the agent side.
I'm using injectMessage to manage inactivity from the customer side (grace period), if I did not receive any message from the customer after 3 minutes, I'll send an alert message and I'll wait for 3 other minutes and if I dont receive any message I'll sent an alert message and disconnect chat.

This process works fine, but the problem is that I need to notify the agent that the system sent an alert message to the customer (and may be the system disconnect the chat session as well).

From the customer side:

From the agent side:

I tried to use WebChatService.sendMessage, but the problem is that the message will be sent as the customer (guest).

Do you have any idea about this use case?
Thanks,

Regards,
Driss SELLAMI

Hello,

injectMessage only adds the text in the Widget Live Transcript UI. It does not trigger any exchange of messages with Genesys Cloud (at Guest Chat API level)

On guest side (customer on the widget), you can only send messages - identified as the guest participant.

Regards,

Ok thanks Jerome.

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