SDK

Getting started with embedding the Operata Collector in your custom CCP

Load the Operata JS script

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

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

NPM (Optional)

Optionally, you can 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

<script>
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 });
</script>
📘

Be sure to replace ccpURL with your Amazon Connect CCP URL.

https://name of your instance.awsapps.com/connect/ccp-v2/

Configure Operata options

  1. Update your awsCCPUrl , operataGroupID and operataGroupSecret
  2. Add the script tag contents at the bottom of the <body> tag in your softphone.
<script>
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.
  	loadAgentAssist: true,
    headsetStatsCollection: true,
    ccpLogCollection: 'DEBUG'
};
Operata(operataOptions).then(() => {
    //execute anything after operata has been initialised.
}).catch((err) => {
    //handle operata initialisation error.
});
</script>

Initialisation Parameters

ParameterOptionalDefaultDescription
awsCCPUrlfalsenoneThe required CCP URL is defined in your connect instance on AWS
operataGroupIDfalsenoneThe required groupID field defined by Operata in your account
operataGroupSecretfalsenoneThe required security token issued for you Operata group
loadSoftphonetruefalseEnables a integrated softphone by simply setting a flag to true
locationtrueemptySet the location of this softphone. this can be used for filtering of data
loadAgentAssisttruefalseEnable Operata Agent Assist feature to load within softphone
headsetStatsCollectiontruefalseEnable Jabra headset stats collection.
ccpLogCollectiontruenoneEnable CCP logs to be sent to Operata. Can be one of: ["TRACE", "DEBUG", "INFO", "LOG", "WARN", "ERROR", "CRITICAL"]