Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Integrating Voice AI with a CTI system

Updated on December 3, 2021

Voice AI automatically supports all out-of-the-box computer telephony integrations (CTI) that are available with Pega Call. No action is required by you if you are using a standard CTI integration. However, if you use a custom CTI integration, you must implement a mechanism to notify the Voice AI desktop app of call connections and disconnections.

Pega Customer Service Implementation Guide

For more information about CTI integration, see the Pega Call Implementation Guide.

Custom CTI integration example

Pega Customer Service can integrate with an external CTI system in various ways. The following example describes one possible method by which a CTI system can route calls to an agent desktop with Voice AI features integrated:

  1. The CTI system sends a REST request to the Pega server to alert an incoming call to a CSR.
  2. The Pega server notifies the agent desktop of the incoming call by using a notification channel.
  3. Custom JavaScript code running on the agent desktop subscribes to the incoming call event, displays a screen pop, and starts the interaction.
  4. A JavaScript action invokes the function for the Voice AI desktop app to capture the audio.

To implement a customization that works in this way, make the following changes:

Note: As indicated below, changes to some of the properties require the use of the Expression Builder. Click the settings icon for the property to open the Expression Builder, and then browse to the corresponding properties under ConfigurationsVoice AI to build the property values. For more information about using the Expression Builder, see Building expressions with the Expression Builder.

  1. Update the REST service activity with the following properties before invoking the notification channel:
    .AISessionID
    Use the @Utilities.pxGetNewGUID() function to generate a GUIDV4 string.
    .AIChannelID
    Use the Voice AI Channel ID setting in the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AIIsolationID
    Use the Isolation ID setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AILanguageModel
    Use the Language Model setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AISpeechModel
    Use the Speech Model setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AIRecordOnlyMode
    Use the VAD Record Only Mode setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AIAccessToken
    Populate this parameter by calling the RetrieveAccessToken activity on the current primary page.
    OperatorID
    Enter the ID of the operator to whom the notification is sent.
    RouterURL
    Use the RetrieveAudioRouterURL data transform to populate the Voice AI transcript URL on the current primary page.
  2. Update the JavaScript function that is subscribed to the notification to invoke the pega.cs.voiceai.startCall function with the following parameters:
    1. sessionID
    2. channelId
    3. accessToken
    4. isolationId
    5. languageModel
    6. speechModel
    7. operatorId
    8. recordOnlyMode
    9. callTransfer
      Note: As of Pega Customer Service version 8.7, the callTransfer parameter is a placeholder for future implementation. For now, set this parameter to null or "".
    10. routerURL
  3. Modify the invocation of the CreateWork API to start the interaction and to pass the AISessionID to the interaction flow. For example:
    pega.desktop.createNewWork(<Interaction Class>, "", "<Flow name>", "&AISessionID=" + sessionId..” 
  4. If you made an override to the PostCloseResponse HTML rule in the out-of-the-box implementation, configure an alternate way to trigger the Pega.cs.voiceai.endcall function based on the call disconnection event.
    Note: The PostCloseResponse rule alerts the Voice AI desktop app to end the audio recording when a call is disconnected.

Tags

Pega Customer Service 8.7 Pega Customer Service for Communications 8.7 Pega Customer Service for Financial Services 8.7 Pega Customer Service for Healthcare 8.7 Pega Customer Service for Insurance 8.7

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us