Skip to content
N1
Integrations · Bitrix24 · trade-in

Buyout and trade-in: the deal finds the car appraisal itself

Client: Automotive marketplace, NDA Category: Integrations Stack: PHP 8.3, Bitrix24 D7, appraisal service REST API (JWT), cron Timeline: rolled out in stages
Problem

The trade-in appraisal result was supposed to arrive in the deal via push from the car appraisal and buyout service, but it almost never did: only 12 deals in the entire history had a link, against ~450 trade-in appraisals a month — push covered 1–2% of cases.

Constraints

The service did not provide a sample response — the format was worked out by reading from the live environment; its phone search is exact string match only, the token lives 9 hours, and some statuses have no final price at all.

What I did
  • A "Buyout" button in the deal: searching appraisals by the client's phones, a list of results, confirmation and linking
  • Writes go through the same service as the incoming push — no second path for updating deal fields
  • Protection against zeroing the price: if the service has no price, the deal field keeps its value; replacing a linked buyout requires confirmation
  • Response parsing is defined by config, not code; the portal obtains and refreshes the token itself
  • Hourly re-sync of linked buyouts for open deals, and 137 checks that run without Bitrix or network
Architecture
Deal card → Phone search → Appraisal service API → Shared write service → Hourly re-sync
Result

A buyout is now linked to the deal at the manager's initiative, not only by push: in testing, phone search found the right appraisal for 10 of 12 deals; the two misses had a different client number on the service side. The button goes live in production in September 2026.

What can be reused
Config-driven parsing of an external API response A single write service for incoming and outgoing directions Hourly cron re-sync