# Kommo

Kommo - an international brand of amoCRM. Suvvy (just like with amoCRM) is integrated with it and can:

1. Respond to customer messages (the channel from which the message came does not matter)
2. Move a deal through the pipeline, specifically changing pipelines and statuses within it
3. Retrieve information from deal fields
4. Fill deal fields with information obtained from client dialogue
5. Fill hashtags

## Connection

To connect Suvvy to Kommo, you need to go to the Channels section within the bot and access the Kommo channel:

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F50yvqWB4758y5ApbK8yK%2Fimage.png?alt=media&#x26;token=ae8b9bb0-b1bf-466f-a74f-6f0368b32299" alt=""><figcaption></figcaption></figure>

In the opened window, click the **Connect to Kommo account** button:

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FsET0XtpV3YMJTeKAp9mM%2Fimage.png?alt=media&#x26;token=42f3e862-b0c7-4c27-868e-88013dba69f8" alt=""><figcaption></figcaption></figure>

This will redirect you to the Kommo authorization page, where you need to enter your Kommo credentials:

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2Fgit-blob-fc5c7daf9c8685a2a91867b44e424fabab2834dc%2Fimage%20(2)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

Select the desired account and click **Allow**.

After that, the authorization window will close and redirect back to the Kommo settings on the **Suvvy** personal account side.

## Pipeline and Status Configuration <a href="#pipeline-and-status-configuration" id="pipeline-and-status-configuration"></a>

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F7RiW2h8Fb3Klp1qOADey%2Fimage.png?alt=media&#x26;token=e9b0e742-f1e2-45fa-818e-f757057ee8d2" alt=""><figcaption></figcaption></figure>

In the first tab, **Pipelines and Statuses**, you can specify in which pipelines and statuses the bot will respond, and in which it will not.

If no pipelines or statuses are selected, it will respond by default in all of them.

{% hint style="info" %}
This scheme allows you to create different bots for different pipelines and statuses, creating a branched network of bots, where each bot is responsible for a different stage, thereby increasing the accuracy and efficiency of the work.
{% endhint %}

## Additionally <a href="#additionally" id="additionally"></a>

CommentShare feedback on the editorIn the Additional section, you can select the "co-pilot" mode, configure adding tasks, and transfer the history of the dialogue before connecting the bot as a Summary.CommentShare feedback on the editor

### Pass summary <a href="#pass-summary" id="pass-summary"></a>

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2Fz5RrowSOG0hsdmPddksY%2Fimage.png?alt=media&#x26;token=3dd75e49-67a0-4be2-9ca6-9f974c940459" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
When the **Pass summary** flag is enabled, the option to send the bot a summary of the history of the dialogue that took place **BEFORE** the bot was connected will be enabled.

**In simple terms**, if we received a message and created a new dialogue (provided that this setting is enabled), before the first transfer to llm, we will make a request to Amo, download the previous dialogue, make a summary and add it as the very first message.
{% endhint %}

*The **Limit message count for summary** setting allows you to choose how many previous messages will be passed to the bot to generate a summary. The possible range is **1-50 messages**. If the flag is disabled, then **50 messages** will be passed by default.*

### Adding Tasks

1. Task type "**Call**":

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FSOAvkatmypG01gN1GmDY%2Fimage.png?alt=media&#x26;token=d5e87d1b-9c38-4db4-93cd-bec79e08dbd3" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
When you turn on the switch, in order for the bot to create a task in **amoCRM/Kommo**, write in the instructions a scenario when this task needs to be created, it will create it.

If you need to force a function, then use the **function name**: `amo_add_call_task`.
{% endhint %}

2. Task type "**Meeting**":

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F3Frqv9lPRtO8uj778UAx%2Fimage.png?alt=media&#x26;token=b1bed73e-df66-464c-b2f4-5d0d8e8d68fb" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
When you turn on the switch, in order for the bot to create a task in **amoCRM/Kommo**, write in the instructions a scenario when this task needs to be created, it will create it.

If you need to force a function, then use the **function name**: `amo_add_meet_task`.
{% endhint %}

### "Co-pilot" mode <a href="#co-pilot-mode" id="co-pilot-mode"></a>

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FYwEvwKLYSUij6J41fJw6%2Fimage.png?alt=media&#x26;token=2bec9e71-338f-48ac-8f1b-605bbfbb0d62" alt=""><figcaption></figcaption></figure>

The "**co-pilot**" mode allows you to transfer notes to **amoCRM** instead of messages. This mode is a kind of assistant mode for the sales manager, when it gives the manager quick tips, while eliminating the possibility of errors when responding to the end client.

{% hint style="info" %}
This function can be useful at the initial stage of testing, when not all the bot's answers have been verified yet, but you already want to see how it will respond to real clients.

In addition, it can be useful in areas where the cost of an error in the answer is very high, and can be used on an ongoing basis as a quick way to provide information to the manager.
{% endhint %}

