> For the complete documentation index, see [llms.txt](https://help.watbot.ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.watbot.ru/chat-boty/integracii/klientskaya-baza/kak-nastroit-integraciyu-s-klientskoi-bazoi.md).

# Как настроить интеграцию с Клиентской Базой

### 1. Настройка интеграции

Откройте свой личный кабинет [Watbot](https://watbot.ru), выберите нужного бота и перейдите в раздел **Настройки** > **Интеграции**, выберите **Клиентская База** и введите свои данные.

![](/files/-M52GjVB9zAHcTWUoiZy)

{% hint style="info" %}
API AuthKey находится в личном кабинете Клиентской Базы по адресу:

https\://**{ваша компания}**.clientbase.ru/edit\_modules.php?module=api
{% endhint %}

После ввода своих данных нажмите **Сохранить** и убедитесь что статус интеграции **Авторизован**.

![](/files/-M52Hp6W8C7OsV0nN3UX)

### 2. Настройка таблиц

Далее необходимо настроить таблицы куда будут записываться клиенты, переписка и сделки.

![](/files/-M52HYzTAsjw9PQtoX34)

#### Таблица для контактов

Выберите таблицу для контактов и настройте связь полей Клиенткой Базы с полями Watbot.

![](/files/-M52IqZ0u4b94sqS6e8w)

Для таблицы контактов доступны следующие соотношения полей:

* Имя контакта
* Телефон
* Текст (произвольный текст)
* Мессенджер
* Telegram Username

{% hint style="warning" %}
Для всех обязательных полей без значения по умолчанию в Клиентской Базе должна быть настроена связь, т.е. соотношение полей Watbot и Клиентской Базы.
{% endhint %}

#### Таблица для сделок

Настраивается аналогичным образом.

Для таблицы сделок доступны следующие соотношения полей:

* Имя контакта
* Телефон
* Текст (можете сами ввести произвольный текст)
* Мессенджер
* Telegram Username
* Связь с таблицей контактов (если в Клиентской Базе установлена связь с таблице контактов)

**Таблица для сообщений**

Настраивается аналогичным образом.

Для таблицы сделок доступны следующие соотношения полей:

* Сообщение (поле в которое передается текст сообщения)
* Связь с таблицей контактов (если в Клиентской Базе установлена связь с таблице контактов)

{% hint style="info" %}
Данные отправляются в CRM в соответствии настроек уведомлений в блоках сценария.
{% endhint %}

{% hint style="danger" %}
Если вы настроили отправку уведомлений при попадании в блок, то уберите галочку "удалить переменные после отправки заявки" в этом блоке.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.watbot.ru/chat-boty/integracii/klientskaya-baza/kak-nastroit-integraciyu-s-klientskoi-bazoi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
