Skip to content
N1
Integrations · Bitrix24 · voice robot

Auto-dialing "stuck" online applications with a voice robot

Client: Financial company, NDA Category: Integrations Stack: PHP 8, Bitrix24 D7 and REST, CRM stage history, voice robot REST API, webhook, cron, flock Timeline: rolled out in stages
Problem

Clients started an online application and stopped at one of the steps — registration, income, car details, signing. Managers could not call everyone by hand, and sending everyone to the robot indiscriminately would mean repeat calls to the same person and calls to people who had already declined.

Constraints

The robot works in campaigns — one per application step; one client can have several cards; a repeated cron run must not produce a second call, and calls are allowed only in a daytime window.

What I did
  • A cron job every 15 minutes selects deals idle for 30+ minutes using the stock stage history: a stage change resets the timer
  • A pipeline stage map: each application step leads to its own robot campaign; final, rejection and service stages are never sent; calling window 08:00–21:00
  • "One client — one call": cards are grouped by phone, the most recent one goes to dialing, and a negative outcome removes all cards with that number from dialing
  • Three-layer idempotency: flock against parallel runs, order fields on the deal and a stable import_id on the robot side
  • The call-result webhook finds the deal, records the outcome without overwriting fields with empty values and starts a business process; there is a test mode on a separate campaign
  • Selection logic moved into pure functions without the Bitrix core and covered by 66 smoke checks
Architecture
CRM stage history → Cron: selection and dedup → Voice robot API → Result webhook → Deal and business process
Result

Stuck applications go to the robot automatically, without manual calling, and a client never gets two calls for different cards. Every run logs the skip reason for each card.

What can be reused
Selecting "stuck" deals by stage history Three-layer idempotency for sending to an external service Dialing deduplication by phone