Raynet CRM integrácia

Bilateral sync — push leadov + pull dealov. Cron každý deň 04:00, custom fields, status mapping.

5 min čítania

Architektúra

Bilateral sync medzi Raynet a Kovrin Workspace:

  • Outbound (push): form submissions → /api/raynet/sync-lead → Raynet Lead s custom fields
  • Inbound (pull): denný cron /api/cron/raynet-sync → pull updated Leads + Deals → mirror do INLINECODE_2

Env setup

CODEBLOCK_0

Custom fields

Pri Lead create posielame:

  • lead_source — demo_gate / quiz / audit / contact / newsletter
  • demo_segment — gastro / cross-border / vyroba / na-mieru
  • demo_path — full URL kde lead konvertoval
Tieto fields musíš mať pre-konfigurované v Raynet → Settings → Custom fields.

Stage mapping

Raynet stages → Kovrin lifecycle_stage:

  • NEWnew
  • CONTACTEDcontacted
  • QUALIFIEDqualified
  • WONcustomer
  • LOST → INLINECODE_15
Pri Kovrin stage change zatiaľ neposielame back do Raynet (TODO v Phase 9.x).

Health check

INLINECODE_16 → live health panel → "Raynet CRM" tile. Ukazuje:

  • Status (active / pending / inactive)
  • Latency (ms)
  • Total leads count
  • Posledný sync timestamp

Disable

V .env.local odkomentuj RAYNET_* env vars → cron skipne, manual endpoints vrátia 503.

Pripravený vyskúšať Kovrin Workspace?