npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

operata

v1.0.36

Published

Loads JS required to collect WebRTC stats.

Downloads

2

Readme

Operata JS library integration

If you want your own branding or softphone features then you will need to host your own Amazon Connect Softphone (CPP) and add the Operata JS library as shown in the steps below:

1. Source the Amazon Connect softphone, host it in your environment and test.

2. Once this is working, add the operata.js (or import operata) to softphone page, as below:

Loading the JS library

Load the Operata JS script in the <head> of your 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)

Installation

npm i operata

Load library

import {Operata} from 'operata';

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

<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>      

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

<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. 
};

Operata(operataOptions).then(() => {
    //execute anything after operata has been initialised.
}).catch((err) => {
    //handle operata initialisation error.
});
</script>

5. Use your AWS console to allow https://softphone.operata.io to Integrate with your Amazon Connect instance, the Operata Help Centre has details.

Testing

To test stats collection, make a call from your Amazon Connect softphone and you will see the statistics updated every 10 seconds.

If you see 'Welcome to Operata Agent Assist' when you select the Operata Icon, then this is working.

If you have any issues then email us at [email protected]

Browser Support

Current browser support is limited to

Desktop

  • Chrome: Latest

API

Initialisation Options

| option | optional | default | description | |:-------------|:----------------:|:------------:|:---------------------------------------------------------------| | awsCCPUrl | false | none | the required CCP URL is defined in your connect instance on AWS | | operataGroupID | false | none | the required groupID field defined by Operata in your account | | operataGroupSecret | false | none | the required security token issued for you Operata group | | loadSoftphone | true | false | enables a integrated softphone by simply setting a flag to true | | loadAgentMessenger | true | false | enables Operata Agent Messenger widget | | location | true | '' | set the location of this softphone. this can be used for filtering of data | | ccpLogCollection | true | none | enables CCP log collection. Can be one of: ["TRACE", "DEBUG", "INFO", "LOG", "WARN", "ERROR", "CRITICAL"]|

Agent Issue Reporting

You can send an Agent reported issue via Operata stats collector API. This is done by sending an event on the Operata eventBus. Here is an example:

    // Obtain a reference to the eventBus when Operata stats collection is initialised.
    let eventBus = null;
    Operata(operataOptions).then((eb) => {
        console.log("Loaded Operata Softphone");
        eventBus = eb;
    }).catch((err) => {
        console.error(err);
    });

    // ....
    // Send the issue via the eventBus
    eventBus.emit("agent-reported-issue", 'Missed call, Softphone did not ring', 'Default',
             {extraField: 'Some optional data'}, function(sent){
        if (sent){
            alert('Issue submitted.');
        }else{
            alert('An error occurred while submitting the issue.');
        }
    });

eventBus.emit method accepts following arguments

| Argument | Mandatory | Description | |:-------------|:-------------|:---------------------------------------------------------------| | eventName | yes | Please use "agent-reported-issue" for Agent issue reporting. | | cause | yes | Cause of the issue. Customer defined. | | severity | no | Severity of the issue. Customer defined. | | extra | no | An object of extra data. Customer defined. | | callback | no | A callback method. This is called once the issue is submitted. |

Operata associates Agent reported issues with the callContactId using the following rules:

  1. Issue reported before taking the first call after going offline - associate with no callContactId
  2. Issue reported before taking the next call - associate with the last callContactId
  3. Issue reported while on a call - associate with the current callContactId
  4. Issue reported after taking a call - associate with the last callContactId

Recommended Versions of Amazon Connect Libraries

The versions below have been tested with the Operata library and are recommended.

| CCP | connect-streams | connect-rtc | | --------|:---------------:| :-----------:| | v2 | 1.5.1 | 1.1.7 |

Built With

Authors

  • Operata Dev Team - Initial work - Operata