Skip to content

purnasanyal/it-helpdesk-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Automating IT Help Desk with Self-Service Chatbot and WhatsApp API and Twilio Flex

Objective:

The purpose of the document is to improve Call Center productivity by building applications with highly engaging user experiences and lifelike conversational interactions using Amazon Chatbot to increase contact center productivity, automate simple tasks, and drive operational efficiencies across the enterprise with Twilio WhatsApp Business API, SMS and Flex. with life-like conversational Chatbot

High Level steps

  1. Sign up or log in Twilio Account and get a Twilio Phone number

Connect Twilio Phone number with WhatsApp Sandbox Setting – The Twilio Sandbox for WhatsApp is a pre-configured environment available through the Twilio Console in which you can prototype sending outbound messages, replying to incoming messages, and configuring things like message delivery callbacks. The Sandbox is pre-provisioned with a Twilio phone number (+1-415-523-8886) that is shared across all sandbox users. However, other users who share the same sandbox number won't receive your messages, only the ones who have opted in to your sandbox.

Go to Messaging --> Settings --> WhatsApp SandBox Setting. Send a WhatsApp message to +1 415 523 8886 with code “join xxxxxxxxx” as shown in your account. You will receive a message back in your WhatsApp i.e. “Twilio Sandbox: ✅ You are all set! The sandbox can now send/receive messages from whatsapp:+14155238886. Reply stop to leave the sandbox any time.”

2. Create a new Twilio Flex Account

Follow the prompts to kick off the Flex setup. During this process, several Twilio services will be created for you. Launch the Flex UI in chrome browser, and you should see something like this.

image

Construct a Message Handler URL. The format of your Messaging Handler URL should be: https://webhooks.twilio.com/v1/Accounts/ACxx/Proxy/KSxx/Webhooks/Message

Replace ACxx with your Account SID (found in your account dashboard) and KSxx with your Flex Proxy Service SID (found in the Services page). This will be your Message Handler URL.

Set up your WhatsApp Sandbox: Navigate to the WhatsApp Sandbox. Head over to the Sandbox Configuration section and paste the Message Handler URL into the "When A Message Comes In" text field. Save your sandbox settings.

WhatsApp Sandbox webhook setup

  1. Clone the git repository in your local laptop or desktop

git clone https://github.com/purnasanyal/it-helpdesk.git

  1. Sign Up for an AWS Account, create IAM user and Provide IAM admin role

If you already have AWS Account and AWS user, please ensure that the user has admin privilege to create all AWS resources for this application.

  1. Create S3 Bucket in us-east-1 region

  • Copy all folders under “assets” folder in the github repo. Write down the S3 bucket name
    • Faq
    • lambda_layers
    • lex-appointment-handler
    • lex_bot
    • lex_custom_resource
    • twilio-webhook-lambda
  • Copy CloudFormation template “IThelpdesk.yaml” in the S3 bucket
  1. Launch a new CloudFormation stack in us-east-1 region

Click “Launch Stack” Button and deploy the application:

cloudformation-launch-stack

image

  • Click “Template is ready” and “Amazon S3 URL”. Provide Amazon S3 URL path of IThelpdesk.yaml template
  • Provide a stack name e.g. “ps-twilio”
  • Replace the “S3BucketName” parameters with the S3 bucket you created in step 5. Leave other parameter value as the default value and create CloudFormation stack.
  • The stack creation may take up to 10 min
  • CloudFormation Stack will create Amazon Lex Bot, Kendra Indexes and Lambda function to perform initialization and validation, fulfillment of Lex Bot intent configuration.
  1. Copy URL to “WHEN A MESSAGE COMES IN” field of Twilio Sandbox for WhatsApp

Once the CloudFormation stack is complete, copy & paste the output value for CustomWebhookHandlerEndpoint URL into “WHEN A MESSAGE COMES IN” field of Twilio Sandbox for WhatsApp account, you created in Step 1.

Test the Chatbot and the application

Open Whatsapp in Mobile phone or web version and send message to +14155238886 to test the following scenarios from WhatsApp

  1. Greetings Message – type and send message “hi”
  2. Schedule an appointment - type and send message “Schedule”
  3. Confirm an appointment - type and send message “confirm”
  4. Standard Frequently asked questions - type and send any question from covid-faq.csv
  5. Connect to Twilio Flex Contact Center - type and send message “talk to an agent”
  6. Voice Call from Support Agent – Place outbound call from Twilio Flex

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages