Category

AI

The Era Of Contact Center AI Has Started, Officially!!!

By | AI, CS | No Comments

Siva S, CEO of Powerupcloud, Global Cloud Practice Head at LTI

Before I start, I sincerely hope you and your loved ones are safe and well.

There are no doubts that COVID-19 Pandemic has brought great distress to our lives, both in the personal and business front. We see businesses, governments, large corporations are reeling from the effect of lockdowns and COVID-19 spread. Over 90% of the businesses worldwide are suffering due to the lockdown. But the tech industry, especially Cloud and AI are seeing a very different trend. Businesses are realizing that they cannot ignore Cloud and AI anymore and with each day passing, they start feeling more and more pain with their existing traditional IT systems.

In today’s article, I would like to focus on the Contact Center AI solution which is currently the #1 sought after technology on the cloud for businesses across the world.

In 2016, I envisioned a Chatbot platform named IRA.AI (now called Botzer.io) as a customer support chatbot which will automate the customer support process by interacting with customers and provide them with answers in real-time. I must admit that it was a super-hard sell back in 2016. We were one of the first to build a robust chatbot development and management platform, well before AWS & Azure launched their versions. We used Python NLTK to power our chatbot platform. Fast forward to the second half of 2019, the scene wasn’t very different. We still saw a majority of businesses experimenting but not fully adopting the AI Chatbot solutions.

But the COVID-19 Pandemic has changed this situation overnight, very much like how it changed a lot of our lives in a very short time. We are seeing the customer care calls going over the roof since January 2020. One instance where the US citizens applying for unemployment benefits had to wait for almost 48 hours to get through a customer support agent. Another instance where a UK based Telco experiencing a surge of 30% increase in the incoming customer care calls as a lot of their users were struggling with internet bandwidth issues with most of the population started working from home. While the large BPO industry in countries like India and the Philippines were struggling to get their employees working from home, some of the US and UK businesses have canceled the contracts and moved the jobs back to their respective home countries in order to comply with the regulations around data security. This has invariably increased the customer care spend for these businesses.

All these have resulted in businesses looking towards AI Chatbot powered digital agents to help them cope up with the surge in demand and at the same time, keep the costs in check.

How was the AI Chatbot adoption before 2020?

As I mentioned earlier, AI Chatbot concept was seen more as an R&D investment rather than a viable solution to automate the customer care center operations. We saw some early success with insurance companies, banks, airlines, and real-estate companies. But it was always a hard sell to the majority of the businesses primarily because of below reasons,

  • the existing customer care support process was reliable and relatively cheaper when outsourced to countries like India, Philippines
  • there was more emphasis on customer loyalty management, providing the human touch
  • the Natural Language Processing (NLP) technology was not very evolved and fool-proof to be considered as a real alternative
  • the demand was predictable and the training materials were designed to train humans and not AI

But, several technology companies like us have been relentless in their efforts to solve the above-mentioned problems seen with AI Chatbot technology. The NLP accuracy has improved a lot (proof: Alexa, Google Home, Siri) and the leading cloud platforms have launched these NLP techs as full-fledged services for developers to integrate them and build end-to-end AI Chatbot solutions (Amazon Lex, Microsoft LUIS, Google DialogFlow).

How does the Contact Center AI actually work?

No alt text provided for this image
  • The customer calls the customer care support number
  • The contact center software, once it receives the call, will check with the internal customer database (or CRM) to identify the customer
  • The contact center software will then route the call to the workflow tool which will interact with the customer and identify the entity & intent from the customer’s query
  • Based on the preset business logic (or algorithm), the workflow tool will then call the right set of application APIs to resolve the customer’s queries or pick the appropriate response from the AI Chatbot

Below is an architecture diagram that depicts a Contact Center AI implementation on AWS using Amazon Connect (cloud-based contact center software), Amazon Lex (cloud-based NLP service), and Amazon Lambda (cloud-based workflow service).

No alt text provided for this image

So how do you go about AI adoption for your Contact Center AI?

Rome was not built in a day. So is the case with your vision of bringing in AI automation for a large part of your customer care process. Projects in this space would fail and leave a bad taste if we embark on this journey with very high expectations and immediate results. And I have witnessed the pain several times from close quarters. So how does one go about adopting AI for their contact center?

Step 1: Analyse your existing customer care process and identify the low hanging fruits which can be moved to the AI model quickly (almost all AI Chatbot consulting & product companies can help you with this).

Step 2: Segregate the queries and workflows which can be handled by a simple ‘if-else’ rule vs an ‘intent-entity’ identifying the NLP model. Using NLP for queries that can be handled by a simple ‘if-else’ rule will be an overkill and will bring down the accuracy of your NLP engine.

Step 3: Once you have experienced a fair amount of success with the NLP powered model to identify intents, entities in answering customer queries, bring in Machine Learning to further improve on the accuracy of intent identification, bot training, and customer experience management. Yes, there is a whole different world out there already in the field of Contact Center AI. 🙂

Why AI chatbots win over application design?

I often get this very common question on ‘why chatbots when you have beautifully designed applications which can do the job?’. I totally agree with the fact that the apps with better UX will make a customer’s life easier. But the problem with apps is that you will have to adhere to workflow which has been designed in the app. You cannot skip any step, you cannot change your inputs as you wish. The AI Chatbot however allows you to interact the way you would interact with a human and not a machine. You need not learn to use an app (though the learning curve may be less for better-designed apps), you can simply post your query and get your answers or post your intent and get the workflow executed (like policy claims, refund processing, airline reservations, blocking credit cards, etc).

Let the customers interact with your business in their natural way. AI Chatbots allow you to achieve that and this goes a long way in customer experience.

What should customers look for while choosing to embark on this path?

Building and launching your Contact Center AI solution powered by chatbot agents is just the first step. I see a lot of customers struggling with managing the bot they launch and further improve them on a continuous basis. This leads to a low customer satisfaction rating and eventually resulting in a failed project.

Any business looking to implement Contact Center AI to automate their customer care process should consider below check-points.

  1. Check if a solution like Contact Center AI will actually improve efficiency and bring down costs. If your existing support model is broken, do not embark on this before fixing the overall support process.
  2. Choose a bot management platform (like Botzer.io) which will not only help you with building and launching the AI chatbots which will power your contact center, but also help you track the performance of the bots closely.
  3. The bot management platform should allow you to pick up anomalies and help you train the new queries quickly.
  4. The bot management platform should also allow the Contact Center AI solution to handover the call to a human agent if the bot fails to resolve the customer’s queries.
  5. And the most important part, the bot management platform should have rich analytics embedded in the tool which will allow you to track your customer experience score on a real-time basis. This will help you course-correct in your bot training process and will prevent you from experiencing negative reviews in your customer care process.

How will this evolve in future? Will the Contact Center AI replace humans?

