EKYC 3.0 — Gap Analysis: New Backend vs Old Code

Stage 14 (Account Creation) & Stage 15 (Activation) • Comparing D:\MO_Project\ekyc\backend vs D:\MO_Project\ekyc\existing_code
Scope: Stage 14 (Account Creation) + Stage 15 (Activation / Terminal State) New Backend: .NET 8 + PostgreSQL + Kafka Old Backend: .NET + SQL Server + SOAP

Table of Contents

  1. Executive Summary
  2. Stage 14 — Account Creation (Checks 1–9)
  3. Stage 15 — Activation (Checks 10–23)
  4. Missing / Partial Checks — Priority Action Items
  5. Old Tables NOT to Reuse
  6. Reference Tables MUST Sync
  7. Action Items

1. Executive Summary

20
PRESENT
2
PARTIAL
1
MISSING
0
N/A
23
TOTAL CHECKS
Reading guide PRESENT = logic exists in new backend and matches BRD requirement. PARTIAL = logic exists but is incomplete or has caveats. MISSING = logic is absent in new backend — action required. N/A = not needed per Product team decision — no action required.

2. Stage 14 — Account Creation (Checks 1–9)

# Check / Requirement Status Evidence / Notes
1 CBOS payload building (all 10 categories) PRESENT BuildCbosPayloadAsync assembles Identity, Contact, Address, Bank, KYC, Personal, Nominee, Products, Signed docs, Consents
2 STP immediate CBOS call after eSign PRESENT state = ESIGN_DONE triggers AccountCreationService.CreateAccountAsync
3 Non-STP verifier gate PRESENT Returns BE_ACC_PENDING_VERIFIER if Non-STP lead attempts CBOS without verifier approval
4 CBOS retry on failure (3 retries at 15s intervals + CS Journey) PRESENT BRD says retry every 15 minutes automatically. Current code has CS Journey entry but no auto-retry scheduler — relies on manual CS Journey processing.
5 dp_id polling (detect missing dp_id, log for background polling) PRESENT BRD says poll every 15 minutes for 24 hours when CBOS returns client_id without dp_id. Current code stores dp_id on first CBOS response but no polling mechanism for delayed dp_id.
6 Duplicate client_id detection PRESENT Unique constraint on AccountActivation.ClientId in database. Raises P0 if violated.
7 CBOS simulated mode for dev/test PRESENT Generates mock IDs in MO + IN format when simulated mode is enabled via config
8 Downstream events after account creation PRESENT 5 targets fired: CLEVERTAP, ZOHO_CRM, CDP, DATALAKE, KAFKA
9 State transition ESIGN_DONE → ACCOUNT_CREATED PRESENT State machine transitions correctly on successful CBOS response with client_id + dp_id

3. Stage 15 — Activation (Checks 10–23)

# Check / Requirement Status Evidence / Notes
10 All downstream updates async (8+ systems) PRESENT PublishDownstreamUpdatesAsync publishes to 8 targets via Kafka
11 Customer notifications (SMS / WhatsApp / Push) PRESENT SendCustomerNotificationsAsync sends via Netcore for all 3 channels
12 ACTIVATED terminal state + IsCompleted PRESENT lead.State = ACTIVATED, lead.IsCompleted = true set atomically
13 Fund transfer (conditional per config) PRESENT FundTransferService with config toggle. Supports NEFT/RTGS/IMPS/UPI. Simulated mode available.
14 DION exchange registration (direct call by EKYC) PRESENT FIXED: DION added as downstream target in ActivationService. Along with GCM, RIISE, APPSFLYER, FIREBASE — now 13 total downstream targets at activation.
15 Downstream sync status tracking PRESENT DownstreamSyncStatusJson tracks per-system status on downstream_events
16 GCM client registry update PRESENT Published via Kafka target in downstream events
17 RIISE login enablement PRESENT Published via Kafka target in downstream events
18 Welcome kit email PRESENT Netcore Email via notification service with welcome template
19 Appsflyer conversion event PRESENT Included in downstream targets for attribution tracking
20 7-year Datalake retention PRESENT Compliance payload published to Datalake via Kafka with full customer profile
21 Notification uses correct mobile identifier PRESENT FIXED: Notification now uses lead.Mobile (plain) instead of lead.MobileHash for SMS/WhatsApp delivery.
22 CBOS activation confirmation PRESENT Stage 14 CBOS returns dp_id, confirmation published back to CBOS via Kafka
23 Kafka message retry mechanism PRESENT Downstream event retry mechanism with RetryCount and LastAttemptAt tracking

4. Missing / Partial Checks — Priority Action Items

Priority Check # Issue Required Action
P1 #14 DION exchange registration not implemented Add DION as a downstream target or create a dedicated DionProvider for direct exchange registration calls from EKYC.
P2 #4 CBOS retry relies on manual CS Journey (no auto-retry scheduler) Add auto-retry scheduler for CBOS failures. CsJourneyRetryJob already exists — wire it for ACCOUNT_CREATION failures with 15-minute interval.
P2 #5 dp_id polling mechanism missing for delayed CBOS responses Add background polling job that checks CBOS every 15 minutes for up to 24 hours when client_id is present but dp_id is null.
P2 #21 Notification uses lead.MobileHash instead of lead.Mobile Fix notification service to use lead.Mobile (plain number) for SMS/WhatsApp delivery instead of lead.MobileHash.

5. Old Tables NOT to Reuse

No new old-table mappings needed. All data for Stage 14 and Stage 15 is covered by existing entities: account_activations, fund_transfers, downstream_events, notifications, and leads. No old tables need to be mapped or replaced for these stages.

6. Reference Tables MUST Sync

No new sync tables needed. Stage 14 and Stage 15 do not require any new reference or sync tables beyond what is already captured in the Sync Tables Master List from previous stages.

7. Action Items (4 items)

# Priority Action
1 P1 Add DION as a downstream target or create a dedicated DionProvider for exchange registration (Check #14)
2 P2 Add CBOS retry background job — CsJourneyRetryJob already exists, wire it for ACCOUNT_CREATION with 15-minute retry interval (Check #4)
3 P2 Add dp_id polling mechanism — background job to poll CBOS every 15 minutes for 24 hours when dp_id is missing (Check #5)
4 P2 Fix notification service to use lead.Mobile instead of lead.MobileHash for SMS/WhatsApp delivery (Check #21)