Background

As a national leader in Google Dialogflow implementation, we were selected  by a multinational development agency to implement a highly scalable natural language interface (NLU) for their Fortune 500 client. They had selected Dialogow flow as the NLU because they wanted users to be able to talk to the app as if they were speaking to a real person, and Google Dialogflow is the only NLU with the necessary sophistication. The client needed this because research showed that their clientele placed most orders while onsite or driving and they wanted to enable hands-free access but they had been struggling for over a year to find engineers with the appropriate experience.

Challenge​

Anyone who has ordered from a catalogue knows that product combinations can be incredibly tricky, and understanding what the customer actually wants is a complex challenge even for a human with the thousands of ways customers can phrase their requests. The application also needed to interface with their existing ordering API, following all of their stringent corporate security requirements. Additionally,  the existing mobile application had to retain all of its existing functionality, while simultaneously allowing for voice control.

Solution​

Google Dialogflow was selected because it is an NLU tool designed for this exact purpose. It is globally available and performant, has excellent API libraries, and good documentation to boot. The product’s architecture is designed to leverage existing digital infrastructure as well. We contacted Google about the project and were able to work directly with their product team to help us identify and implement best practices and leave the codebase open to upcoming features soon to be released.

Another feature that made Google Dialogflow the ideal solution for this complex project was that it has uniquely powerful and straightforward API integration capabilities. Dialogflow maintains a database of “entities” that can be uploaded programmatically to represent the catalogue and then uses the entity types to model the catalogue and parse the intent of the customer. It surfaces that modeling in a context history which we used to update the application’s cart. As Dialogflow deciphered these intents it also made webhook calls to endpoints specified by our team to promote sales and guarantee items were in stock.

  1. The mobile application connects directly to Google Dialogflow, leveraging built-in speech to text as well as Google Cloud Platform’s unmatched availability and scaling.

  2. Dialogflow then fires off webhook calls for predefined intents, sending data to a translation and authentication layer.

  3. Fulfillment microservices communicate with the existing application APIs. This is where the bulk of the backend logic occurs, managing users and executing the intent parsed by Dialogflow.

  4. An additional service periodically runs, typically two or three times daily. This service guarantees that Dialogflow understands the most recent version of the application’s data. In this case the product catalog.

We also built an automated testing pipeline that will deploy its own testing Dialogflow agent and associated services any time new code is implemented, running test queries to guarantee that all existing features remain stable as new features are introduced. This allowed the developers to move much faster and deliver more features, as the team never had to stop to repair the production application. This process is called continuous integration, and when implemented and followed correctly can cut the time to market significantly.

  1. Developers submit pull requests (new code) to the source repository in Github. This triggers the Cloud Build hook set up within Github.

  2. Cloud build deploys the code and Dialogflow agent in the pull request to the Testing environment, a replica of the production environment with controlled data. Here is executes any number of scripted tests. Here we mimicked user input and checked that all services responded appropriately.

  3. If all tests pass then the new version of the Dialogflow agent and fulfillment services are deployed to a staging environment, where additional manual testing can happen. Once quality assurance is satisfied the staging environment can then be deployed to production where real users will interact with it.

Results

After having been bottlenecked for over a year due to lack of onsite expertise, our client was finally about to deploy their alpha test phase and it was much more successful than leadership anticipated. This was because we were able to develop features that were so stable they were able to expand from a citywide test release to a national release across all 14.4 thousand locations and available to all 7 million app users. Initial data indicates our features significantly increased user adoption of the mobile app and order volume due to the ability to push sales and deals to engaged users.

Conclusion​

NLU chatbot interfaces have been awkward and clunky for a long time, we at Opna Dev have a proven approach that results in a usable chat interface, opening the doorway to an automated, consistent UX across sms, voice, digital chat, and email, as well as many others. We are very proud of the work we delivered on this project and hope to deploy more AI chatbots in the future.


Ready to get started?
Let's talk!

Contact us