System design · Service boundaries · Data flow · API contracts · Queue topology · DB schema outline · Deployment topology
message.status callbackcommunication_log tableLEAD ENDPOINTS
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/leads | Create lead (internal) |
| POST | /api/v1/leads/ingest | Webhook ingest (public, signed) |
| GET | /api/v1/leads | List leads (paginated, filtered) |
| GET | /api/v1/leads/:id | Lead detail + timeline |
| PATCH | /api/v1/leads/:id | Update status / owner / fields |
| POST | /api/v1/leads/:id/convert | Convert lead to deal |
| POST | /api/v1/leads/bulk-import | CSV / B2B DB import |
CAMPAIGN ENDPOINTS
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/sequences | Create drip sequence |
| POST | /api/v1/sequences/:id/enrol | Manually enrol lead |
| PATCH | /api/v1/sequences/:id/steps | Update step order / config |
| GET | /api/v1/sequences/:id/stats | Open/click/convert stats |
| POST | /api/v1/webhooks/delivery | BSP delivery status callback |
| POST | /api/v1/webhooks/email-event | SendGrid event webhook |
DEAL / BILLING ENDPOINTS
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/deals | Create deal |
| PATCH | /api/v1/deals/:id/stage | Move pipeline stage |
| POST | /api/v1/deals/:id/quotation | Generate quotation PDF |
| POST | /api/v1/deals/:id/invoice | Generate GST invoice |
| POST | /api/v1/deals/:id/payment-link | Create Razorpay/PayU link |
| POST | /api/v1/webhooks/payment | Payment gateway callback |
INTEGRATION / REPORT ENDPOINTS
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/integrations/sources | Register new source |
| GET | /api/v1/integrations/sources/:id/test | Test connection |
| GET | /api/v1/reports/lead-intake | Report module 1 |
| GET | /api/v1/reports/agent-productivity | Report module 10 |
| GET | /api/v1/reports/drip-performance | Report module 4 |
| GET | /api/v1/reports/custom | Custom report builder |
| Queue Name | Producer | Consumer (Worker) | Job Types | Concurrency |
|---|---|---|---|---|
lead.ingest | integration-service | ingest-worker | deduplicate, enrich, score, assign, write | 20 |
drip.step | campaign-service | drip-worker | execute step, evaluate condition, schedule next | 50 |
communication.send | drip-worker | fallback-worker | WA send → SMS → RCS → Email → agent task | 30 |
delivery.status | BSP webhooks | delivery-worker | update comm_log, trigger next step if needed | 40 |
notification.push | any service | notification-worker | email alert, SMS alert, in-app push, WebSocket | 25 |
report.compute | scheduler (cron) | report-worker | aggregate metrics, update dashboards | 5 |
chat.sync | integration-service | chat-sync-worker | pull IndiaMART/TradeIndia messages, upsert timeline | 10 |
social.trigger | social listener | social-worker | comment→DM trigger, enrol in sequence | 15 |
org:{orgId} + user:{userId}lead.new — new lead arriveslead.assigned — assigned to medeal.stage_changedmessage.deliveredpayment.receivedtask.createdorg_idDot Domino CRM — Developer Architecture Document · Generated from product blueprint