Expedite IVR development with industry grammars on Amazon Lex
Amazon Lex is a service for building conversational interfaces into any application using voice and text. With Amazon Lex, you can easily build sophisticated, natural language, conversational bots (chatbots), virtual agents, and interactive voice response (IVR) systems. You can now use industry grammars to accelerate IVR development on Amazon Lex as part of your IVR migration effort. Industry grammars are a set of XML files made available as a grammar slot type. You can select from a range of pre-built industry grammars across domains, such as financial services, insurance, and telecom. In this post, we review the industry grammars for these industries and use them to create IVR experiences.
Financial services
You can use Amazon Lex in the financial services domain to automate customer service interactions such as credit card payments, mortgage loan applications, portfolio status, and account updates. During these interactions, the IVR flow needs to collect several details, including credit card number, mortgage loan ID, and portfolio details, to fulfill the user’s request. We use the financial services industry grammars in the following sample conversation:
Agent: Welcome to ACME bank. To get started, can I get your account ID?
User: Yes, it’s AB12345.
IVR: Got it. How can I help you?
User: I’d like to transfer funds to my savings account.
IVR: Sure. How much would you like to transfer?
User: $100
IVR: Great, thank you.
The following grammars are supported for financial services: account ID, credit card number, transfer amount, and different date formats such as expiration date (mm/yy) and payment date (mm/dd).
Let’s review the sample account ID grammar. You can refer to the other grammars in the documentation.
Using the industry grammar for financial services
To create the sample bot and add the grammars, perform the following steps. This creates an Amazon Lex bot called Financialbot
and adds the grammars for financial services, which we store in Amazon Simple Storage Service (Amazon S3):
- Download the Amazon Lex bot definition.
- On the Amazon Lex console, choose Actions and then choose Import.
- Choose the
Financialbot.zip
file that you downloaded, and choose Import. - Copy the grammar XML files for financial services, listed in the preceding section.
- On the Amazon S3 console, upload the XML files.
- Navigate to the slot types on the Amazon Lex console and choose the
accountID
slot type so you can associate thefin_accountNumber.grxml
file. - In the slot type, enter the Amazon S3 link for the XML file and the object key.
- Choose Save slot type.
The AWS Identity and Access Management (IAM) role used to create the bot must have permission to read files from the S3 bucket.
- Repeat steps 6–8 for the
transferFunds
slot type withfin_transferAmount.grxml
. - After you save the grammars, choose Build.
- Download the financial services contact flow to integrate it with the Amazon Lex bot via Amazon Connect.
- On the Amazon Connect console, choose Contact flows.
- In the Amazon Lex section, select your Amazon Lex bot and make it available for use in the Amazon Connect contact flows.
- Select the contact flow to load it into the application.
- Test the IVR flow by calling in to the phone number.
Insurance
You can use Amazon Lex in the insurance domain to automate customer service interactions such as claims processing, policy management, and premium payments. During these interactions, the IVR flow needs to collect several details, including policy ID, license plate, and premium amount, to fulfill the policy holder’s request. We use the insurance industry grammars in the following sample conversation:
Agent: Welcome to ACME insurance company. To get started, can I get your policy ID?
Caller: Yes, it’s AB1234567.
IVR: Got it. How can I help you?
Caller: I’d like to file a claim.
IVR: Sure. Is this claim regarding your auto policy or home owners’ policy?
Caller: Auto
IVR: What’s the license plate on the vehicle?
Caller: ABCD1234
IVR: Thank you. And how much is the claim for?
Caller: $900
IVR: What was the date and time of the accident?
Caller: March 1st 2:30pm.
IVR: Thank you. I’ve got that started for you. Someone from our office should be in touch with you shortly. Your claim ID is 12345.
The following grammars are supported for the insurance domain: policy ID, driver’s license, social security number, license plate, claim number, and renewal date.
Let’s review the sample claimDateTime grammar. You can refer to the other grammars in the documentation.
Using the industry grammar for insurance
To create the sample bot and add the grammars, perform the following steps. This creates an Amazon Lex bot called InsuranceBot
and adds the grammars for the insurance domain:
- Download the Amazon Lex bot definition.
- On the Amazon Lex console, choose Actions, then choose Import.
- Choose the
InsuranceBot.zip file
that you downloaded, and choose Import. - Copy the grammar XML files for insurance, listed in the preceding section.
- On the Amazon S3 console, upload the XML files.
- Navigate to the slot types on the Amazon Lex console and select the
policyID
slot type so you can associate theins_policyNumber.grxml
grammar file. - In the slot type, enter the Amazon S3 link for the XML file and the object key.
- Choose Save slot type.
The IAM role used to create the bot must have permission to read files from the S3 bucket.
- Repeat steps 6–8 for the
licensePlate
slot type (ins_NJ_licensePlateNumber.grxml
) anddateTime
slot type (ins_claimDateTime.grxml
). - After you save the grammars, choose Build.
- Download the insurance contact flow to integrate with the Amazon Lex bot.
- On the Amazon Connect console, choose Contact flows.
- In the Amazon Lex section, and select your Lex bot and make it available for use in the Amazon Connect contact flows.
- Select the contact flow to load it into the application.
- Test the IVR flow by calling in to the phone number.
Telecom
You can use Amazon Lex in the telecom domain to automate customer service interactions such as activating service, paying bills, and managing device installations. During these interactions, the IVR flow needs to collect several details, including SIM number, zip code, and the service start date, to fulfill the user’s request. We use the financial services industry grammars in the following sample conversation:
Agent: Welcome to ACME cellular. To get started, can I have the telephone number associated with your account?
User: Yes, it’s 123 456 7890.
IVR: Thanks. How can I help you?
User: I am calling to activate my service.
IVR: Sure. What’s the SIM number on the device?
IVR: 12345ABC
IVR: Ok. And can I have the zip code?
User: 12345
IVR: Great, thank you. The device has been activated.
The following grammars are supported for telecom: SIM number, device serial number, zip code, phone number, service start date, and ordinals.
Let’s review the sample SIM number grammar. You can refer to the other grammars in the documentation.
Using the industry grammar for telecom
To create the sample bot and add the grammars, perform the following steps. This creates an Amazon Lex bot called TelecomBot
and adds the grammars for telecom:
- Download the Amazon Lex bot definition.
- On the Amazon Lex console, choose Actions, then choose Import.
- Choose the
TelecomBot.zip
file that you downloaded, and choose Import. - Copy the grammar XML files for the telecom domain, listed in the preceding section.
- On the Amazon S3 console, upload the XML files.
- Navigate to the slot types on the Amazon Lex console and select
phoneNumber
so you can associate thetel_phoneNumber.grxml
grammar. - In the slot type, enter the Amazon S3 link for the XML file and the object key.
- Choose Save slot type.
The IAM role used to create the bot must have permission to read files from the S3 bucket.
- Repeat steps 6–8 for the slot types
SIM number
(tel_simNumber.grxml
) andzipcode
(tel_usZipcode.grxml
). - After you save the grammars, choose Build.
- Download the insurance contact flow to integrate with the Amazon Lex bot.
- On the Amazon Connect console, choose Contact flows.
- In the Amazon Lex section, and select your Amazon Lex bot and make it available for use in the Amazon Connect contact flows.
- Select the contact flow to load it into the application.
- Test the IVR flow by calling in to the phone number.
Test the solution
You can call in to the Amazon Connect phone number and interact with the bot. You can also test the solution directly on the Amazon Lex V2 console using voice or text.
Conclusion
Industry grammars provide a set of pre-built XML files that you can use to quickly create IVR flows. You can select grammars to enable customer service conversations for use cases across financial services, insurance, and telecom. The grammars are available as a grammar slot type and can be used in an Amazon Lex bot configuration. You can download the grammars and enable these via the Amazon Lex V2 console or SDK. The capability is available in all AWS Regions where Amazon Lex operates in the English (Australia), English (UK), and English (US) locales.
To learn more, refer to Using a custom grammar slot type.
About the Authors
John Heater has over 15 years of experience in AI and automation. As the SVP of the Contact Center Practice at NeuraFlash, he leads the implementation of the latest AI and automation techniques for a portfolio of products and customer solutions.
Sandeep Srinivasan is a Product Manager on the Amazon Lex team. As a keen observer of human behavior, he is passionate about customer experience. He spends his waking hours at the intersection of people, technology, and the future.
Tags: Archive
Leave a Reply