Skip to content
N1
Integrations · Kafka · mobile app

Mobile app applications into Bitrix24 via Kafka, with feedback to the client

Client: Financial company, NDA Category: Integrations Stack: PHP 8, Kafka (rdkafka), Bitrix24 REST and D7, supervisor/systemd, Telegram alerts Timeline: rolled out in stages
Problem

Applications for real-estate-backed loans came from a mobile app and had to become CRM deals with documents and collateral data without manual re-entry. In the other direction, the app had to learn about the decision and ask the client to rate the service.

Constraints

The consumer runs continuously and must not crash on a malformed message; phones arrive in different formats; the client's document must not be lost; there are two Kafka clusters, and sending to the wrong one had already returned "success" with an empty topic.

What I did
  • A PHP consumer on rdkafka under supervisor/systemd: an application from the topic becomes a contact and a deal in the micro-business pipeline
  • The contact is found by IIN and phone spelling variants; the ID document is attached to the deal, and the collateral type and KATO address code are mapped
  • Manual reprocessing of missed applications over HTTP and from the CLI, Telegram alerts on failures, masking of personal data and documents in logs
  • Application statuses by deal number are sent back to the mobile app's topic
  • Producer: at the final deal stage, an event goes to Kafka with acks=all and delivery-report confirmation, and the app sends the client a push asking them to rate the service
Architecture
Mobile app → Applications Kafka topic → PHP consumer → Bitrix24: contact and deal → Producer → push to the client
Result

Mobile app applications reach the CRM without manual re-entry — with the document and collateral data — and the client learns the decision and gets a rating request. Event delivery is confirmed by the broker, and a processing failure shows up in Telegram immediately.

What can be reused
Kafka PHP consumer with manual reprocessing Producer with acks=all delivery confirmation Contact search by phone variants