### Add recent messages from the employee at the beginning of the dialogue

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FC1DvNIsmBoJnlFoIAFG1%2Fimage.png?alt=media&#x26;token=4efb97c3-8d97-4b66-bf57-2855e1cfce21" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
By default, the last message of the employee is not added to the chat. This is done so that when sending messages to clients, the bot is not interrupted by receiving a message from the employee. If the bot does not receive this message, it is NOT added to the context.
{% endhint %}

## Filling deals

The "**Filling deal**" section is responsible for filling in the deal fields.

### Fill Responsible

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FDyl8MM7L17KMHxxPkyZy%2Fimage.png?alt=media&#x26;token=092aa253-edf5-451d-9224-0ef419d10c7b" alt=""><figcaption></figcaption></figure>

This function allows you to fill in the **responsible field in the deal**.

To get a full list of available employees, click on the **ID List** to the right of the flag:

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FnyRTh8pThq6zJcl1lTtt%2Fimage.png?alt=media&#x26;token=8382af97-184a-44fa-bb03-4e92eed7b0cf" alt=""><figcaption></figcaption></figure>

"**Modify the description of the budget modification function**" means that you can set your own instructions for the bot on how it should act when filling the transaction budget.

{% hint style="warning" %}
This field should contain instructions that relate exclusively to filling in the field.

There **should be no instructions** like: "Ask...", "Ask the client...", "You should ask a question...". "Call the function...", etc.
{% endhint %}

### Allow the bot to fill out a card

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F09qYEQlJp7oxfEfRW7jh%2Fimage.png?alt=media&#x26;token=85e2696f-2e86-412e-b9f4-a2b03082c029" alt=""><figcaption></figcaption></figure>

**Allow the bot to fill out a card** is another switch that turns on the function itself. Since any such actions inevitably increase the cost of the dialogue, since all information about these planned actions is transferred to the model, this switch is off by default.

{% hint style="info" %} <mark style="color:blue;">**Important!**</mark>

If you specified fields for the bot to fill in, to understand it needs to fill the card, include the following text in the general instructions:

`Fill in the client card as you receive responses from them.`
{% endhint %}

## Fill Contact

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FV4ZkjP3hUyvOAwAcqtse%2Fimage.png?alt=media&#x26;token=2264dc39-ccbf-4e54-8483-a871e334905c" alt=""><figcaption></figcaption></figure>

The **Fill Contact** section allows Suvvy to know the values ​​of selected fields from the contact card and the name of the contact associated with the lead. This can be useful when Suvvy needs to understand information associated with the customer in order to use that information in the context of the conversation.

## Information from deal

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F58iYzdGJ9zchLNhwWF3L%2Fimage.png?alt=media&#x26;token=144cfddb-bb6d-4c13-b16f-b5451675a7e0" alt=""><figcaption></figcaption></figure>

The "**Information from deal**" section allows Suvvy to know the values ​​of selected fields from the deal. This can be useful when Suvvy needs to understand the context of the deal and some data about it in order to use this information in the context of the conversation.

## Information from contacts

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FfPZsTyCdzooHfkoBffzl%2Fimage.png?alt=media&#x26;token=ac702c6e-940e-4b6e-84d6-5a8129da5356" alt=""><figcaption></figcaption></figure>

The "**Information from contacts**" section allows Suvvy to know the values ​​of selected **fields from the contact card** and **the name of the contact associated with the lead**. This can be useful when Suvvy needs to understand information associated with the customer in order to use this information in the context of the conversation.

## Deal Movement through the Pipeline

After connecting amoCRM and Suvvy, an additional tab, Actions in amoCRM, appears within the knowledge base files:

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FEkY1TP5fPJPdYGp8Yf6J%2Fimage.png?alt=media&#x26;token=cc8fecbe-b67c-450e-8aee-01156ab25d95" alt=""><figcaption></figcaption></figure>

This section has three blocks:

1. **Status Change** — here you can select the pipeline and status to which the current deal status will change when this knowledge base file is triggered.
2. **Card Filling** — this provides the ability to set a fixed value for a specific field when this knowledge base file is triggered.
3. **Satting Tags** — this provides the ability to set a specific tag for the deal when this knowledge base file is triggered.
4. **Creating summary** — this allows you to create a summary of the dialog before the file is triggered in order to pass this summary to the dialog note in Amo.

## Connection in a multi-agent scheme

How to properly configure bots when using multi-agent in the [Switch Active Bot](https://docs.suvvy.ai/en/actions/multiagentnost/pereklyuchenie-aktivnogo-bota) mode.

*The correct connection looks like this:*

* **Administrator bot** — channel connected, responses enabled, additional functions disabled (filling out a deal, etc.)
* **Bot we are switching to** — channel connected, responses disabled, additional functions enabled
