The business process in the Creatio works as a bot handler. A dialogue tree is configured using the business process elements.
Follow the following steps to create your own dialogue tree:
Add a new business process. To do that follow one of the ways:
Add the following business process parameters:
Title | Code | Data type | Parameter purpose |
---|---|---|---|
ChatId |
ChatId |
Text (50 characters) |
This is the current dialogue ID in the [Dialogue] section. |
Answer_From_FirstName |
AnswerFromFirstName |
Text (50 characters) |
This is the user's name in the messenger, who is now speaking with the bot. |
Note: this data is open in the messenger. | |||
Answer_From_LastName |
AnswerFromLastName |
Text (50 characters) |
This is the user's surname in the messenger, who is now speaking with the bot. |
Note: this data is open in the messenger. | |||
Answer_From_UserName |
AnswerFromUserName |
Text (50 characters) |
This is the username in the messenger, who is now speaking with the bot. |
Note: this data is open in the messenger. | |||
Answer_From_Id |
AnswerFromId |
Text (50 characters) |
This is the user's identifier in the messenger, who is now speaking with the bot. |
Note: this data is open in the messenger. | |||
Answer |
Answer |
Text (50 characters) |
This is the user's initial message to the bot in the ongoing dialogue. |
Mailing category |
MailingCategoryId |
Unique identifier |
This is the messenger where the communication is going on right now. |
Add the [Bot settings] element to the schema designer diagram and fill in its parameters:
Chat Id (ChatId)
: map to the eponymous business process parameter.<aside>
📢 Attention: If nothing is displayed in the [Config] tab when opening the element settings and the error is in the console, it is necessary to check that the data is set correctly in the TsiVarCharStaticFile
and TsiVarCharacterConfig
data binds.
If the data is set correctly (there is no error in the system configuration), reinstall these data binds or contact the system administrator.
To reinstall data, execute the next script on DB.
update SysPackageSchemaData set NeedInstall = 1 where Name like 'TsiVar%';
</aside>
Add a [Bot message] element and configure the message.
<aside> 💡 Note: More details about settings up a message are described in the Bot-message configuration article.
</aside>
Save all business process settings.
Specify this business process as the bot handler in the [Bot] section. More details about it are here.
Besides, you can set up a dialogue closing. It can be after the execution of all the business process elements or after receiving a signal of a button clicking or another user response. To do this follow these steps:
Add a [Start] element.
Choose the ‘…’ type of this start element.
Enter the ‘…’ signal into it.
Add a [Changing data] element and specify the parameters:
Parameter | Value |
---|---|
Which object data should be changed? | Dialogue |
Change all records that match a condition | |
[Dialogue].[Id] |
Map to the [Chat] business process parameter. |
What field values should be set for modified records? | |
End date | Map to the [Current date and time] system variable. |
Status | Select the ‘Close’ item in the [Dialogue status] lookup. |
Connect with the final element.
Finally, save all of the changes.