# Viber + Krokul CRM

Yes. Krokul CRM integrates with the Viber chatbot of your company. The first client message to the bot creates a contact, a deal and a thread in «Communications» in Krokul, and the manager reply from Krokul goes to the client in the same Viber chat. Further messages land in the same open deal.

**Status:** Via API and webhooks. **Automation platforms:** Albato.

## What your team gets

### The first message opens a deal

A client writes to the bot, and Viber sends a message event with the sender ID and name. Krokul finds the contact by Viber ID or creates a new one, opens a deal named «Viber» with the client name and puts the text into the thread. The manager sees the request in «Communications» together with other channels.

### The manager reply goes to the same chat

The manager writes in the deal thread. Krokul calls send_message with the client ID, and the reply arrives in the Viber chat from the bot. A file can go along with the text, for example an invoice from the deal card.

### A greeting when the chat opens

The conversation_started event arrives when a person opens a chat with the bot for the first time. In reply, Krokul sends one welcome message that the administrator sets. The contact appears later, with the first message from the person.

### You see that the client has read it

The delivered and seen events show that a message has arrived and been opened. Krokul puts these marks next to the message in the thread. The failed event marks a reply that Viber did not deliver, and the manager picks another channel.

### Unsubscribing stops the conversation

When a client unsubscribes from the bot, Viber sends unsubscribed. Krokul marks the Viber channel of the contact as closed, and the reply field in the thread shows that the bot can no longer write to this client.

## What moves between Viber and Krokul

| Viber | Krokul | Direction | When |
|---|---|---|---|
| message event (text, file, contact, location) | Contact, deal and message in a «Communications» thread | Viber → Krokul | A client writes to the bot |
| send_message | Manager reply in the thread | Krokul → Viber | The manager sends a message |
| conversation_started event | Welcome message | Viber ↔ Krokul | A person opens a chat with the bot |
| delivered, seen, failed events | Delivery and read marks next to the message | Viber → Krokul | After every reply |
| subscribed and unsubscribed events | Viber channel state on the contact | Viber → Krokul | Subscription or unsubscription |
| Viber user ID | Contact identity in the channel | Viber → Krokul | The first message |

## How to connect today

### Krokul app in Albato

1. Connect the Viber bot in Albato with its token, and the Krokul app with a Krokul API key.
2. Link the Viber trigger Message from the user received to the Krokul actions «Find Contact», «Create Deal» and «Add Activity».
3. Link the Krokul trigger «Deal Stage Changed» to the Viber action Send message, so the client gets a status message.

### Your own flow through the Krokul API and webhooks

1. Copy the bot token from the Viber panel and issue a Krokul API key with scopes for contacts, deals and activities.
2. Register your handler with a set_webhook call with the X-Viber-Auth-Token header.
3. On a message event, check X-Viber-Content-Signature, find or create the contact through `contact/api-create`, open a deal through `card/api-create` and record the text through `activity/api-create`. Store the Viber ID through `externalRef/api-set`.
4. Subscribe a Krokul webhook to `card.statusChanged` and send the client a message through send_message.

**Triggers:** Message from the user received; User subscribed; User has unsubscribed.

**Actions:** Get User Details; Send message; Custom API request.

### For integrators

Viber signs every event with the X-Viber-Content-Signature header, an HMAC-SHA256 of the body keyed with the bot token, and every API request carries X-Viber-Auth-Token. A Viber client has an ID of its own with no phone number, so Krokul keeps it as an external key of the contact through `externalRef`. A repeated delivery of the same event creates no second message, thanks to message_token.

[API documentation](https://app.krokul.com/api/v1/docs)

## Questions and answers

### Can I handle Viber conversations in Krokul?

Yes. Client messages to the Viber bot land in the deal thread in «Communications», and manager replies go back to Viber from the bot.

### Can a Viber bot write to a client first by phone number?

No. The bot writes only to people who subscribed to it or have already written. Messages by phone number go through a business messaging service such as TurboSMS.

### How does Krokul recognize a client who writes in Viber again?

By the Viber user ID stored on the contact. The new message lands in the same open deal.

### What do I need to connect Viber to Krokul?

A Viber chatbot of your company and its token. The bot is set up with Viber on commercial terms, and Krokul works with it through the REST Bot API.

## Limits

A Viber bot writes only to people who subscribed to it or have already written to it. Viber creates new bots on commercial terms, so the company bot is set up with Viber, and Krokul connects to the existing bot with its token.

## Related services

- [Telegram](https://krokul.com/en/integrations/telegram/index.md)
- [WhatsApp Business](https://krokul.com/en/integrations/whatsapp-business/index.md)
- [Facebook Messenger](https://krokul.com/en/integrations/facebook-messenger/index.md)
- [Instagram Direct](https://krokul.com/en/integrations/instagram-direct/index.md)
- [TurboSMS](https://krokul.com/en/integrations/turbosms/index.md)

[Customer messaging](https://krokul.com/en/integrations/category/messaging/index.md)

Viber is a trademark of Viber Media S.à r.l. Krokul is not affiliated with Viber.

Updated: 2026-10-15

---

App: https://app.krokul.com/ · API: https://app.krokul.com/api/v1/docs
