Pega IVR IVA integration with AWS

From PegaWiki
This is the approved revision of this page, as well as being the most recent.
Jump to navigation Jump to search

Pega IVR IVA integration with AWS

Description Pega IVR IVA integration with AWS
Version as of 8.5
Application Pega Customer Service
Capability/Industry Area Chat and Messaging



Pega IVR IVA integration with AWS[edit]

Pega IVR IVA integration with AWS.png

IVR IVA: Using the IVR-IVA (Interactive Voice Response – Intelligent Virtual Assistant) API and channel configuration, Pega Customer Service delivers customer self-service over Interactive Voice Response (IVR) systems.

Create the IVR-IVA channel to configure the Pega Intelligent Virtual Assistant (IVA) for the Interactive Voice Response (IVR) systems. Using the IVR-IVA channel, customers can interact with Pega Customer Service over different IVR systems for self-service.

End user calls to contact center, Amazon Lex finds the intent and utterance from user response.

AWS lambda integrates with Pega platform using IVR IVA Api call by sending the utterance and event name. Pega uses the utterance and event name to process the api call and sends the response back to AWS.

MCP: Multichannel case processor (MCP) framework purpose is to speed up implementation of Pega applications that interacts with user leveraging integration with third party communication channels.

Create the following assets in Pega and AWS to support the IVR IVA

How to create IVR IVA channel.png

Create IVR IVA channel[edit]

  1. Create IVR-IVA channel
  2.  Add case commands in your IVR-IVA channel so that it creates cases in the Pega Customer Service application based on related user input, in the Content section, click Add caste type and define a case command. The IVR-IVA channel detects the case type by using text analysis and automatically creates the case
  3.  In the connect tab, select the Template operator ID of an existing Pega Customer Service operator

IVR-IVA API[edit]

IVR-IVA API is an API that any modern IVR system can use to exchange data with Pega Customer Service. The IVR-IVA channel parses the events or user inputs from the API to execute the corresponding actions. The IVR-IVA channel supports the four out-of-the-box events supported by the IVR-IVA API by default. When an IVR system sends an event notification to the API, the IVR-IVA channel executes the corresponding channel action, such as gathering contact details against ANI or running a case type.

Sample Payload for run_case event:[edit]

Request:

{

"channel_id": "bot9d06d70460914f0d90e1da2d5ce6a003",

"session_id": "ea6a1e1e-b311-43fb-ad63-42978927098",

"utterance": "escalate",

"event_name": "run_case",

"attributes": {

"ani": ""

}

}

Response:

{

   "attributes": {

       "case_key": "PEGACPMFS-WORK-SERVICE M-58322",

       "contact_id": "",

       "interaction_key": "PEGACA-WORK-INTERACTION I-32221"

   },

   "message": {

      "content": "What type of manifestation"

   }

}

In the response sending the Next question which is configured in IVR IVA flow in service case.

Additional details regarding IVR IVA API,

https://community.pega.com/knowledgebase/articles/pega-customer-service-implementation-guide/85/ivr-iva-api

Create IVR IVA Flow[edit]

Create IVR IVA process flow in customer service case type

Example of how to create IVR IVA process flow.png

Create the flow and configure the questionnaire to process the IVR IVA conversation

Configure process flow.png

Create CTI Link[edit]

Create Pega CTI link to connect from AWS to Pega interaction portal to support transfer to agent queue scenario.

1.       Open Pega CTI call

2.       Add CTI Link, create the AWS Connect implementation

Create CTI Link.png

Provide the JavaScript object, contact center instance details. Use the same user details which created on the

Amazon connect as Agent profile for login setup.

CTI Link Configuration details .png

Transfer to agent work queue:[edit]

To receive the call from IVR connect to CTI Link and login into Pega.

  •       Login as CSR and Launch the interaction portal
  •       Click on phone login in the right top corner

How to login CTI Link.png

  • ·       Select the CTI link as AWS connect and login, successful connection will enable the phone icon into green. The agent is ready to accept the incoming call.

AWS cloud[edit]

To support IVR IVA from AWS, we need to create the below Amazon assets.

Amazon Connect[edit]

Amazon Connect is an omnichannel cloud contact center. Create contact flows to define the customer experience with your contact center from start to finish. Amazon Connect contact flows integrate with Amazon Lex and provide text to speech and can enable natural language-based self-service interactions.

Follow the steps below to support the IVR IVA interaction to create the service case creation in Pega and transfer to agent scenarios.

1.       Claim a phone number in order to receive and make calls.

Note: Once the contact flow created, add that to phone number under Contact flow/IVR

Configure contact flow in phone number.png

2.      Set hours of operations, if required

3.       Create queues to route to the agent

Create queue.png

4.       Create and define contact flow how a customer experiences the contact center from start to finish

Sample contact flow.png

Lambda and Lex can be invoked from contact flow:

  •      Can invoke AWS Lambda function, which makes a call to AWS Lambda and optionally returns key/value pairs, which can be used to set contact attributes
  •      Can invoke the Amazon Lex intents from Get customer input

5.       Create routing profile and add that to routing profile queues

Create routing profile.png

6.       Configure users and select the above created routing profile and select the security profile (amazon supports default security profiles, if required create new)

Amazon Lex[edit]

  •      Amazon Lex is an AWS service for building conversational interfaces for applications using voice and text
  •      Build Lex bot to automatic speech recognition (ASR) for converting speech to text, and natural language understanding (NLU) to recognize the intent of the text
  •      Create Lex bot, specify the basic conversation flow in the Amazon Lex console. Amazon Lex manages the dialogue and dynamically adjusts the responses in the conversation. Using the console, you can build, test, and publish your text or voice chatbot
  • Create custom bot for specific scenario, AWS also support sample bots for couple of scenarios

How to create lex bot.png

Create a custom Lex bot and configure it with one or more intents that you want to support. Configure the bot so it understands the user's goal (intent), engages in conversation with the user to elicit information, and fulfills the user's intent.

Example of lex bot configuration.png

Note: We can configure the Lambda function under Fulfillment (business logic required to fulfill the user’s input) or Initialization and validation (validate the user’s input) with in Lex bot.

Build the bot, publish a version, and create an alias.

Amazon Lambda[edit]

  •       Create the Lambda function and write the code to integrate with Pega platform using Pega API call.
  •       Write Lambda functions in your favorite language (Node.js, Python, Go, Java etc).

Under configuration tab, write your code in Function code. Deploy the code and test.

Your function should call the relevant API as indicated in https://community.pega.com/knowledgebase/articles/pega-customer-service-implementation-guide/85/ivr-iva-api with the appropriate request input, then handle the response and pass the relevant information back to the contact flow.

Example of amazon lambda function.png

Note: Monitor the logs in Cloud watch.

AWS access and permissions[edit]

In AWS there are certain access and resource permissions that are required to be set in order for Amazon Connect to access Amazon Lex and Amazon Lambda.

Please refer to the Amazon documentation on IAM: https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html