Mobile app applications into Bitrix24 via Kafka, with feedback to the client
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.
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.
- 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
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.