No. The Contact Center AI will not replace humans entirely. A healthy model will have a good mix of AI chatbots and human agents working hand-in-hand to support the customers’ queries. The below architecture is highly recommended when you are looking to implement a Contact Center AI for your business.

No alt text provided for this image

I am seeing an increase in Contact Center AI adoption from businesses in industries including insurance, food delivery, e-commerce, healthcare, airlines, telco, banks, etc.

If you have been mulling with the idea of introducing AI into your businesses, the time is here for you to initiate the AI adoption. I would suggest you start with the Contact Center AI solution. It works. And it is one of the mature AI solutions that you can adopt.

Text to Speech using Amazon Polly with React JS & Python

By | AI, AWS, Blogs, Chatbot | One Comment

Written by Ishita Saha, Software Engineer, Powerupcloud Technologies

In this blog, we will discuss how we can integrate AWS Polly using Python & React JS to a chatbot application.

Use Case

We are developing a Chatbot Framework where we use AWS Polly for an exquisite & lively voice experience for our users

Problem Statement

We are trying to showcase how we can integrate AWS Polly voice services with our existing chatbot application built on React JS & Python.

What is AWS Polly ?

Amazon Polly is a service that turns text into lifelike speech. Amazon Polly enables existing applications to speak as a first-class feature and creates the opportunity for entirely new categories of speech-enabled products, from mobile apps and cars to devices and appliances. Amazon Polly includes dozens of lifelike voices and support for multiple languages, so you can select the ideal voice and distribute your speech-enabled applications in many geographies. Amazon Polly is easy to use – you just send the text you want converted into speech to the Amazon Polly API, and Amazon Polly immediately returns the audio stream to your application so you can play it directly or store it in a standard audio file format, such as MP3.

AWS Polly is easy to use. We only need an AWS subscription. We can test Polly directly from the AWS Console.

Go to :

https://console.aws.amazon.com/polly/home/SynthesizeSpeech

There is an option to select Voice from Different Languages & Regions.

Why Amazon Polly?

You can use Amazon Polly to power your application with high-quality spoken output. This cost-effective service has very low response times, and is available for virtually any use case, with no restrictions on storing and reusing generated speech.

Implementation

User provides input to the Chatbot. This Input goes to our React JS Frontend, which interacts internally with a Python Application in the backend. This Python application is responsible for interacting with AWS Polly and sending response back to the React app which plays the audio streaming output as mp3.

React JS

In this implementation, we are using the Audio() constructor.

The Audio() constructor creates and returns a new HTMLAudioElement which can be either attached to a document for the user to interact with and/or listen to, or can be used offscreen to manage and play audio.

Syntax :

audio = new Audio(url);

Methods :

play – Make the media object play or resume after pausing.
pause – Pause the media object.
load – Reload the media object.
canPlayType – Determine if a media type can be played.
 
Here, we are using only play() and pause() methods in our implementation.

Step 1: We have to initialize a variable into the state.

this.state = {
audio : "",
languageName: "",
voiceName: ""
}

Step 2 : Remove all unwanted space characters from input.

