Skip to content

Business Logics

Business logic is a service that is connected to a chatbot in order to provide a specific service for mobile users. The chatbot defines how the message is transmitted, while the business logic decides how the message is processed. The Business Bot Platform offers the possibility to either choose one of the different business logics or to realize it yourself.

Business Logic Description
<Tenant>.<Account>.de.citunius.generic.wikipedia Interactions with Wikipedia
<Tenant>.<Account>.de.citunius.generic.messagegateway Sending messages in RAW format
<Tenant>.<Account>.de.citunius.generic.nagiosnotifier Interactions with the monitoring tool Nagios

Create Business Logic from Template

You can create a business logic with RiveScript or AIML 2.0, which can be accessed via the navigation bar as follows:

Chatbot AdministrationBusines LogicsCreate BL from Template.

You now have the option to choose between different templates. To use the chatbot logic with RiveScript or AIML 2.0 you must select Conversational Language. Subsequently, you must enter a name, description and specify a unique identifier for the new business logic. Finally, the summary of the data is displayed again.

The wizard will now create a new business logic for you. The business logic has a web interface, to script the logic with RiveScript or AIML 2.0. You can open the web interface at: Chatbot AdministrationBusiness Logics → in the Business Logic box, click on the WebUI tab, then Display Web Interface.

You must now create a new script project in the web interface of the business logic.

Hint

Install the sample data for the project if this is your first time working with RiveScript or AIML.

Subsequently click on the Editor button of the project actions. The project environment is now loaded. You can now create new script files using the file explorer or modify the example files. If you wish to create a new script file, use the context menu (right mouse click on the folder) in the file tree.

It is necessary to set the project and the project folder to active to ensure that the business logic for the user dialogs uses the correct project. You can modify the project using the project properties and activate it later (if not already done during project creation). The project folder can be activated in the editor. To do so, select the folder to be activated in the file tree and click on the Activate button.

As soon as project + project folders of the business logic are activated, you can test the dialogues. To do this, go to:

Chatbot AdministrationBusiness Logics → in the box of business logic click on the tab Play → Button Play. You can now start with the dialogue of the business logic. If you have installed the sample data, you can send the message Hello Luno and should receive as response Hello User.

Add Business Logic

A business logic can be added using the following options:

  • Through the integrated Citunius marketplace or company-internal marketplace
  • Uploaded as local business logic file

Add Business Logic from Marketplace

You can add a business logic from the marketplace by calling the marketplace page from the navigation bar:

Chatbot AdministrationMarketplace

There you will find business logics for various tasks. If you want to install a business logic, click the button Install. The business logic will appears in the list of installed business logics. If the business logic has already been installed, the button is grayed out and will display the text Installed. The Instant Messenger logo for the business logic indicates for which instant messenger the corresponding business logic has been designed.

Notice

Business logics that have been added from the marketplace can also be updated over the marketplace. The integrated update mechanism allows an easy and fast update to the latest version.

Add Business Logic from a Local File

If you have developed a business logic by yourself, or you have obtained the business logic from another trustworthy source, you can upload the business logic as a local file to the platform. The file consists of a ZIP archive, which contains the logic, language commands and configurations of the business logic. To upload a business logic file, call the following menu item from the navigation bar:

Chatbot AdministrationBusiness LogicsUpload Business Logic

You can upload the Zip file with the business logic in the upload form by dragging and dropping the file from a folder directly into the upload section.

The name and description are taken from the business logic.

Subsequently, the file is verified by the Business Bot Platform and the business logic is registered for your platform account. This business logic is only available for your account, but not for other customer accounts or the marketplace.

Modify Business Logic

If the business logic appears in the list of business logics (see Bot AdministrationBusiness Logics) and the status is Activated, then you can assign the business logic to desired bot instance.

You can configure the chatbot using the following web form:

Navigation bar: Chatbot AdministrationChatbots, then choose the bot and click the button [Settings]. In field Business Logic of the web form you can choose the name of the business logic. Click on Submit to apply your changes.

Update Business Logic

A business logic can be updated in various ways. Either an update is performed via the marketplace or it can be performed manually by the platform administrator. Before a business logic can be updated, it must have the status Ready or Stopped. This ensures that no operations are performed by the business logic during update (for example, transactions with the database, interactions with users).

Update via the Marketplace:

This update method involves connecting to the Citunius Marketplace repository to check for updates. If there is an update for the business logic, the update file is downloaded from the Citunius Marketplace and subsequently installed on the platform. The software code of the old business logic is deleted. It is therefore necessary to perform a backup of the current business logic in case a restore of the old business logic becomes necessary. All business logics are stored in the directory C:\ProgramData\bbp\businesslogics (Windows) and /var/lib/bbp/businesslogics (Linux).

Update with Local File:

Alternatively, a business logic can be updated with a file. Therefore the platform must be stopped and the software code of the business logic must be replaced in the directory C:\ProgramData\bbp\businesslogics (Windows) or /var/lib/bbp/businesslogics (Linux). Subsequently, the new version of the business logic must be registered in the database table bbp_gwcore_business botplugins of the platform.