Skip to content

AgnesCorpuz/PCDialer

Repository files navigation

PureCloud Dialer

What is this repository for?

This is a sample project using PureCloud Embeddable Framework and PureCloud SDK. This project is written in Node JS using Express and Mongo DB as the database.

PureCloud Embeddable Framework

Different functions of the PureCloud Embeddable Framework are used in this project such as Click to Dial, Screen Pop Up and Process Call Logs. Visit this site for more information about Embeddable Framework. For details how to create your own framework.js file, click here.

PureCloud SDK

This application show how PureCloud Platform APIs is called from the client. Outbound APIs are called in this project such as creating a contact list, adding contacts to a contact list and creating a campaign.

PureCloud Javascript SDK

For details on how to integrate with PureCloud SDK, client libraries are provided which wrap the REST calls in a simple to use interface. There are two ways of using the Javascript SDK for web app:

  1. Client-Side Usage
    • Local file or CDN reference
    • Uses Implicit Grant Authentication
  2. Server-Side Usage
    • Uses NodeJS
    • Uses Client Credentials Authentication

This demo uses NodeJS and Client Credentials for Authentication.

Overview

These are the functionalities that directly make calls to the PureCloud API for Outbound Dialing:

  1. Creation of Contact List (/api/v2/outbound/contactlist)
  2. Adding Contacts to the Contact List (/api/v2/outbound/contactlists/{contactListId})
  3. Creation of Campaign (/api/v2/outbound/campaigns) - For the creation of the Campaign it’s also required to pull up the Queues and the Contact Lists from the org.
  4. Getting Progress of Campaign (/api/v2/outbound/campaigns/{campaignId}/progress)

Testing API Calls

PureCloud has an API Explorer to test API calls in the currently logged in org instance.

How do I get set up?

Prerequisites

You will need the following things properly installed on your computer.

Development Machine Set Up

Open Command Prompt and run:

windows: "C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --dbpath C:\...\PCDialer\data
osx: mongod --dbpath C:\...\PCDialer\data

Open another Instance of Command Prompt and run:

"C:\Program Files\MongoDB\Server\3.6\bin\mongo.exe"

Update framework.js file:

Copy and paste the Client ID (Implicit Grant) depending on the location to be used by the embedded agent interface.

window.Framework = {
    config: {
        name:"testApp",
        clientIds: {
            'mypurecloud.com': '',
            'mypurecloud.ie': '',
            'mypurecloud.com.au': '',
            'mypurecloud.jp': ''
        },

Update config.js file:

Copy and paste the Client ID and Secret (Client Credentials) to be used by the Platform API SDK.

module.exports = {
    "clientId" : "",
    "clientSecret" : ""
}

Viewing the page locally

Open Command Prompt to C:...\PCDialer:

npm install
mac: run "sudo node app.js " in a terminal window
windows: run "node app.js: in a command prompt with elevated privileges. 

open web browser to https://localhost/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published