response = response.replace(/\//g, " ");
response = response.replace(/(\r\n|\n|\r)/gm, "");

Step 3 : If any existing reply from Bot is already in play. We can stop it.

if (this.state.audio != undefined) {
     this.state.audio.pause();
   }

Step 4 :

This method interacts with our Python Application. It sends requests to our Python backend with the following parameters. We create a new Audio() object. We are passing the following parameters dynamically to handle speaker() method :

  • languageName
  • voiceName
  • inputText
handleSpeaker = inputText => {
this.setState({
     audio: ""
   });
   this.setState({
     audio: new Audio(
       POLLY_API +
         "/texttospeech?LanguageCode=" +
         this.state.languageName +
         "&VoiceId=" +
         this.state.voiceName +
         "&OutputFormat=mp3"
    "&Text=" + inputText
     )
   });
}

Step 5 : On getting the response from our POLLY_API Python App, we will need to play the mp3 file.

this.state.audio.play();

Python

The Python application communicates with AWS Polly using AWS Python SDK – boto3.

Step 1: Now we will need to configure AWS credentials for accessing AWS Polly by using Secret Key, Access Keys & Region.

import boto3
def connectToPolly():
 polly_client = boto3.Session(
     aws_access_key=”xxxxxx”,
     aws_secret_key=”xxxxxx”,
     region=”xxxxxx”).client('polly')

 return polly_client

Here, we are creating a polly client to access AWS Polly Services.

Step 2: We are using synthesize_speech() to get an audio stream file.

Request Syntax :

response = client.synthesize_speech(
    Engine='standard'|'neural',
    LanguageCode='arb'|'cmn-CN'|'cy-GB'|'da-DK'|'de-DE'|'en-AU'|'en-GB'|'en-GB-WLS'|'en-IN'|'en-US'|'es-ES'|'es-MX'|'es-US'|'fr-CA'|'fr-FR'|'is-IS'|'it-IT'|'ja-JP'|'hi-IN'|'ko-KR'|'nb-NO'|'nl-NL'|'pl-PL'|'pt-BR'|'pt-PT'|'ro-RO'|'ru-RU'|'sv-SE'|'tr-TR',
        				OutputFormat='json'|'mp3'|'ogg_vorbis'|'pcm',
    									TextType='ssml'|'text',
    VoiceId='Aditi'|'Amy'|'Astrid'|'Bianca'|'Brian'|'Camila'|'Carla'|'Carmen'|'Celine'|'Chantal'|'Conchita'|'Cristiano'|'Dora'|'Emma'|'Enrique'|'Ewa'|'Filiz'|'Geraint'|'Giorgio'|'Gwyneth'|'Hans'|'Ines'|'Ivy'|'Jacek'|'Jan'|'Joanna'|'Joey'|'Justin'|'Karl'|'Kendra'|'Kimberly'|'Lea'|'Liv'|'Lotte'|'Lucia'|'Lupe'|'Mads'|'Maja'|'Marlene'|'Mathieu'|'Matthew'|'Maxim'|'Mia'|'Miguel'|'Mizuki'|'Naja'|'Nicole'|'Penelope'|'Raveena'|'Ricardo'|'Ruben'|'Russell'|'Salli'|'Seoyeon'|'Takumi'|'Tatyana'|'Vicki'|'Vitoria'|'Zeina'|'Zhiyu'
)

Response Syntax :

{
    'AudioStream': StreamingBody(),
    'ContentType': 'string',
    'RequestCharacters': 123
}

We are calling textToSpeech Flask API which accepts parameters sent by React and further proceeds to call AWS Polly internally. The response is sent back to React as a mp3 file. The React application then plays out the audio file for the user.

@app.route('/textToSpeech', methods=['GET'])
def textToSpeech():
 languageCode = request.args.get('LanguageCode')
 voiceId = request.args.get('VoiceId')
 outputFormat = request.args.get('OutputFormat')
 polly_client = credentials.connectToPolly(aws_access_key, aws_secret_key, region)
 response = polly_client.synthesize_speech(Text="<speak>" + text + "</speak>",    
     LanguageCode=languageCode,
     VoiceId=voiceId,
     OutputFormat=outputFormat,
     TextType='ssml')
 return send_file(response.get("AudioStream"),
           AUDIO_FORMATS['mp3'])

Conclusion

This blog showcases the simple implementation of React JS integration with Python to utilize AWS Polly services. This can be used as a reference for such use cases with chatbots.

The Role of Artificial Intelligence in Building a Better World

By | AI, Artificial Intelligence, Blogs | No Comments

Written by Jeremiah Peter, Solution specialist-Advanced Services Group, Powerupcloud technologies

A Not So Distant Future

As we usher into an era dominated by technological innovation, Artificial Intelligence continues to draw heated debates for its unparalleled ability to automate tasks and eliminate human dependency. The growing cynicism on automation has captured our imagination in leading cinematic marvels such as ‘2001 A Space Odyssey’ and ‘Terminator’. Painting a deeply poignant future, these movies induce fears of a machine-led holocaust sparked by AI’s transcendence into Singularity- a point where AI supersedes human intelligence. Veering away from the dystopian narrative and objectively analyzing the realm of AI, it seems apparent that we can leverage AI for social good without descending into chaos. The call for beneficence in intelligent design is best captured by American computer scientist, Alan Kay’s words- “The best way to predict the future is to invent it”.

The blog presents a new frame of analysis for the responsible use of Artificial Intelligence technologies to augment human and social development. Additionally, the blog also delineates key Machine Learning and Computer Vision (Object Detection) concepts to solve a real-world problem, outlining a discourse for pragmatic solutions with broad social impact.

The Next Frontier

Under the dense canopy of commercial AI clutter, there are several AI initiatives that continue to garner both awe and adulation in the social sciences and humanities spectrum. Cancer detection algorithms, disaster forecast systems and voice-enabled navigation for the visually impaired are a few notable mentions. Although socially-relevant applications have achieved a fair degree of implementational success, they fail to attain outreach at a global level due to a lack of data accessibility and the dearth of AI talent.

Alternatively, innovative technologies that supplement large scale human-assistance programs in enhancing efficacy could be considered a worthwhile undertaking. Infusing computer vision technology in human-centered programs can dramatically improve last-mile coverage, enhance transparency, mitigate risks and measure the overall impact of assistance programs. In the next section, we delve into some core issues that afflict large-scale human assistance programs and underscore the need for technological intervention.

The State of Human-assistance Programs

According to The State of Food Security and Nutrition in the World Report (2019), around 820 million people in the world are hungry and over 66 million of them are under the age of 5. With numbers increasing steeply in most parts of Africa, South America, and Asia, the fate of Sustainable Development Goal of Zero Hunger by 2030 hangs by a thread. Perturbed by the growing scourge, some nations responded by releasing a slew of measures to take corrective action.

One such initiative called The Midday Meal Scheme (MDMS), launched by the government of India in 1995, serves around 120 million children across government and government-aided schools. Recognized as one of the largest food assistance programs in the world, MDMS was laid out with a bold vision to enhance enrolment, retention, and attendance with the overarching aim of improving nutritional status among children in India. However, not including the logistical and infrastructural shortcomings, the initiative loses significant funds to pilferage each year (Source: CAG Report2015). Shackled by a lack of resources, the program struggles to counter aberrant practices with institutional measures and seeks remediation through innovative solutions.

Given the unprecedented magnitude, large-scale human assistance schemes such as MDMS require well-crafted solutions that can instill governance and accountability into their dispensation process. In our constant endeavor to design Intelligent Apps with profound social impact, Powerup experts examined a few libraries and models to carve out a computer vision model that could reign in governance under such programs. The following section explores the pre-requisites for formulating a desirable solution.

Empowering Social Initiatives with Object Detection

Evidently, the success of an AI application is hugely predicated on a well-conceived algorithm that can handle varying degrees of complexity. However, developing a nuanced program from scratch is often a cumbersome and time-intensive process. To accelerate application development, programmers usually rely on pre-compiled libraries, which are frequently accessed code routines used iteratively in the program. After gleaning several open-source image processing libraries (VXL, AForge.Net, LTI-Lib), Powerup team narrowed down on OpenCV for its unique image processing functions and algorithms.

Besides a good library, the solution also requires a robust image classification engine to parse objects and scenes within images. However, despite several key advances in vision technology, most classification systems fail to interact with the complexities of the physical world in that these systems can only identify a limited set of objects under a controlled environment. To develop advanced object detection capabilities, the application needs to be powered by an intelligent model that can elicit a more refined outcome- to make sense of what it sees.

In order to develop a broad understanding of the real-world, computer vision systems require comprehensive datasets that consist of a vast array of labeled images to facilitate object detection within acceptable bounds of accuracy. Apart from identifying the position of the object/s in the image, the engine should also be able to discern the relationship between objects and stitch a coherent story. Imagenet is a diverse open-source dataset that has over a billion labeled images and, perhaps, serves as a foundation for similar computer vision explorations.

Moreover, computer vision systems also hinge on neural networks for developing self-learning capabilities. Though popular deep-learning based models such as R-CNN, R-FCN, and SSD offer ground-breaking features, YOLO (You Only Look Once) stands out for its capabilities in super real-time object detection, clocking an impressive 45 FPS on GPU. The high processing power enables the application to not only interact with images but also process videos in real-time. Apart from an impressive processing capacity, the YOLO9000 is trained on both the ImageNet classification dataset and the COCO detection dataset that enables the model to interact with a diverse set of object classes. We labeled and annotated local food image sets containing items such as rice, eggs, beans, etc. to sensitize the model toward domain specific data.

As demonstrated in the image above, the model employs bounding boxes to identify individuals and food items in the picture. Acting as a robust deterrent against pilferage, the application can help induce more accountability, better scalability, and improved governance.

A New Reckoning

While a seventh of the population goes hungry every day, a third of the food in the world is wasted. The figure serves as a cause for deep contemplation of the growing disparities in a world spawned by industrialization and capitalism. As we stand on the cusp of modern society, phenomena such as unbridled population growth, disease control, climate change and unequal distribution of resources continue to present grave new challenges. Seeking innovative and sustainable solutions, therefore, becomes not just a moral obligation, but also the 21st century imperative.

Aside from the broad benefits, the domain of AI also presents a few substantive concerns that need general oversight. To that effect, the evolving technological landscape presents two inherent risks: wilful misuse (Eg- Cambridge Analytica Case) and unintended consequences (COMPAS- a biased parole granting application).

While concerns such as wilful misuse raise moral questions pertaining to data governance and preservation of user self-determination, risks such as algorithm bias and inexplicability of decision-making expose design loopholes. However, these apprehensions can be largely mitigated through a commonly accepted framework that is vetted by civil society organizations, academe, tech & business community, and policymakers around the globe. Owing to this pressing need, the European Parliament launched AI4People in February 2018 to design a unified charter for intelligent AI-based design. Upholding values such as protection of human self-determination, privacy, and transparency, the initiative is aimed at proposing recommendations, subsequently leading to policies, for ethical and socially preferable development of AI.

Governed by ethical tenets, innovative solutions such as Object Detection can operate within the purview of the proposed framework to alleviate new-age challenges. With reasonable caution and radical solution-seeking, AI promises to be an indispensable vector of change that can transform society by amplifying human agency (what we can do).

Check out next blog post on

Making the Connected Car ‘Real-time Data Processing’ Dream a Reality

By | AI, Analytics, Automation, AWS, Blogs | No Comments

Written by Jeremiah Peter, Solution specialist-Advanced Services Group, Contributor: Ravi Bharati, Tech Lead and Ajay Muralidhar,  Sr. Manager-Project Management at Powerupcloud Technologies

Connected car landscape

Imagine driving your car on a busy dirt road in the monsoon, dodging unscrupulous bikers, jaywalking pedestrians and menacing potholes. Suddenly, a fellow driver makes wild gestures to inform you that the rear door is unlocked, averting an imminent disaster.

In a connected car system, these events are tracked in near real-time and pushed to the driver’s cell phone within seconds. Although the business relevance of real-time car notifications is apparent, the conception of the underlying technology and infrastructure hardly is. The blog attempts to demystify the inner workings of handling data at scale for an Indian automobile behemoth and equips you with a baseline understanding of storing and processing vast troves of data for IoT enabled vehicles.

The paradigm of shared, electric and connected mobility, which seemed a distant reality a few years ago, is made possible through IoT sensors. Laced with tiny data transmitting devices, vehicles can send valuable information such as Battery Percentage, Distance to Empty (DTE), AC On/Off, Door Locked/Unlocked, etc. to the OEM. The service providers use this information to send near real-time alerts to consumers, weaving an intelligent and connected car experience. Timely analysis and availability of data, thus, becomes the most critical success component in the connected car ecosystem.

Before reaching the OEM’s notification system, data is churned through various phases such as data collection, data transformation, data labeling, and data aggregation. With the goal of making data consumable, manufacturers often struggle to set up a robust data pipeline that can process, orchestrate and analyze information at scale.

The data conundrum

According to Industry Consortium 5GAA, connected vehicles ecosystem can generate up to 100 terabytes of data each day. The interplay of certain key factors in the data transmission process will help you foster a deeper understanding of the mechanics behind IoT-enabled cars. As IoT sensors send data to a TCP/IP server, parsers embedded within the servers push all the time series data to a database. The parsing activity converts machine data (hexadecimal) into a human-readable format (Json) and subsequently triggers a call to a notification service. The service enables OEM’s to send key notifications over the app or through SMS to the end-consumer.

Given the scale and frequency of data exchange, the OEM’s earlier set up was constrained by the slow TCP/IP data transfer rate (Sensor data size: TCP/IP- 360 bytes; MQTT- 440 bytes). The slow transfer rate has far-reaching implications over the user experience, delaying notifications by 6-7 minutes. As part of a solution-driven approach, Powerup experts replaced the existing TCP/IP servers with MQTT servers to enhance the data transfer rate. The change affected a significant drop in notification send-time, which is presently calibrated at around 32-40 seconds.

Furthermore, the OEM’s infrastructure presented another unique challenge in that only 8 out of 21 services were containerized. The rest of the services ran on plain Azure VM’s. To optimize costs, automate scalability and reduce operational overhead, all services are deployed on Docker Containers. Containers provide a comprehensive runtime environment that includes dependencies, libraries, framework and configuration files for applications to run. However, containers require extensive orchestration activities to aid scalability and optimal resource management. AWS Fargate is leveraged to rid the OEM’s infrastructure management team of routine container maintenance chores such as provisioning, patching, cluster and capacity management

Moreover, MQTT and TCP IP brokers were also containerized and deployed on Fargate to ensure that all IoT sensor data is sent to the AWS environment. Once inside the AWS environment, sensor data is pushed to Kinesis Stream and Lambda to identify critical data and to call the AWS notification service-SNS. However, the AWS solution could not be readily implemented since the first generation of electric vehicles operated on 2G sim cards, which did not allow change of IP whitelisting configuration. To overcome the IP whitelisting impediment, we set up an MQTT bridge and configured TCP port forwarding to proxy the request from Azure to AWS. Once the first generation vehicles are called back, the new firmware will be updated over-the-air, enabling whitelisting of new AWS IP addresses. The back-handed approach will help the OEM to fully cut-over to the AWS environment without downtime or loss of sensor data.

On the Database front, the OEM’s new infrastructure hinges on the dynamic capabilities of Cassandra DB and PostgreSQL. Cassandra is used for storing Time Series data from IoT sensors. PostgreSQL database contains customer profile/vehicle data and is mostly used by the Payment Microservice. Transactional data is stored in PostgreSQL, which is frequently called upon by various services. While PostgreSQL holds a modest volume of 150 MB Total, the database size of Cassandra is close to 120 GB.

Reaping the benefits

While consumers will deeply benefit from the IoT led service notifications, fleet management operators can also adopt innovative measures to reduce operational inefficiencies and enhance cost savings. Most fleet management services today spend a significant proportion on administrative activities such as maintaining oversight on route optimization, tracking driver and vehicle safety, monitoring fuel utilization, etc. A modern fleet management system empowers operators to automate most of these tasks.

Additionally, preventive maintenance can help operators augment vehicle lifecycle by enabling fleet providers to pro-actively service vehicles based on vehicular telemetry data such as battery consumption, coolant temperature, tire pressure, engine performance and idling status (vehicle kept idle). For instance, if a truck were to break-down due to engine failure, the fleet operator could raise a ticket and notify the nearest service station before the event occurred, cutting down idle time.

Conclusion

With 7000 cars in its current fleet, the OEM’s infrastructure is well-poised to meet a surge of more than 50,000 cars in the near future. Although the connected car and autonomous driving segment still goes through its nascent stages of adoption, it will continue to heavily draw upon the OEM’s data ingestion capabilities to deliver a seamless experience, especially when the connected car domain transcends from a single-vehicle application to a more inclusive car-to-car communication mode. Buzzwords such as two-way data/telematic exchanges, proximity-based communications and real-time feedback are likely to become part of common parlance in mobility and fleet management solutions.

As the concept of the Intelligent Transport System gathers steam, technology partners will need to look at innovative avenues to handle high volume/velocity of data and build solutions that are future-ready. To know more about how you can transform your organization’s data ingestion capability, you can consult our solution experts here.

Transforming Invoice Processing through Automation

By | AI, Automation, Blogs, Image Processing | 2 Comments

Written by Jeremiah Peter, Solution specialist-Advanced Services Group, Contributor: Amita PM, Associate Tech Lead at Powerupcloud Technologies.

Automation Myth

According to a recent survey by a US-based consultancy firm, organizations spend anywhere between $12 to $20 from the time they receive an invoice until they reconcile it. The statistic is a stark reminder of how organizations, in pursuit of grand cost-cutting measures, often overlook gaping loopholes in their RPA adoption policy- All or nothing!

This blog makes a compelling case for implementing RPA incrementally in strategic processes to yield satisfactory results. Streamlining the invoice management process is, undoubtedly, a judicious leap in that direction.

Unstructured invoice dilemma

In a real-world scenario, data in invoices are not standardized and the quality of submission is often diverse and unpredictable. Under these circumstances, conventional data extraction tools lack the sophistication to parse necessary parameters and, often, present organizations the short end of the stick. 

Consequently, most invoice processing solutions available today fail to reconcile the format variance within the invoices. The Powerup Invoice Processing Application is a simple Web Application (written in HTML and Python) that leverages cloud OCR (Optical Character Recognition) services, to extract text from myriad invoice formats. Powered by an intelligent algorithm, the solution uses the pattern-matching feature to extract data (e.g. Date MM-DD-YYYY) and breaks free from the limitations of traditional data extraction solutions.

A high-level peek into the solution


Picture by Google.com

Driven by a highly user-friendly interface, the Powerup Invoice Processing Application enables users to upload invoices (png, jpg) from their local workstations. The action invokes a seamless API call to Google OCR service, which returns a long string object as API response. A sample of the string is presented below:

Subsequently, the string is converted to a human-readable format through a script, which uses a Python-based Regex library to identify desirable parameters in the invoice such as date, invoice number, order number, unit price, etc. The extracted parameters are passed back to the web application after successful validation. The entire process lasts not more than 10 seconds. The video below demonstrates how Powerup has successfully deployed the complete process:

Another noteworthy feature of the solution is that it seamlessly integrates with popular ERP systems such as SAP, QuickBooks, Sage, Microsoft Dynamics, etc. Given that ERP systems stash critical accounts payable documents (purchase orders, invoices, shipping receipts), a versatile solution requires integration with the organization’s ERP software to complete the automation cycle. 

A brief look at the advantages offered by invoice processing automation can help you assess the value delivered by the solution. 

The Silver-lining

Picture by Google.com

The adoption of Powerup Invoice Processing Application helps organizations reap the following benefits:

  • Deeply optimized invoice processing TAT resulting in quicker payment cycles
  • Up to 40% cost savings in procurement and invoice processing
  • Highly scalable solution that can process multiple invoices in a few minutes
  • Fewer errors and elimination of human data-entry errors
  • Free-form parameter pattern-matching 
  • Easy integration with ERP software
  • Readily implementable solution; no change required from vendor’s end 

Conclusion 

While procurement teams in various organizations struggle to strike a trade-off between low funds dispensation and high-cost savings, measures that enable them to cut expenses and improve efficiencies in the invoicing process are a welcome respite. 

Tools such as the Powerup Invoice Processing Application can help organizations infuse automation and agility into its processes, as well as, knockdown process complexities into manageable parts. Moreover, the time and cost efficiencies achieved in these undertakings can be passed on to other functions that can significantly bolster the organization’s service offerings. To find out how your organization can be positively impacted, sign up for a free demo session here.

Building your first Alexa Skill — Part 1

By | AI, Alexa, Blogs, Machine Learning, ML | No Comments

Written by Tejaswee Das, Software Engineer, Powerupcloud Technologies

Technological advancement in the area of Artificial Intelligence & Machine Learning has not only helped systems to become more intelligent but has also made them more vocational. You can just speak to the phone & add items to your shopping list or just instruct your laptop to read your email. In this fast-growing era of voice-enabled automation, Amazon’s Alexa enabled devices are changing the way people go through their daily routines. In fact, it has introduced a new term in the dictionary, Intelligent Virtual Assistant (IVA).

Technopedia defines Intelligent Virtual Assistant as an engineered entity residing in software that interfaces with humans in a human way. This technology incorporates elements of interactive voice response and other modern artificial intelligence projects to deliver full-fledged “virtual identities” that converse with users.”

Some of the most commonly used IVAs are Google Assistant, Amazon Alexa, Apple Siri, Microsoft Cortana, with Samsung Bixby joining the already brimming list lately. Although IVAs seem to be technically charged, they bring enormous automation & value. Not only do they make jobs for humans easier, but they also optimize processes and reduce inefficiencies. These systems are so seamless, that just a simple voice command is required to get tasks completed.

The future of personalized customer experience is inevitably tied to “Intelligent Assistance”. –Dan Miller, Founder, Opus Research

So let’s bring our focus to Alexa, Amazon’s IVA. Alexa is Amazon’s cloud-based voice service, which can interface with multiple devices on Amazon. Alexa gives you the power to create applications, which have the capability to interact in natural language, making your systems more intuitive to interact with technology. Its capabilities mimic those of other IVAs such as Google Assistant, Apple Siri, Microsoft Cortana, and Samsung Bixby.

The Alexa Voice Service (AVS) is Amazon’s intelligent voice recognition and natural language understanding service that allows you to voice-enable any connected device that has a microphone and a speaker.

Powerupcloud has worked on multiple use-cases, where they have developed Alexa voice automation. One of the most successful & adopted use cases being one of the largest General Insurance providers.

This blog series aims at giving a high-level overview of building your first Alexa Skills. It has been divided into two parts, first, covering the required configurations for setting up the Alexa skills, while the second focuses on the approach for training the model and programming.

Before we dive in to start building our first skill, let’s have a look at some Alexa terminologies.

  • Alexa Skill — It is a robust set of actions or tasks that are accomplished by Alexa. It provides a set of built-in skills (such as playing music), and developers can use the Alexa Skills Kit to give Alexa new skills. A skill includes both the code (in the form of a cloud-based service) and the configuration provided on the developer console.
  • Alexa Skills Kit — A collection of APIs, tools, and documentation that will help us work with Alexa.
  • Utterances — The words, phrases or sentences the user says to Alexa to convey a meaning.
  • Intents — A representation of the action that fulfils the user’s spoken request.

You can find the detailed glossary at

https://developer.amazon.com/docs/ask-overviews/alexa-skills-kit-glossary.html

Following are the prerequisites to get started with your 1st Alexa skill.

  1. Amazon Developer Account (Free: It’s the same as the account you use for Amazon.in)
  2. Amazon Web Services (AWS) Account (Recommended)
  3. Basic Programming knowledge

Let’s now spend some time going through each requirement in depth.

We need to use the Amazon Developer Portal to configure our skill and build our model which is a necessity.

  • Click on Create Skill, and then select Custom Model to create your Custom Skill.

Please select your locale carefully. Alexa currently caters to English (AU), English (CA), English (IN), English (UK), German (DE), Japanese (JP), Spanish (ES), Spanish (MX), French (FR), and Italian (IT). We will use English (IN) while developing the current skill.

  • Select ‘Start from Scratch’
  • Alexa Developer Console
  • Enter an Invocation Name for your skill. Invocation name should be unique because it identifies Skills. Invocation Name is what you say Alexa to invoke or activate your skill.

There are certain requirements that your Invocation name must strictly adhere to.

  • Invocation name should be two or more words and can contain only lowercase alphabetic characters, spaces between words, possessive apostrophes (for example, “sam’s science trivia”), or periods used in abbreviations (for example, “a. b. c.”). Other characters like numbers must be spelt out. For example, “twenty-one”.
  • Invocation names cannot contain any of the Alexa skill launch phrases such as “launch”, “ask”, “tell”, “load”, “begin”, and “enable”. Wake words including “Alexa”, “Amazon”, “Echo”, “Computer”, or the words “skill” or “app” are not allowed. Learn more about invocation names for custom skills.
  • Changes to your skill’s invocation name will not take effect until you have built your skill’s interaction model. In order to successfully build, your skill’s interaction model must contain an intent with at least one sample utterance. Learn more about creating interaction models for custom skills.
  • Endpoint — The Endpoint will receive POST requests when a user interacts with your Alexa Skill. So this is basically the backend for your Alexa Skill. You can host your skill’s service endpoint either using AWS Lambda ARN, which is recommended, or a simple HTTPS endpoint. Advantages of using an AWS Lambda ARN are :
  • Sign in to AWS Management Console at https://aws.amazon.com/console/
  • Lookup for Lambda in AWS services
  • US East (N. Virginia)
  • EU (Ireland)
  • US West (Oregon)
  • Asia Pacific(Tokyo)

We are using Lambda in the N.Virginia (us-east-1) region.

  • Once we are in a supported region, we can go ahead to create a new function. There are three different options for creating your function. You can create a function from scratch or you can also use available Blueprints and Serverless Application Repositories.
  • C# / .NET
  • Go
  • Java
  • NodeJS
  • Python

We will discuss programming Alexa with different languages in the next part of this series.

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html

  • Go back to the Endpoint section in Alexa Developer Console, and add the ARN we had copied from Lambda in AWS Lambda ARN Default Region.

ARN format — arn:aws:lambda:us-east-1:XXXXX:function:function_name

In, part 2, we will discuss the training our model — adding Intents & Utterances, finding walkarounds for some interesting issues we faced, making workflows using dialog state, understanding the Alexa Request & Response JSON, and finally our programming approach in Python.

Chatbots 2.0 – The new Series of bots & their influence on Automation

By | AI, Artificial Intelligence, Blogs, Chatbot | No Comments

Written by Rishabh Sood, Associate Director — Advanced Services Group at Powerupcoud Technologies

Chatbots as a concept are not new. In fact, under the domain of Artificial Intelligence, the origin of chatbots is quite early, tracing back to as early as 1955. Alan Turing published “Complete Machinery & Intelligence”, starting an unending debate, “Can machines think?”, laying the foundation of the Turing test & eventually leading to ELIZA in 1966, the 1st ever chatbot. It failed to pass the Turing test but did start a horde of chatbots to follow, each one more mature than its predecessor.

The next few years saw a host of chatbots, from PARRY to ALICE, but hardly any saw the light of the day. The actual war on the chatbots started with the larger players coming into the picture. Apple led with Siri in 2010, followed closely by Google Now, Amazon’s Alexa & Microsoft’s Cortana. These chatbots made life a tad easier for the users, as they could now speak to Siri
to book an Uber or tell Alexa to switch off the lights (another way to make our lives more cushioned). While these chatbots did create a huge value to users in terms of making their daily chores automated (& speak to a companion, for the lonely ones), business still was a long way from extracting benefits from the automated conversational channel.

Fast track to the world of today & we see chatbots part of every business. Every company has budgets allocated for automating at least 1 process on chatbots. Oracle says that 80% of the businesses are already using or have plans to start using chatbots for major business functions by 2020.
Chatbots have been implemented across companies & functions, primarily with a focus on automating support systems (internal as well as external). Most of the bots available in the market today respond to user queries basis keywords/phrases match. The more advanced bots today use the concept of intent matching & entities extraction to respond to more complex user queries. A handful of bots today even interact with the enterprise
systems to provide real-time data to the users. Most of the commercially successful bots in the market today are text-based interactions.

Most of the bots in action today augment tasks, which are repeatable/predictable in nature. Such tasks, if not automated, would require considerable human effort, if not automated. These chatbots are powered by Natural Language Processing engines to identify the user’s intent (verb or action), which then is passed to the bot’s brain to execute a series of steps, to generate a response for the identified intent. A handful of bots also contain Natural Language Generation engines to generate conversations, with a human touch to it. Sadly, 99.9% of today’s implementations will still fail more than 60 years old Turing test.

It’s true that the conversational Engines, as chatbots are often referred to as, have been there for a couple of years, but the usefulness of their existence will now be brought to test. The last couple of months have seen a considerable improvement in how the conversational engines add value to the businesses, that someone refers to as the chatbot 2.0 wave.

At Powerup, we continuously spend efforts on researching & making our products & offerings better, to suit the increasing market demands. So, what can one expect from this new wave of bots? For starters, the whole world is moving towards voice-based interactions, the text remains only for the traditional few. So, the bots need to be equipped with the smart & intelligent voice to text engines, which can understand different accents & word pronunciations, in addition, to be able to extract the relevant text from the noise in the user’s query, to deliver actual value. The likes of Google & Microsoft have spent billions of dollars on voice to text engines, but the above still remains a tough nut to crack, keeping the accuracy of the voice-based system limited in the business world.

With the voice-based devices, such as Amazon Echo & Google Home, bring convenience & accessibility together. Being available for cheap & in mass (the smart speakers’ market is slated to grow to $11.79 billion by 2023), makes it a regular household item, rather than a luxury. The bots will have to start interacting with users via such devices, not limited to the
traditional channels of Web & Social. This will not only require the traditional voice to text layers to be built in, but specific skills (such as Alexa Voice Services for Alexa compatible devices) to be written. A key factor here is how the user experience on a platform that is purely voice-based (although Echo Spot also has a small screen attached to it), where visual rendering is almost nil, is seamless & equally engaging for the users, as is on traditional channels.

In 2017, 45% of the people globally were reported to have preferred speaking to a chatbot, rather than a human agent. 2 years down the line, chatbots are all set to become mainstream, rather than alternative sources of communication. But this poses a greater challenge for the companies into the business. The bots will now have to start delivering business value, in terms of ROI, conversions, conversation drops & metrics that matter to the business. HnM uses a bot that quizzes the users to understand their references & then show clothing recommendations basis the above-identified preferences. This significantly increased their conversion on customer queries.

The new age of chatbots has already started moving in a more conversational direction, rather than the rule-based response generation, which the earlier bots were capable of. This means the bots now understand human speech better & are able to sustain conversations with humans for longer periods. This has been possible due to the movement of the traditional intent & entity models on NLP to advancement on Neural networks & Convolutional networks, building word clouds & deriving relations on these to understand user queries.

Traditionally, Retail has remained the biggest adopter of the chatbots. According to Statista.com, Retail remained to occupy more than 50% of the chunk in the chatbots market till 2016. With the advancement being brought into the world of chatbots at lightning speed, other sectors are picking up the pace. Healthcare & Telecommunications, followed by Banking are joining the race of deriving business outputs via chatbots, reporting 27%, 25% & 20% acceptance in the area in 2018. The new wave of bots is slated to narrow this gap across sectors in terms of adoption further. A study released by Deloitte this year highlights the increase of internal chatbot use-cases growing more than customer-facing functions, reporting IT use-cases to be the highest.

Chatbots have always remained as a way of conversing with users. Businesses have always focused on how the experience on a chatbot can be improved for the end customer, while technology has focused on how chatbots can be made more intelligent. The bots, being one of the highest growing channels of communication with the customers, generates a host of data in the form of conversational logs. Businesses can derive a host of insights from this data,
as the adoption of bots among customers increases over the next couple of years. A challenge that most businesses will face would be the regulatory authorities, such as GDPR in the EU. How business work around these, would be interesting to see.

Mobile apps remain the widest adopted means of usage & communication in the 21 st century, but the customers are tired of installing multiple apps on their phones. An average user installs more than 50 apps on a smartphone, the trend is only going to change. With multiple players consolidating the usage of apps, users will limit the no of apps that get the coveted memory on their mobile phones. This will give an opportunity to the businesses to push chatbots as a communication channel, by integrating bots not only on their websites (mobile compatible of course) but other mobile adaptable channels, such as Google Assistant.

According to Harvard Business Review researchers, a 5-minute delay in responding to a customer query increases the chances of losing the customer by 100%, while a 10-minute delay increases this chance 4 times. This basic premise of customer service is taken care of by automated conversational engines, chatbots.

Chatbots have a bright future, especially with the technological advancement, availability & adaptability increasing. How the new age bots add value to the business, remains to be seen and monitored.

It would be great to hear what you think the future of automated user engagement would be and their degree of influence.

SAML for Single Sign-on in Chatbots.

By | AI, Blogs, Chatbot, SAML | No Comments

Written by Rachana Sharma, Associate Tech Lead, Powerupcloud Technologies

Identity management plays an important role in any kind of a chatbot Application today to authenticate a user. Chatbots are used widely for fetching user level details & data, which is fetched in realtime from an ERP or a CRM application. Thus security & identity management is a fundamental part of such chatbots to ensure relevant information is fetched.

SAML(Security Assertion markup language) is an SSO(single sign-on) protocol is one such protocol & one of the most adapted ones for Identity Management. It is a secure XML based communication mechanism to communicate identities between organizations. The primary use-case where we use SAML is internet SSO, which eliminates the need to maintain multiple authentication credentials (passwords) in multiple places and hence ease the access and increases security from any type of breach, which may happen due to identity theft and fishing.

Entities:

  • User
  • IDP(Identity Provider): Organisation that maintains the directory for a user and an authentication mechanism.
  • SP(Service Provider): Organisation of the host the targeted service.

All these entities are inter-related, as the user has an account in IDP. We can think of it as an employee having an account with the employer. the user wants to use an SP (particular application like chatbot application) while IDP and SP are related as they want to federate identities.

The way SAML work:

SAML SSO works by transferring the user’s identity from one place (the identity provider) to another (the service provider). This is done through an exchange of digitally signed XML documents.

  1. User Accesses the chatbot on the portal or maybe through a URL
  2. The application identifies the user’s origin (by application sub-domain, user IP address, or similar) and redirects the user back to the identity provider. Federate identity software running at IDP kicks into action and validates a users identity
  3. Constructs a specially formatted message which has information about the user, called claims. Claims can have info like username, email etc. To do this IDP may rely on an Account Attribute store( a common example of this can be the AD).
  4. The message is signed using an X.509 certificate, and IDP then posts this information to the service provider.
  5. SP determines that the message has come from a known IDP, and has a certificate fingerprint, retrieves the authentication response and validates it using the certificate fingerprint and creates a session specific to the user in the targeted application and allows direct access to the user.

When a user interacts with the chatbot, all that is visible to them is a click on the chat icon and they are able to interact with the chatbot.

How a basic chatbot application works and why we need authentication here:

Users on a chatbot application access the bot via a channel, which could be a mobile or a web browser or even Social Media based channels. For any channel access, UI transfers the user request to the bot’s back-end At the back-end, the user’s request is processed with Natural Language Processing and machine learning algorithms. The NLP returns the intent based on the user query and then fetches the data from the client APIs. If the query does not need the user to be authenticated, such as a static query response.

Following are the steps to identity Management using SAML for a chatbot application:

Prerequisites:

  • Python3
  • Flask
  • REST APIs

Let us take a sample flask bot application.

Index.py

from flask import Flask,request

import json

import ml_logic

app = Flask(__name__)

@app.route(‘/get_request’)

def hello():

return “Hello World!”

@app.route(‘/bot_request’, methods=[‘POST’])

def create_task():

bot_request = request.json[“user_request”]

user_id = request.json[“user_id”]

response = ml_logic.process(user_id,bot_request)

return json.dumps(response)

if __name__ == ‘__main__’:

app.run()

1. We will host this flask app as Service Provider for ADFS authentication. We have used Python3-saml demo-flask module to provide SAML support to out back-end Flask app. After setting up this library, combining both flask apps and hosting it with https will give us our SP URL.

  1. We have used ADFS as IDP here. After we get SP, we need this Service provider URL to be configured as Trusted Relying party in ADFS of the client.
  2. Once set up of Relying party trust is done, all we have to do is to provide IDP and SP related details in settings.py file present in python3-saml/demo-flask/saml.
  • SP information is the information about the flask app you have hosted.

Please note that the highlighted text will vary as per your environment.

Below is some screenshot for the ADFS setup with the chatbot.


Automate RDS and Aurora(MySQL) processes list in Lambda with KMS

By | AI, AWS, Blogs, Cloud, Cloud Assessment | No Comments

Written by Bhuvanesh, Former DBA, Powerupcloud Technologies

As a DBA it’s my job to make my MySQL server healthy. It doesn’t matter whether it is in RDS or EC2 or any Datacenter. On any given day at Powerupcloud, we manage tons of MYSQL databases of all flavours — On AWS, EC2/RDS, etc., So we heavily rely on AWS CloudWatch alarms. These alarms are good but unfortunately, they just send email notifications to you. We are not sure what’s happening inside the RDS. How do we go a little deeper into what caused certain CPU spike? There are a few third-party monitoring tools available to monitor everything deeply. We were thinking that we need to have a deep monitoring system without any third-party systems and we need to achieve this by not compromising on security. So this post explains how to get notified about more details of what’s happening inside MySQL/RDS and we use Lambda and AWS KMS Service to achieve that. For the sake of simplicity, we picked up notifying current running queries when there is a CPU surge. Read on. If you run into any issues, feel free to drop a note here, happy to help!

Services Used:

  1. RDS or Aurora (MySQL)
  2. KMS
  3. Lambda
  4. IAM Role for Lambda
  5. NAT instance or NAT Gateway.
  6. pymysql (mysql connector for Python)

Step1: Prepare the Networks for Lambda

Create these subnet and all in a VPC where your RDS is launched.

Create a NAT Gateway (or launch a NAT instance), Because Lambda will use NAT instance’s IP to access KMS.

Create two subnets in different AZ. (Because this should be separate from any production subnet)

Create a new Route Table and add the following rule.

Destination: 0.0.0.0/0

Target: NAT Instance ID/NAT GatewayID

Subnet Associate: Add the newly created subnets.

Step2: IAM Role for Lambda

Go to IAM -> Create Role.

ROLE NAME: lambda_basic_execution

Trusted Entity: lambda

Policies:

  1. AWSLambdaVPCAccessExecutionRole
  2. S3FullAccess (or create a custom policy to upload query results to S3) — But this is not mandatory
  3. Inline Policy for basic execution.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
}
]
}

