Code Monkey home page Code Monkey logo

avayaexperienceplatform / clid-selector-widget Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 282 KB

This custom widget gives Agents/Supervisors the functionality to set the Caller ID before placing an outbound Voice Call from Workspaces, utilizing the Workspaces Widget Framework methods.

License: MIT License

Dockerfile 1.17% JavaScript 86.44% Shell 0.09% HTML 4.68% CSS 7.62%
agents avaya avaya-cloud avaya-experience-platform caller-id contact-center voice widgets workspaces axp

clid-selector-widget's Introduction

CLID Selector Widget

Description

This custom widget provides Agents/Supervisors with the ability to:

  • Set the Caller ID before starting an outbound voice interaction, transferring to, or consulting an external number, utilizing the Workspaces Widget Framework methods.

โš ๏ธ Disclaimer

๐Ÿ’ก This sample application is provided for demonstration purposes only and is not intended for production use. We assume no responsibility for any issues arising from its use.


Technical Details

The widget primarily uses AXP Admin - Voice APIs, alongside the Workspaces Widget Framework SDK.

Workspaces Widget Framework SDK

  • onDataEvent("onAgentStateEvent", callback): Subscribe to changes in the Agent's state (logged in, ready, not ready, etc.).
  • getConfiguration().user: Retrieve the full logged-in Agent configuration.
  • getCapabilities(): Determine if the Agent can use VOICE channels.

Admin APIs

Configuration & Installation

The widget comprises two components: the widget itself (bundles.js) and a backend component for authorization and proxying Admin API requests. Both components are not multi-tenanted and require individual deployment per tenant.

Pre-requisites include acquiring AXP Client Credentials (CLIENT_ID and CLIENT_SECRET) and an AXP API Application Key (AXP_API_APP_KEY). Node.js v18.0+ is also required.

Running the Backend Component

Refer to the AXP Proxy API build & deploy guide available here.

Building the Widget Bundle.js File for Your Tenant

The bundle.js file is built out of this react-app

  • Navigate to src/app/config.js and update the configuration to match your tenant, for example:
        export default {
            env: {
                AXP_CLIENT_ID: "YOUR_AXP_CLIENT_ID",
                AXP_PROXY_BASE_URL: "https://your_server_fqdn_running_axp-proxy-api:3001",
                AXP_ACCOUNT_ID: "ABCDEF",
                AXP_API_APP_KEY: "YOUR_AXP_API_APP_KEY"
            },
        };
  • After updating, run yarn install to install dependencies
  • Run yarn build to build the bundle.js file, to be located in the build/ folder.

Dockerized Hosting

Prerequisites

  • Node.js version 18+.
  • Docker & Docker Compose.
  • SSL Certificate & Key.
  • Upload the clid-selector-widget.json file to the Avaya Experience Platform Admin Portal -> Widget Management.

Steps

  1. Update docker-compose-dev.yml with SSL certificate paths.
  2. Run the following commands:
    yarn install
    yarn build
    docker-compose -f docker-compose-dev.yml up # add -d to run in a background process
  3. After any change, run npm run build and refresh your workspaces.

If you've done everything correctly, It should look something like this (default view without any changes).

Widget Screenshot

Manual Hosting

Hosting the Widget with NGINX

The widget can be served using any web server. Below is an NGINX configuration example:

server {
    listen 8443 ssl;
    ssl_certificate /etc/nginx/cer.cer;
    ssl_certificate_key /etc/nginx/key.key;
    add_header Access-Control-Allow-Origin *;
    root /home/username/Projects/clid-dialing-widget/build; # Path to the folder including bundle.js file
    autoindex on;
}

clid-selector-widget's People

Contributors

zaelzanati avatar

Watchers

 avatar

Forkers

daffarrel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.