We are integrating the Genesys Cloud Web Messaging widget into our portal and need to pass custom attributes for authenticated users. The goal is to map the user’s internal ID to a custom attribute so our Architect flow can recognize them.
I’m using the genesyscloud.messenger.init method. For anonymous users, the standard setup works fine. However, when I try to set custom attributes via the guestAttributes object before initializing, the SDK seems to ignore them or throw a silent error.
Here is the initialization code:
const config = {
organizationId: 'our-org-id',
deploymentId: 'our-deployment-id',
guestAttributes: {
'user.id': '12345',
'user.role': 'vip'
}
};
genesyscloud.messenger.init(config);
The widget loads, but when I check the conversation logs in the Admin portal, the custom attributes are missing. The documentation suggests passing them in the init config, but it feels like this only applies to unauthenticated guests. Is there a separate API call required to update the guest profile after init, or am I missing a flag in the config object? The standard REST endpoint /api/v2/conversations/messaging/conversations requires an access token, which we don’t have for the guest context.