Skip to content

Amazon Connect Chat Messages Not Appearing on CCP for Agent After Sending via connectparticipant API

0

I'm currently working with Amazon Connect to send chat messages to an agent using the connectparticipant API. I am able to successfully start a chat contact, create a participant connection, and send a message, but the message does not appear on the agent's Contact Control Panel (CCP).

Here are the steps I've followed:

  • Started a chat contact using aws connect start-chat-contact.
  • Created a participant connection with aws connectparticipant create-participant-connection.
  • Sent a message using aws connectparticipant send-message.
aws connect start-chat-contact --instance-id <INSTANCE-ID> --contact-flow-id <CONTACT-FLOW-ID> --participant-details DisplayName=ZZZ

aws connectparticipant create-participant-connection --type CONNECTION_CREDENTIALS --participant-token <participantToken>

aws connectparticipant send-message --content-type text/plain --content hi --connection-token <connectionToken>
/* Returns MessageId and timestamp e.g.:
{
    "Id": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
    "AbsoluteTime": "2022-10-26T07:03:19.534Z"
}
*/

While the message is successfully sent (I receive a response with the MessageId and AbsoluteTime), the agent does not receive the message on the CCP. Also i can see the CTR in contact search and i have found the chat there.

It seems the contact flow is not being invoked or triggered.

1 Answer
1

Based on the information provided, it appears that while you've successfully initiated a chat contact and sent a message using the Amazon Connect APIs, the message is not appearing in the agent's Contact Control Panel (CCP). This issue could be related to a few factors:

  1. Connection Acknowledgment: When using message streaming APIs instead of WebSockets, it's crucial to send a connection acknowledgment event. This step is equivalent to connecting to a WebSocket and is necessary for the flow to begin. Make sure you're calling the CreateParticipantConnection API after StartContactStreaming to mark the 'Customer' as connected. This ensures that messages are sent only after confirming that the customer is ready to receive them.

  2. Contact Flow Invocation: If the contact flow is not being triggered, it could be because the flow hasn't started properly. The flow begins only after the connection acknowledgment event is sent. Double-check that you're following the correct sequence of API calls, including the connection acknowledgment step.

  3. Queue Assignment: Ensure that the chat contact is being properly routed to a queue that the agent is assigned to. If the contact isn't in the correct queue, the agent won't receive the messages in their CCP.

  4. CCP Configuration: Verify that the agent's CCP is properly configured and that there are no issues with the browser settings, especially if using Google Chrome. Sometimes, audio policy flags in Chrome can affect the CCP's functionality.

  5. Websocket Connection: If you're using WebSockets, make sure the customer's chat interface maintains a stable WebSocket connection. If there's a disconnection, the chat interface needs to re-establish the WebSocket connection and make a chatSession.getTranscript request to retrieve any missing messages.

To troubleshoot further:

answered 10 months ago
EXPERT
reviewed 10 months ago
  • The sequence should be:

    1. StartChat
    2. StartContactStreaming
    3. ParticipantConnection
    4. SendMessage

    StartContactStreaming required a contact ID, how to pass the Contact ID?

    Also it will be really helpful if you share the details of acknowledgment step/process!

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.