CrmApiCallbacks

CrmApiCallbacks

Methods

(abstract) bringAppToFront() → {void}

Implement this callback to bring Five9 ADT iframe to front and make it visible

Returns:
Type:
void

(abstract) disableClickToDial() → {void}

Implement this callback to disable click 2 dial capability in CRM while agent is handling call in ADT

Returns:
Type:
void

(abstract) enableClickToDial() → {void}

Implement this callback to enable click 2 dial capability in CRM while agent is not handling call in ADT

Returns:
Type:
void

(abstract) getAdtConfig() → {Promise}

Implement this callback to configure behavior of ADT. This method is called only once when ADT establishes connection with CrmSdk

crmApi.registerApi({
  getAdtConfig: () => {
    const config = {
      providerName: 'Demo CRM ADT adapter',
      myCallsTodayEnabled: true,
      myChatsTodayEnabled: true,
      myEmailsTodayEnabled: true,
      showContactInfo: false
    };
    return Promise.resolve(config);
  }});
Returns:
Type:
Promise

Promise represents AdtConfig

(abstract) getTodayCallsCount() → {Promise(number)}

Implement this callback to populate value of today's call count tile in Five9 ADT

crmApi.registerApi({
    getTodayCallsCount: function (params) {
     return Promise.resolve(77);
 }});
Returns:
Type:
Promise(number)

Promise object represents number of today's calls.

(abstract) getTodayChatsCount() → {Promise(number)}

Implement this callback to populate value of today's chat count tile in Five9 ADT

Returns:
Type:
Promise(number)

Promise object represents number of today's chats.

(abstract) getTodayEmailsCount() → {Promise(number)}

Implement this callback to populate value of today's email count tile in Five9 ADT

Returns:
Type:
Promise(number)

Promise object represents number of today's emails.

(abstract) openMyCallsToday() → {void}

Implement this callback to open my calls today report when user clicks on 'Calls' tile in ADT.

Returns:
Type:
void

(abstract) openMyChatsToday() → {void}

Implement this callback to open my calls today report when user clicks on 'Chats' tile in ADT.

Returns:
Type:
void

(abstract) openMyChatsToday() → {void}

Implement this callback to open my calls today report when user clicks on 'Emails' tile in ADT.

Returns:
Type:
void

(abstract) saveLog(params) → {Promise(any)}

Implement this callback to save interaction (Call, Email, Chat) log in CRM system for CRM object selected in ADT and using comments entered by user in ADT. Executed when agent sets interaction disposition in Five9 Adapter.

Parameters:
Name Type Description
params object
Name Type Description
interactionType InteractionType

Interaction type

interactionData CallData | ChatData | EmailData

Interaction data

interactionLogData CallLogData | ChatLogData | EmailLogData

Interaction log data

Returns:
Type:
Promise(any)

Promise object

(abstract) screenPop(params) → {void}

Implement this callback to execute screen pop to the CRM object. ADT will execute this call back in case SearchResult result returned by search method contains only one object or screenPopObject attribute of SearchResult is not empty.

Parameters:
Name Type Description
params object
Name Type Attributes Description
interactionType InteractionType

Interaction type

interactionData CallData | ChatData | EmailData

Interaction data

crmObject CrmObject

Object selected for screen pop. Can be executed either because single matching result was identified during search or because agent clicked one of the multiple search results in Five9 Adapter

force boolean <optional>

Do force screen pop (if supported by CRM)

Returns:
Type:
void

Implement this callback to search for CRM objects based on phone number and Call attached variables associated with call being handled in ADT

crmApi.registerApi({
 search: function (params) {
          var crmObjects = [{id: "123", type: "Contact", label: "Contact", name: "Joe", isWho: true, isWhat: false, fields:[{displayName: "Company", value: "ABC"}]}];
          return Promise.resolve({crmObjects: crmObjects, screenPopObject: crmObjects[0]});
      }});
Parameters:
Name Type Description
params object
Name Type Description
interactionType InteractionType

Interaction type

interactionData CallData | ChatData | EmailData

Interaction information

interactionSearchData CallSearchData | ChatSearchData | EmailSearchData

Additional data. Used only when interaction type is 'Call' or 'Chat'

Returns:
Type:
Promise

Promise represents SearchResult