Manual CTT Link
This page explains focused manual link flow for connecting one CTT to one NTT.
API Endpoints
POST /ticket/ctt/link
Purpose
Manual link creates CTT-to-NTT relationship when operator intentionally pairs ticket with network ticket.
Business meaning
This is not DB-only field update.
Manual link includes:
- existence checks
- duplicate-link prevention
- local save
- TaaS or TMF synchronization
- rollback on external failure
- count refresh and audit logging
Flow summary
| Step | Business meaning |
|---|---|
| receive manual link request | operator-driven link starts |
load CTT by cttId | source ticket must exist |
load NTT by nttId | target network ticket must exist |
| CTT already linked? | duplicate link is blocked |
save local nttId and nttTicketNo | local relationship is created |
| TaaS CTT? | external target is chosen |
| send link to TaaS or TMF | downstream sync happens |
| external sync failed? | local link is rolled back |
refresh NTT cttCount | aggregate relationship count stays correct |
| emit follow-up jobs and TMF update list | downstream async updates run |
| write CTT and NTT audit logs | both modules preserve trace |
| return linked response | caller gets success |
Implementation note
Current repo confirms:
- controller exposes
POST /ticket/ctt/link - service delegates to
linkCttNttWithAudit(...) - sync target depends on
cttNo.includes('TaaS') - failed external sync clears local link
Code refs:
mvp3-ticket-service/src/modules/ctt/ctt.controller.ts:284mvp3-ticket-service/src/modules/ctt/ctt.service.ts:2253mvp3-ticket-service/src/modules/ctt/ctt.service.ts:2397