As I gathered the skeleton of the bot for taxi in Telegram
In the Telegram bots I for 3 hours, assembled the bot that sent the temperature in response to the user's geographical location. From that day I was delirious to call a taxi through a Telegram bot because the API of the taxi service I had on hand.
My goal is not just to tell you how I assembled the bot to call a taxi, and to share this process with others so the time I spent on the implementation of the algorithm did not spend the rest. As a result of this work, that any taxi service in the presence of API, maybe 5 minutes to configure the template of the bot for ourselves. Or the owner of the bot with a large number of users will be able to connect quickly to his taxi service.
Design and implementation
The first thing I did was draw on paper a simple machine for call taxi and order status. I wanted to make it quick and easy to understand, how much resources will be spent on this task from scratch. Since I had access to the API, you should implement only the logic.
In the process I fixed a minimum functionality – order now and pay cash. Functionally, the bot is able to receive only location services without recognition of text addresses. This minimal functionality of the design, implementation and testing I have collected over 8 hours.

Later, at the stage of retrieving the address from the user I added and text recognition via Yandex Speech API, so you can send your name or address is geolocation. But since I'm using the API of the taxi's in its specific format the address, this feature is not added to the Assembly.
Next step, I moved the paper describes the process and logic in the admin cloud OS Corezoid and connected to the process actual API Telegram. At this stage it was possible to test the receiving of messages from the Telegram into the process. The next step I, in the same order, created the process of ordering a taxi.
That looked so automatic that describes the status Telegram bot users, in the draft and how he was in Corezoid.

After creating the skeleton process of ordering a cab I created separate processes: sending a message to the Telegram, processing of geolocation and work with the API of the taxi service. 5 minutes was spent on testing and fixing bugs. Then went on to create dashboards.
Realtime dashboards and analysis
The main element in Corezoid is the Callback function, in Telegram terms this is called a Webhook. This feature allows the process to wait for a user response. Reactions in this particular process may be multiple: a user sends a geo-location or cancel the order (when idle, or on /cancel). In the future the Callback function the system uses to monitor the number of user steps in real-time. This allows you to visualize the funnel through customer process of ordering a taxi. Due to the processing of each step can be analyzed, what process the client has fallen off, and to moderate the process.

Since Corezoid automatically collects statistics for each state of the process, you can log in and view the detailed statistics of each user state and order.

Dashboards are one of the tools of process optimization. If you are going to use this process, you will need to build anything – dashboards come out of the box. There You will see how many users have hooked the bot how many uses, how use. You can notify individual clients about any updates or awaken the sleeping.


Can find in Telegram contact @utaxibot log dashboard. When you are in the bot enters the order command, you will see how the realtime dashboards.
How to use the template
I untied the bot from the existing API of the taxi service. So you can copy it the template directory and can connect to a local taxi service via the API. Simply enter your bot key Telegram on the one hand and API taxi service on the other.
Step 1. Log in 2 click on сorezoid.com
Step 2. Copied folder process.

Step 3. Register your Telegram-bot in the chat @BotFather and bind its key to the Corezoid process.

Step 4. Plug-in API taxi service according to documentation.
API requirements taxi wrote based on that API that I used. But Corezoid don't care what API you use, you can specify the mapping of incoming and outgoing data, so you can be any of your settings.
I suggest not to just use Corezoid as a designer to create processes and to use the existing template process.
And most importantly – Corezoid can work with any front end that supports the operation via webhook/callback. So this process will work with other systems interaction with the customer (Slack, Telegram, SiteHeart, SMS, etc.). You can connect a Twitter Direct Message API, and the same process will work via Twitter.
I plan to gradually modify the functionality of the bot, for example, will soon add text recognition; optimisation of work with desktop clients; order to multiple addresses and more. But, as an alternative channel, the bot can be used now.
Prequel
I work in PrivatBank and moderate business logic via Privat24 Corezoid. I am not a developer and don't have the slightest idea about the code.
Corezoid originally designed as a system solely to address operational issues of the Bank – manage escalations. In operation, it has transformed into a system of state management of objects and processes, and then it became clear that Corezoid is perfect for the role of the backend to the front-office systems, including instant messengers.
Platforms for backend creation are not so much. Recently on habré I came across this article where the guys started talking about the constructors for the Telegram-bot. Today I continue the conversation and show a flexible platform with dashboards out of the box. Enthusiasts will now be able to call themselves a taxi directly to the Telegram.
Click here if you want to use my template. Or here if you want to find Corezoid documentation and understand how to build other bots.
Article based on information from habrahabr.ru
My goal is not just to tell you how I assembled the bot to call a taxi, and to share this process with others so the time I spent on the implementation of the algorithm did not spend the rest. As a result of this work, that any taxi service in the presence of API, maybe 5 minutes to configure the template of the bot for ourselves. Or the owner of the bot with a large number of users will be able to connect quickly to his taxi service.
Design and implementation
The first thing I did was draw on paper a simple machine for call taxi and order status. I wanted to make it quick and easy to understand, how much resources will be spent on this task from scratch. Since I had access to the API, you should implement only the logic.
In the process I fixed a minimum functionality – order now and pay cash. Functionally, the bot is able to receive only location services without recognition of text addresses. This minimal functionality of the design, implementation and testing I have collected over 8 hours.

