The chatbot process is a standard business process created in the process designer Creatio.
The package in which you create a business process must depend on the Beesender package
When creating a chatbot, you will use the following main business process elements:
Start event – use this element as the beginning of your process
Beesender: Text message – use this element to send messages without buttons (for example, greeting, parting, some information, when you don’t expect a response to this message)
Beesender: Button message – use this element to send messages with buttons OR when you want to receive an answer to your question
Exclusive gateway (OR) – Exclusive gateway (OR)
Subprocess – build process using subprocess to increase the speed of the chatbot, and to call ready-made Beesender subprocesses
End event – use this element as the ending of your process
Create a chatbot process
Go to the section Process library and click New Process
Fill in a name of your process and a code
Go to the Parameters tab and create 3 required parameters:
Title | Code | Data type |
---|---|---|
ChatId | ChatId | Unique identifier |
ClientId | ClientId | Unique identifier |
OperatorId | OperatorId | Unique identifier |
Let’s try to create the first chatbot message!
1. Select the element User task
2. Select Beesender: Text message from the list
3. Fill in the fields:
Filed | Value |
---|---|
ChatId | Set parameter ChatId |
ClientId | Set parameter ClientId |
OperatorId | Set parameter OperatorId |
Text | Set your message, for example Hello |
Now go back to your Creatio system and set your process to your chatbot. Don’t forget to add the channel on the Channels detail.
Open the channel, that you added and write something to trigger the chatbot.
Congratulation! You receive your first chatbot message
Now that you understand the principle, let's dive into the details.
Beesender: Text message
Use Beesender: Text message element to send messages without buttons, for example, greeting, parting, some information, when you don’t expect a response to this message
In the Text field, you can not only write text but also enter the parameters read from the object. It can be like the name of the contact, today's date, and so on.
Parameters with a data type other than text must be converted to text.
For example, let’s try to send some information about Contact:
First, add the element Read data and select Contact in the Object field
Next, select the element User task
Select Beesender: Text message from the list
Fill in the fields: ChatId, ClientId, OperatorId
Click on the Text field and select Formula
Text that you type without using a parameter must be enclosed in quotation marks, for example: “Contact information: “
To add a parameter, use the + sign
To add a new line use “\n”
To convert a parameter whose data type is not a string, convert it. To do this, after the parameter brackets, write: .ToString(), for example: [#Date#].ToString()
For example, let's specify contact information in the text of the message, such as full name, date of birth and phone number, and our formula will look like this:
- "Contact information:"+"\n"+"\n"+"Name: "+[#Read Contact data.First item of resulting collection.Full name#]+"\n"+"Date of birth: "+[#Read Contact data.First item of resulting collection.Birth date#].ToString()+"\n"+"Mobile phone number: "+[#Read Contact data.First item of resulting collection.Mobile phone#]
6. Click Save to close Formula
7. And click Save, to save your process
8. Open your channel and write a new message to trigger a chatbot
As result, you receive the next message:
Contact information:
Name: Full name from a contact card
Date of birth: date/time from a contact card
Mobile phone number: mobile phone from a contact card
Beesender: Button message
Use Beesender: Button message element to send messages with buttons OR when you want to receive an answer to your question
Beesender subprocesses
The Beesender package includes several processes, that can be useful in your chatbot business process.