Loading the JS library

Load the Operata JS script in the <head> of your CCP application

<script src="https://static.operata.io/operata.js"></script>

Or use our npm package (if you are using a javascript bundler like webpack or parcel)


npm i operata

Load library

import {Operata} from 'operata';

Initialise the AWS softphone with the reference set to your Amazon Connect instance.

const softphoneDiv = document.getElementById('softphone');
const yourCCPPage = '<ccp url>';
const softphoneParams = {
"ccpUrl": yourCCPPage,
"loginPopup": true,
"softphone": { "allowFramedSoftphone": false }
connect.core.initCCP(softphoneDiv, softphoneParams);
connect.core.initSoftphoneManager({ allowFramedSoftphone: true });

Configure Operata options to your group instance and add the script tag contents at the bottom of the <body> tag in your softphone deployment.

const operataOptions = {
awsCCPUrl: '<Your CCP URL>',
operataGroupID: '<Your Operata Group ID',
operataGroupSecret: '<Your Operata Group Secret>',
loadSoftphone: false, // This is optional. Enable a softphone here <defaults to false>. Skip step 3 if you set this options to true.
Operata(operataOptions).then(() => {
//execute anything after operata has been initialised.
}).catch((err) => {
//handle operata initialisation error.

Initialisation Options

Did this answer your question?