Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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

What elements make up a chatbot?

When creating a chatbot, you will use the following main business process elements:

(blue star) Start event – use this element as the beginning of your process

(blue star) 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)

(blue star) Beesender: Button message – use this element to send messages with buttons OR when you want to receive an answer to your question

(blue star) Exclusive gateway (OR) – Exclusive gateway (OR)

(blue star) Subprocess – build process using subprocess to increase the speed of the chatbot, and to call ready-made Beesender subprocesses

(blue star) End event – use this element as the ending of your process

Create a chatbot process

  1. Go to the section Process library and click New Process

  2. Fill in a name of your process and a code

  3. 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

As you already know, the Beesender: Text message has the following mandatory parameters:

Filed

Value

ChatId

[#ChatId#]

ClientId

[#ClientId#]

OperatorId

[#OperatorId#]

Text

The message you want to send

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:

  1. First, add the element Read data and select Contact in the Object field

  2. Next, select the element User task

  3. Select Beesender: Text message from the list

  4. Fill in the fields: ChatId, ClientId, OperatorId

  5. 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 connect the parameters together into one text, use + 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

Follow the link to learn more about working with the [Formula] process element

Beesender: Button message

Use Beesender: Button message element to send messages with buttons OR when you want to receive an answer to your question.

The Beesender: Text message has the following mandatory parameters:

Filed

Value

ChatId

[#ChatId#]

ClientId

[#ClientId#]

OperatorId

[#OperatorId#]

Message

The message you want to send

Button 1 - Button 9

The text displayed on the button for selecting the client's response to the chatbot. During the dialogue with the chatbot, only those buttons that are filled in are displayed

Answer

Leave this field blank

Beesender subprocesses

The Beesender package includes several processes, that can be useful in your chatbot business process.

FindFreeOperatorFromGroup

Bind channel to contact

BeesenderLogOperatorChange

Bind process to object

  • No labels