Step3: Create a new KMS Key

Go to IAM -> Create a new key

Alias: Any friendly name.

Add Tags:

Tag Key: Name

Tag Value: Lambda-KMS

Key Administrative Permission: Select the IAM role

Then review the policy and click finish.

Activate the Key.

Step4: Python Code for this process.

Download pymysql from here. [https://pypi.python.org/pypi/PyMySQL]

Extract it and Copy the pymysql folder to your Desktop.

Create a new python file called app.py

Paste the below Code:

Now create a zip file with this app.py and pymysql.

Step5: Create a Lambda Function

Go to Lambda -> Create Function

Follow the below Configurations.

Click Create Function.

Click Encrypt.

Click Save and Test (This option is in the top of the page)

Now check the mail. You got the currently running process.

AWS Connect and Lex — Automate Your Customer Support

By | AI, Alexa, AWS, Blogs, Botzer | No Comments

Written By: Rachana Sharma, Software Engineer, Powerupcloud Technologies

Ever since AWS Connect was announced, we have been waiting for an excuse to get our hands on it and put it to use for solving a real-world use case. Soon enough, we were presented with the opportunity to automate voice-based IVR support for a large government entity in Singapore.

Regular readers of this blog might be aware that we have a thriving enterprise chatbot platform, Botzer.io and our product are used by multiple enterprise customers. So with the experience of deploying chatbots under our belt, when we ran into something like AWS Connect, it made perfect sense to integrate with Lex to automate voice-based IVR customer support. Why settle for text when you can make them bots talk 😉

That’s exactly what we did and this post explains how we made Connect, AWS Lambda, and Lex work together along with our Botzer engine at a high level.

Some of the queries handled by our final deployed solution are below:

  • Verifying user’s identity using NRIC number from the database
  • Verifying user’s mobile number using OTP authentication
  • Providing user a personalized response post verification
  • Allowing user to make transactions

AWS Connect And Contact Flows

After you set up your first AWS connect instance (tip: go through this video)you will be able to make calls to a customer care solution. Every activity on AWS connect including the IVR played is a contact flow. A contact flow is an editable roadmap directing the customer experience of the contact center. You can edit all contact flows in the contact flow module of the Routing menu.

The first Contact flow played as IVR to the user is Sample inbound flow (first call experience). You can edit this flow to put customized flows in IVR.

  1. Edit Get customer input module: The Sample IVR gives you 7 predefined options. we have reduced it to 4 DTMF input where each will perform specific operations. After you edit this module by double-clicking you can see an output connection for branching all 4 respective options.
  1. For each of the specified DTMF input, we have used the transfer to flow module in Transfer/Terminate menu. We can edit a transfer to flow to specify the contact flow name to be called when the respective button is pressed. The flow needs to be published so that it comes in the search menu to select a flow option.

Enable call recording: The module is available in the Set section of flow modules. We can edit call recording behaviour by double-clicking the module and choosing one of the following:

  • None
  • Agent and Customer
  • Agent only
  • Customer only

This will save your recording in the S3 bucket mentioned in the setting of the AWS connect Data storage section.

Store customer input to Contact attribute:

We can store customer’s input to contact attribute using store customer input module in interact section. You need to specify text for which user will type this value. This value will get saved as a system attribute. We can use the Set Contact attributes module to assign a key to this value so that we pass this key as an attribute other Lambda, Lex modules or use it in other contact flows.

Lambda Integration with Connect

Amazon Connect can successfully invoke a Lambda function in an AWS account when a resource policy has been set on the Lambda function. you can follow this link to set a resource policy for lambda and see sample request response from lambda to AWS connect.

Use Case: Buy CDP data

  1. This contact flow Calls lambda function to send OTP: We need to give full ARN of Lambda function. We are sending the user’s mobile number as a system attribute and NRIC number as a user-defined attribute( Taken from the first flow from a user) to lambda.

Lambda will get an event with a mobile number in it and make a rest call to send OTP to the user. We are using the AWS SNS service to send a message to the mobile. We can avoid using REST and put all the code in Lambda if we make a deployment package. Details of creating a deployment package here.

Following is the code for sending the OTP:

2) After the Lambda function sends an OTP to the user’s mobile IVR will ask for verification: Aws connect can take a user’s input in Store Customer input block of interact menu. We can branch the activity further based on the customer’s input using Check contact attribute module in the Branch menu. Here we are, authentication users, if the user types the correct OTP otherwise returning him to the main flow with a failed authentication message.

Lex integration with AWS connect

Amazon Lex is a service for building conversational interfaces using voice and text. By integrating these two services you can take advantage of Lex‘s automatic speech recognition (ASR) and natural language processing/understanding (NLU) capabilities to create great self-service experiences for your customers.

Use Case Opening of a CDP account

  1. We need to first add our Lexbot to connect to start using it in our Contact flows. To do this from the AWS console we need to go to our AWS instance settings and add bots in contact flows section.
  1. We can start building a contact flow by dragging Get customer Input from the interact menu. After dragging double click on the block and set the input to Amazon Lex and specify the name and Alias. you can also send a session attribute to the bot.
  1. We have created a Lex bot that will trigger for slots if the intent of the user is “open CDP account”. On fulfilment of all the required slots, Lex will call the Lambda function to connect integration.
  1. The Lambda function will fetch the slot values from the event sent and make a POST call to REST API which will insert a record of the user in DB and send an Email to the customer with his details using AWS SES service.

On successful execution of Lambda flow will be transferred again from lex to aws connect.

We will soon publish the relevant code used for this on GitHub and update this post.

Hope you found this useful. Happy customer servicing! 🙂