Over a million developers have joined DZone.

How to Build a Chatbot With Corezoid's PaaS

DZone 's Guide to

How to Build a Chatbot With Corezoid's PaaS

Here's a technical example of Corezoid, a cloud-based process engine that can help bind separate APIs into better-rounded solutions.

· Integration Zone ·
Free Resource

Corezoid is a cloud-based process engine offering a system based on the status management of objects and processes, which can help developers establish digital cores to handle a business’ backend needs with efficient results. Corezoid can also be thought of as a “Krazy Glue” for APIs, able to easily and powerfully combine separate APIs into capable solutions. These factors also make Corezoid able to be a backend for chatbots, enabling bots to fully and rapidly access the breadth of a business’s internal systems.

What follows is a technical walk-through example of this.

When the Telegram messaging service introduced its bot API and platImage titleform, it was possible to quickly produce a Telegram bot, using Corezoid, that could call a taxi for the user. Beginning with the API of a taxi service, and a design calling for minimal functionality (as this is only an example), a bot able to receive geo-located addresses and summon a cab for cash payment was implemented, tested, and ready to use in just eight hours.

Design of the chatbot began by sketching out the logic for creating a taxi request. Steps included determining the geo-location of the user, confirming it as a location the taxi service can reach, accepting the user’s phone number, and placing the order with the taxi service.

We also utilized the Yandex Speech API to add text recognition, so that the user could type the name or address of a place rather than relying on geo-location. With this logic sketched out, we then entered this process into the Corezoid cloud OS admin tool, connecting the Telegram API as well. That was all we needed to do to be able to test the process, and to then see that messages were being received by the Telegram chatbot.

Next, we created the logic for the bot to process a taxi request and keep track of the user’s status, and built that logic within Corezoid. With the framework of the taxi request process in place, we then created several more separate processes. These included an allowing messages to be sent to the Telegram bot, processing geo-location information, and delivering information to the taxi service by way of its API.

Image title

We then moved on to producing real-time dashboards with Corezoid in order to analyze what is going on inside the system. Using Corezoid’s Callback function – and Webhook in Telegram – gave us a feature that allows a process to wait for a user to take action. This is useful when a user is sending her geo-location, or is executing the Cancel option (which also happens if they are idle for too long). The system also uses the Callback function to give the user a real-time visual display of their steps within the process of calling a taxi, and offers a tool for analysis of where users quit the process. In general, this feedback as an analytical tool may help suggest where and how to improve and optimize the user experience.

Image title

These Corezoid dashboards are “out of the box,” with no need for developers to expend additional effort creating them. Corezoid collects statistics for every process automatically, allowing developers to view the details for every user and the status of taxi orders, making it quick to perform informed process optimization. Developers can see how many people are using the bots, notify individual users of updates, and send prompts to those who are idle.

Image title

This example chatbot is available for use as @taxibot on Telegram, where you can use the bot to issue an Order command and view the real-time dashboards in action. The example is also available from Corezoid.com, where you can make use of the template for this process and attach it to your own local Taxi service API if you’d like.

Image title

Importantly, the platform can work with any front end supporting operations via Webhook or Callback, meaning that chatbots created with one bot platform in mind can easily be made to work with other platforms, such as Slack, SiteHeart, SMS, or even the Twitter Direct Message API. In a messenger platform landscape that now has dozens of strong options and around 100 overall, this ability to easily reach new audiences is highly valuable, and we believe this is a capable backend appropriate for serving any of those front-end platforms.

bot framework ,bot ,telegram ,api strategy

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}