# Setting up the chat robot  (new robot)

Open Bitrix24 and select the “Deals” or “Leads” section depending on where you want to set up the chatbot.

1. Click on the “Automation Rules” button<br>

   <figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2Ftzh0fKbMXh645UYwIOUA%2Frr1.jpg?alt=media&#x26;token=c43655d6-175b-496d-9d2c-74f580f82cd5" alt=""><figcaption></figcaption></figure>
2. Find the right stage of the sales funnel where you want to customize chatbot actions
3. Under the stage name, click the “+ Add” button<br>

   <figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2FOg9XLIqq1dNoriHdtlNC%2Frr2.jpg?alt=media&#x26;token=01905025-bdb4-42d5-b86b-1ab0efbeeb57" alt=""><figcaption></figcaption></figure>
4. Select “Other” and then a communication channel with the name: \[WhatsApp by Whatcrm] \[whatcrm] WhatsApp<br>

   <figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2FCA1UtbKJEXhpK2rT7y9w%2FGroup%20339.jpg?alt=media&#x26;token=e4940458-07ef-41af-88a8-b6512f09c74f" alt=""><figcaption></figcaption></figure>
5. Set up the conditions you need for the bot to be triggered
6. In the robot settings, select the desired Open Line. Messages will be sent from the phone number that is bound to this line. This allows you to manage sending messages through the right number by simply selecting the appropriate Open Line.<br>

   <figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2FS7HEeVnqhHI2rYCI5n3r%2Fline.jpg?alt=media&#x26;token=2f77d4e6-14f5-4e9a-af6d-ebd0c5614348" alt=""><figcaption></figcaption></figure>
7. Adding files to a message (optional) Now you can attach files directly in the robot parameters:<br>

   <figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2F9sxEmyV6xsOjSF9I77Pq%2Ffiles.jpg?alt=media&#x26;token=89d1d23c-c23a-4bb1-89d1-a72b3eeed13b" alt=""><figcaption></figcaption></figure>

* Click the “Upload file icon” button.
* Select the desired file from your computer disk. It can be an image, PDF catalog, document, etc.
* The file will be automatically attached to the post without the need to generate a direct link.

{% hint style="info" %}
💡 Please note: file sending may be subject to tariff-dependent restrictions. Please [check the file restrictions](https://whatcrm.gitbook.io/whatcrm-docs/english/useful-articles/attachment-limits).
{% endhint %}

{% hint style="warning" %}
Pay attention to the phone number type specified in the robot settings.

If one phone number type is specified in the contact/lead/transaction card (e.g. Work) and another is selected in the robot parameters (e.g. Mobile), the message will not be sent.

Make sure that the phone type selected in the robot matches the one specified by the customer.
{% endhint %}

## **Adding buttons (quick answers) in the robot**

*Buttons allow the customer to quickly select the desired answer option directly in WhatsApp. They are displayed as a poll.*

### 🔹 Basic rules for working with buttons:

* <mark style="color:orange;">**Minimum 2 buttons, maximum 6**</mark> - WhatsApp doesn't support sending a single button.
* <mark style="color:orange;">**You can send only text + buttons**</mark> - if you add a picture or file, they will be sent in a separate message.
* <mark style="color:orange;">**Only available on Pro plan and higher**</mark> - on Start plan only text without buttons will be sent.

## **How to customize the buttons in the robot:**

<figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2FvIohNAVFgjOCDOJyZJBq%2Fbuttons.jpg?alt=media&#x26;token=85741fcf-f149-4727-9db7-e5f85783ad60" alt=""><figcaption></figcaption></figure>

* In the “Buttons” field, enter the desired response options (e.g., “Order”, “Specify price”).
* Add a minimum of 2 options, but no more than 6.
* Save the changes and test the submission.

It's a great way to speed up communication and make it easier for the customer to choose the right action! 🚀

## Now, the bot settings include the ability to send notifications to a custom number.

<figure><img src="https://1360887499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fb61nIKR97C88XZEX04cC%2Fuploads%2FiHRcGC74pZ8YQo0fg0ml%2FGroup%20364.jpg?alt=media&#x26;token=f9b185f6-40ac-4eb0-9e86-ead36d760fb4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡 **Example use case**:\
When a lead or deal moves to a specific stage, a WhatsApp notification is automatically sent to the manager.
{% endhint %}

* Check the **"Send message to manager"** option.
* Enter the employee’s phone number to receive the notification. **(No spaces or special characters, the format must match the WhatsApp number).**
* Specify the notification text.
* Save settings
