Assistance with Web Messaging Participant Connections in Genesys Cloud Embeddable Framework

Hello Genesys Developer Community,

I'm currently working on a use case involving the Genesys Cloud Embeddable Framework, where I'm attempting to monitor web messaging interactions and perform participant transfers programmatically. My goal is to track when participants are fully connected to a conversation and then transfer the interaction to another queue using the patchConversationsMessageParticipant API.

Use Case Details:

  • Framework: Genesys Cloud Embeddable Framework
  • Objective: Monitor web messaging interactions, detect when participants are fully connected, and transfer the interaction to a specific queue.
  • Environment: Region euw2.pure.cloud

Issue: I'm encountering an issue where the participants are not being fully connected, and the API calls to transfer the interaction result in a 400 Bad Request error with the message [Request body must not be null]. The retries continue indefinitely without success. I suspect this might be related to how participant states are being handled within the Embeddable Framework.

Logs and Code Examples:

Here are some log snippets that highlight the issue:

2024-08-20T11:00:08.798Z [info]: WebSocket connection established.
2024-08-20T11:00:08.799Z [info]: Attempting to subscribe to notifications. Retry count: 0
2024-08-20T11:00:09.084Z [info]: Subscription successful.
2024-08-20T11:00:36.110Z [info]: Participants not fully connected yet. Retrying...
2024-08-20T11:00:46.291Z [info]: Participants not fully connected yet. Retrying...
2024-08-20T11:00:56.315Z [info]: Participants not fully connected yet. Retrying...

And here's a code snippet of how I'm trying to monitor the interactions and perform the transfer:

const platformClient = require('platformClient');
const conversationsApi = new platformClient.ConversationsApi();

async function monitorAndTransfer(conversationId, participantId, targetQueueId) {
// Check participant connection status
const participants = await conversationsApi.getConversationParticipants(conversationId);
const isFullyConnected = participants.every(participant => participant.state === 'connected');

if (isFullyConnected) {
    try {
        const transferPayload = {
            queueId: targetQueueId
        };
        await conversationsApi.patchConversationsMessageParticipant(conversationId, participantId, transferPayload);
        console.log('Transfer successful');
    } catch (error) {
        console.error('Transfer failed:', error);
    }
} else {
    console.log('Participants not fully connected yet. Retrying...');
    setTimeout(() => monitorAndTransfer(conversationId, participantId, targetQueueId), 5000);
}

}


**Questions:**

1. Has anyone encountered similar issues with participants not being fully connected in web messaging interactions using the Embeddable Framework?
2. Are there specific considerations or best practices I should follow to ensure participants are fully connected before attempting a transfer?
3. Any suggestions or insights on resolving the `400 Bad Request` error when calling `patchConversationsMessageParticipant` would be greatly appreciated.

Thank you for your assistance!

Hi Any updates on this one

Hi Any feedback

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