CRM Assistant Bot Development for Bitrix24
Sales managers spend up to 30% of their working time not on selling but on CRM routine: filling in cards, creating tasks after calls, and finding relevant client information before negotiations. A CRM assistant bot takes this routine off their hands — it works inside CRM cards, reacts to deal and contact events, and suggests the next step to managers.
Where the CRM Bot Lives
Unlike a client-facing chatbot, a CRM bot operates in two places simultaneously:
-
Bitrix24 Internal Chat — commands and notifications via the
immodule. -
Widget embedded in the CRM card — via the CRM Elements mechanism (an application of type
CRM_DETAIL_ACTIVITY), displayed directly inside the deal or contact card.
The second option is more powerful: the manager never leaves the card; the bot displays data and accepts commands right there. It is implemented as a Bitrix24 REST application placed in CRM_DETAIL_ACTIVITY or CRM_SIDEBAR.
Typical CRM Bot Functions
Auto-filling the card. After a call, transcription returns text → the bot parses the text and extracts: the client's name, phone number, nature of the request, and next step → writes them to deal fields via crm.deal.update. Uses NLP or simple regular expressions for structured formats.
Next action. Based on the current deal stage and activity history, the bot recommends the next step: "Last contact was 5 days ago, the client is at the Proposal stage — time to call." Implemented as a chat notification via imbot.message.add + a "Create task" button.
Data enrichment. By company TIN or domain, the bot queries external services (SPARK, DaData, Clearbit) → adds to the company card: industry, revenue, headcount, director. Data is written to custom fields UF_CRM_* via crm.company.update.
History summarization. A manager opens the card of a client who is new to them → the bot reads all activities via crm.activity.list + chat history → generates a brief summary via the OpenAI API: "Client contacted us 3 times, was interested in product X, last time requested a 15% discount."
Integrating with CRM Events
The CRM bot subscribes to events via event.bind or processes webhooks:
crm.deal.onUpdate — deal changed (stage change, responsible changed)
crm.deal.onAdd — new deal
crm.activity.onAdd — new activity (call, email, meeting)
crm.lead.onAdd — new lead
Example logic for a stage change:
def on_deal_update(event_data):
deal_id = event_data['data']['FIELDS']['ID']
deal = bitrix.call('crm.deal.get', {'id': deal_id})
if deal['STAGE_ID'] == 'C2:PREPARATION': # "Proposal Preparation" stage
# Create a task to prepare the proposal
bitrix.call('tasks.task.add', {
'fields': {
'TITLE': f'Prepare proposal for {deal["COMPANY_TITLE"]}',
'RESPONSIBLE_ID': deal['ASSIGNED_BY_ID'],
'DEADLINE': '+3 days',
'UF_CRM_TASK': [f'D_{deal_id}']
}
})
Case: Assistant Bot for B2B Sales
Context: manufacturing company, 8 managers, average deal cycle of 45 days, many approval stages. Problem: managers forget to update CRM and lose track of negotiations after returning from vacation.
What was done:
The bot subscribed to crm.deal.onUpdate and crm.activity.onAdd events. With each deal change, it updates the internal dialog state (stored in Redis: key = deal_{ID}, value = JSON with interaction history).
"Briefing" before a call. The manager clicks "Call" in the card → 30 seconds before the connection, the bot sends a message to chat: the last 3 activities, current agreements, open questions from the client, deal dynamics over the past 2 weeks.
Auto meeting notes. After a meeting, the manager sends the bot brief bullet points → the bot formats them into meeting minutes and attaches them to the deal as a comment + creates tasks for each "next step" item.
Loss trigger. If there are no activities in a deal for 7 days — the bot messages the manager: "Deal with company X has not been updated in 7 days, risk of loss." Buttons: "Call," "Write," "Move to archive."
Result: card completeness grew from 40% to 85% in the first month. The number of "forgotten" deals decreased by 4x.
Technology Stack and Effort
The bot is implemented as a separate microservice (Python/Node.js) with a persistent connection to Bitrix24 via webhooks + REST API. For storing dialog state — Redis or PostgreSQL.
| Component | Effort |
|---|---|
| CRM event subscriptions and basic logic | 16–24 h |
| NLP/OpenAI integration for summarization | 16–32 h |
| Widget inside the CRM card | 16–24 h |
| Data enrichment from external APIs | 8–16 h |
| Dialog state storage, Redis | 8–16 h |
| Deployment and monitoring | 8–16 h |







