Event Layer
Semantic customer memory service for flower and balloon delivery: clients, recipients, occasions, AI extraction, review queue, and future reminders.
Health
Quick service readiness check.
GET /health
Dashboard
Operational overview for reviews, triggers, and events.
GET /dashboard/overview
Readiness
Shows what is ready before connecting real Bitrix24 credentials.
GET /readiness/pre-bitrix
Source Ingestion
Accepts raw Bitrix24, BonusPlus, or manual source records.
POST /ingestion/source-records
Bitrix Deal
Upserts client, order, gifts, communications, and raw payload.
POST /ingestion/bitrix/deal
AI Extraction
Extracts recipient, occasion, next date, and recommendation.
POST /ai/orders/:orderId/extract
Pipeline
Runs extraction, triggers, and Bitrix sync payload generation.
POST /pipeline/orders/:orderId/process
Ingest + Process
Imports a Bitrix-like deal and runs the full local workflow.
POST /pipeline/bitrix/deal/process
Order Detail
Shows order context, extraction, events, triggers, and sync preview.
GET /orders/:orderId
Client Profile
Returns the semantic lifetime profile for one customer.
GET /clients/:clientId/profile
Client Search
Finds clients by name, phone, Bitrix id, email, or recipient.
GET /clients/search?q=Anna
Events
Lists customer occasions by date, type, client, or recipient.
GET /events?from=2027-01-01
Triggers
Creates reminder triggers from confirmed customer events.
POST /triggers/clients/:clientId/generate
Trigger Queue
Lists due reminders and marks delivery outcomes.
GET /triggers/due
Trigger Dispatch
Builds Bitrix manager task payloads from scheduled reminders.
POST /triggers/:triggerId/dispatch
Manager Review
Lists and resolves low-confidence AI extraction results.
GET /manager-reviews/pending
Bitrix Sync
Builds or pushes key Event Layer fields back to Bitrix24.
GET /bitrix-sync/orders/:orderId/payload
BonusPlus
Stores bonus balances while BonusPlus remains the bonus source.
POST /bonusplus/accounts
Database
Prisma schema is ready for PostgreSQL migrations.
prisma/schema.prisma