build a custom aws connect CCP

0

Hi team, i am try to build this website that have impeded CCP to display a custom attribute sent by aws connect (set custom attribute ) in the work flow ,

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script type="text/javascript" src='https://cdn.jsdelivr.net/npm/amazon-connect-streams/release/connect-streams-min.js'></script> </head> <!-- Add the call to init() as an onload so it will only run once the page is loaded --> <body onload="init()"> <div id="container-div" style="width: 400px; height: 800px;"></div> <script type="text/javascript"> var containerDiv = document.getElementById("container-div"); var instanceURL = "https://xxx.my.connect.aws/ccp-v2/"; // initialize the streams api function init() { // initialize the ccp connect.core.initCCP(containerDiv, { ccpUrl: instanceURL, // REQUIRED loginPopup: true, // optional, defaults to `true` loginPopupAutoClose: true, // optional, defaults to `false` loginOptions: { // optional, if provided opens login in new window autoClose: true, // optional, defaults to `false` height: 600, // optional, defaults to 578 width: 400, // optional, defaults to 433 top: 0, // optional, defaults to 0 left: 0 // optional, defaults to 0 }, region: "us-east-1", // REQUIRED for `CHAT`, optional otherwise softphone: { // optional, defaults below apply if not provided allowFramedSoftphone: true, // optional, defaults to false disableRingtone: false, // optional, defaults to false ringtoneUrl: "./ringtone.mp3" // optional, defaults to CCP’s default ringtone if a falsy value is set }, pageOptions: { //optional enableAudioDeviceSettings: false, //optional, defaults to 'false' enablePhoneTypeSettings: true //optional, defaults to 'true' }, shouldAddNamespaceToLogs: false, //optional, defaults to 'false' ccpAckTimeout: 5000, //optional, defaults to 3000 (ms) ccpSynTimeout: 3000, //optional, defaults to 1000 (ms) ccpLoadTimeout: 10000 //optional, defaults to 5000 (ms) }); } </script> </body> </html>

when i run the code am getting error in console !

connect-streams-min.js:1 Uncaught ValueError: containerDiv must be provided at new t.ValueError (connect-streams-min.js:1:450668) at t.assertTrue (connect-streams-min.js:1:445913) at t.assertNotNull (connect-streams-min.js:1:445973) at t.core.initCCP (connect-streams-min.js:1:345122) at init (ccpIndex.html:14:26) at ccpIndex.html:43:13

please help, all what we need is to display the custom attribute in a popup msg to the agent !

asked a year ago1119 views
1 Answer
1

Have you checked our self-serve workshop that teaches you how to do this? Try this link: https://catalog.us-east-1.prod.workshops.aws/workshops/e507e74d-d816-4808-94c5-58abc598c40b/en-US and see if this solves your problem

AWS
Magda
answered a year ago

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.

Guidelines for Answering Questions