Later, at the stage of retrieving the address from the user I added and text recognition via Yandex Speech API, so you can send your name or address is geolocation. But since I'm using the API of the taxi's in its specific format the address, this feature is not added to the Assembly.
Next step, I moved the paper describes the process and logic in the admin cloud OS Corezoid and connected to the process actual API Telegram. At this stage it was possible to test the receiving of messages from the Telegram into the process. The next step I, in the same order, created the process of ordering a taxi.
That looked so automatic that describes the status Telegram bot users, in the draft and how he was in Corezoid.

After creating the skeleton process of ordering a cab I created separate processes: sending a message to the Telegram, processing of geolocation and work with the API of the taxi service. 5 minutes was spent on testing and fixing bugs. Then went on to create dashboards.
Realtime dashboards and analysis
The main element in Corezoid is the Callback function, in Telegram terms this is called a Webhook. This feature allows the process to wait for a user response. Reactions in this particular process may be multiple: a user sends a geo-location or cancel the order (when idle, or on /cancel). In the future the Callback function the system uses to monitor the number of user steps in real-time. This allows you to visualize the funnel through customer process of ordering a taxi. Due to the processing of each step can be analyzed, what process the client has fallen off, and to moderate the process.

Since Corezoid automatically collects statistics for each state of the process, you can log in and view the detailed statistics of each user state and order.

Dashboards are one of the tools of process optimization. If you are going to use this process, you will need to build anything – dashboards come out of the box. There You will see how many users have hooked the bot how many uses, how use. You can notify individual clients about any updates or awaken the sleeping.


Can find in Telegram contact @utaxibot log dashboard. When you are in the bot enters the order command, you will see how the realtime dashboards.
How to use the template
I untied the bot from the existing API of the taxi service. So you can copy it the template directory and can connect to a local taxi service via the API. Simply enter your bot key Telegram on the one hand and API taxi service on the other.
Step 1. Log in 2 click on сorezoid.com
Step 2. Copied folder process.

Step 3. Register your Telegram-bot in the chat @BotFather and bind its key to the Corezoid process.

Step 4. Plug-in API taxi service according to documentation.
API requirements taxi wrote based on that API that I used. But Corezoid don't care what API you use, you can specify the mapping of incoming and outgoing data, so you can be any of your settings.
I suggest not to just use Corezoid as a designer to create processes and to use the existing template process.
And most importantly – Corezoid can work with any front end that supports the operation via webhook/callback. So this process will work with other systems interaction with the customer (Slack, Telegram, SiteHeart, SMS, etc.). You can connect a Twitter Direct Message API, and the same process will work via Twitter.
I plan to gradually modify the functionality of the bot, for example, will soon add text recognition; optimisation of work with desktop clients; order to multiple addresses and more. But, as an alternative channel, the bot can be used now.
Prequel
I work in PrivatBank and moderate business logic via Privat24 Corezoid. I am not a developer and don't have the slightest idea about the code.
Corezoid originally designed as a system solely to address operational issues of the Bank – manage escalations. In operation, it has transformed into a system of state management of objects and processes, and then it became clear that Corezoid is perfect for the role of the backend to the front-office systems, including instant messengers.
Platforms for backend creation are not so much. Recently on habré I came across this article where the guys started talking about the constructors for the Telegram-bot. Today I continue the conversation and show a flexible platform with dashboards out of the box. Enthusiasts will now be able to call themselves a taxi directly to the Telegram.
Click here if you want to use my template. Or here if you want to find Corezoid documentation and understand how to build other bots.
Комментарии
Отправить комментарий