Skip to content

Conversation

@simong
Copy link
Contributor

@simong simong commented Nov 11, 2025

No description provided.

Comment on lines +484 to +487
// TODO: Move this one into the SDK. There may or may not be a race condition here. to be determined..
amazon_connect('contactAttributes', {
'cobrowse_device_id': deviceId,
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dyon : This is the bit that (ideally) is swizzled through cobrowse-sdk-js. I didn't look too closely, but we'll want to double-check race conditions, as I think the contactAttributes are either only able to be set once or have to be done in the same tick as some of the other configuration.

amazon_connect('styles', { iconType: 'CHAT', openChat: { color: '#ffffff', backgroundColor: '#123456' }, closeChat: { color: '#ffffff', backgroundColor: '#123456'} });
// https://docs.aws.amazon.com/connect/latest/adminguide/pass-display-name-chat.html
amazon_connect('customerDisplayName', (callback) => callback(name));
amazon_connect('snippetId', 'QVFJREFIajZXQjcyUXcrNFBEZVZpU0tIdzdFSjJTRnF3a2E2WXVITnhwS1FrcWpBd1FFZjdsbCt4REtYNjFXSGxEbDhhdkx4QUFBQWJqQnNCZ2txaGtpRzl3MEJCd2FnWHpCZEFnRUFNRmdHQ1NxR1NJYjNEUUVIQVRBZUJnbGdoa2dCWlFNRUFTNHdFUVFNU2thU1ZDOExVekM0cUIvR0FnRVFnQ3U5V1BtN1dwZkFjUGxJUWdrQkNmMi91WW5jYnlURUxCSi9vZzFLSUd2UTFBV3hON3JDeUVjSERncUk6OnBwQXZJRW1kV1BjSjBBYWROR2EvQWxmTWJ6U095YnN0QTlaMlI4MFMxY2VkdVRVWERkb2dJenpCbnZVditHMWRCSXFsRWJ2M3JLN29xaWVBVjVqOUdhZEJUQUN3U05kWEc2aVBIMHVyT2x4Q0YzK0lhck9Pd3JSak9PYmpOUkxXMENMQ2ZZdjNLRVQ4SHh6bllkOTdBY3hJK05McnBBVT0=');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dyon : We'll want to double-check if this snippetId is specific to the amazon connect instance. That would be unfortunate, but then would require a query param I suppose :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant