To create a solution for taking food orders with minimum staff engagement and without the obligatory installation of an application on a customer`s phone.
Our client is starting a food delivery business. In the context of COVID, he wanted to provide minimum staff engagement in order processing and only hire employees who are involved in the cooking process. The food is delivered by an external delivery service.
Our client wanted to create a chatbot for taking food orders. The special feature of this service is that our customer aimed to provide its use without the obligatory installation of an application on the phone.
The chatbot is supposed to run in the Telegram Messenger environment and be available via SMS - in this case, Telegram is not even needed and an order can be placed from the oldest phone model. This option is especially attractive for those users who do not like to take care of timely software updates on their phone.
A chatbot that communicates with the customer and specifies the dishes for the order, their quantity and the details for delivery.
The client produces several categories of food: pizza, hamburgers, sandwiches, hot dogs and others. The first thing while ordering is to determine if the client needs a link to the menu, and send it if necessary, then to specify the type of dish the client wants to order, and then to accept a list of dishes, the quantity for each order, for whom and where to deliver. This scenario fits perfectly into the standard chatbot scheme.
As usual, we develop our solution using Amazon services.
Implementation of Amazon Pinpoint service for SMS exchanging Using Amazon Lex service to establish a dialogue with the customers. Amazon Personalize service - to remember the user's preferences.
There are two types of data transfer protocols for the users to order food in the system: SMS and REST API (for the Telegram bot). For the exchange of SMS with the user, we used the Amazon Pinpoint service. There is a limitation for this type of data transfer - we need two-way SMS distribution to be supported. This does not work everywhere in the world, but is available in all developed countries. To handle REST API calls, we developed our own service on Node.js.
After we receive a message from the user, we first forward it to the Amazon Lex service, which establishes a dialogue with the customers according to their responses. The dialogue begins by determining the user's intentions, from which category the dishes are selected for the order. Next, the customer must specify either the names of the dishes and their quantity, or the numbers of the dishes on the menu. For each food category, we have a specific communication script, written in the logic of the service, which includes special extra offers, such as ketchup or beer. After the user makes a selection in a category, we clarify whether the client wants to order anything else, and if he or she wants to order more dishes from other categories, we make this option available. When the order is completed, we announce the promotional offers, and if the user rejects them, we wait for the address and name of the client to be entered.
Then, we pass all responses to Amazon Personalize service, which remembers the user's preferences so we can create the next offers based on these preferences.
We store our order data in a relational DynamoDB. In addition, our service includes a web application that allows you to change the logic of the chatbot in case of a change in the menu, add information about ongoing promotions, and view analytics about the dishes that were ordered.