Alternative method: Pass contact attributes directly from snippet code - Amazon Connect

Alternative method: Pass contact attributes directly from snippet code

Note

All contact attribute keys passed using the snippet code will be pre-pended with HostedWidget-. In the following example, the agent side will see the contact attribute key value pair HostedWidget-foo: 'bar'.

Although these attributes are scoped with the HostedWidget- prefix, they are still mutable client-site. Use the JWT setup if you require PII or immutable data in your contact flow.

The following example shows how to pass contact attributes directly from snippet code without enabling widget security.

<script type="text/javascript"> (function(w, d, x, id){ /* ... */ })(window, document, 'amazon_connect', 'widgetId'); amazon_connect('snippetId', 'snippetId'); amazon_connect('styles', /* ... */); // ... amazon_connect('contactAttributes', { foo: 'bar' }) <script/>