TLX Other Documents (Vendor Estimation Pack)
เอกสารนี้รวมรายละเอียดที่ vendor ต้องใช้เพื่อประเมินราคาและกำหนดขอบเขตการส่งมอบได้แม่นยำขึ้น
1) API Contract Draft (Version 0.1)
1.1 API Principles
- Base path:
/api/v1 - Authentication: Bearer token (OAuth2/OIDC compatible)
- Idempotency: ใช้ header
Idempotency-Keyสำหรับ create/submit endpoints - Traceability: ใช้
X-Trace-Idและmessage_idใน payload - Response envelope มาตรฐาน:
{
"success": true,
"data": {},
"error": null,
"trace_id": "..."
}
1.2 Core Endpoint Groups (Draft)
- Identity / Participant / Partner
POST /participants/registerGET /participants/{participantId}POST /participants/{participantId}/endpointsPOST /participants/{participantId}/public-keysPOST /partner-matching/requestsPOST /partner-matching/requests/{id}/accept-
POST /partner-matching/requests/{id}/reject -
Product Catalog
POST /products/importPOST /productsPUT /products/{id}GET /products-
GET /products/search?q=... -
Transaction Documents
POST /documents/quotationPOST /documents/purchase-orderPOST /documents/order-confirmationPOST /documents/invoicePOST /documents/delivery-notePOST /documents/goods-receiptPOST /documents/billingPOST /documents/payment-confirmationGET /documents/{documentId}-
GET /transactions/{transactionId}/timeline -
Registry / Validation / Routing
GET /registries/documentsPOST /messages/validatePOST /messages/route-
GET /messages/{messageId}/status -
Back-office
POST /admin/kyc/{organizationId}/approvePOST /admin/kyc/{organizationId}/rejectGET /admin/transactionsGET /admin/audit-logsPOST /admin/code-listsPOST /admin/message-schemas
1.3 Example Payload (Submit Document)
{
"message_id": "MSG-20260416-000001",
"sender_id": "PART-SELLER-001",
"receiver_id": "PART-BUYER-001",
"doc_type": "PURCHASE_ORDER",
"timestamp": "2026-04-16T09:45:00Z",
"document": {
"doc_no": "PO-2026-10001",
"reference_doc_no": "QO-2026-9981",
"currency": "THB",
"lines": [
{
"line_no": 1,
"gtin": "8850000000001",
"sku": "SKU-ABC-01",
"qty": 100,
"unit_price": 250
}
]
}
}
1.4 Error Model (Draft)
{
"success": false,
"data": null,
"error": {
"code": "VALIDATION_SEMANTIC_FAILED",
"message": "receiver_id is not authorized for doc_type INVOICE",
"details": [
"receiver_id not found in document registry"
]
},
"trace_id": "TRACE-01J..."
}
Error code categories:
- AUTH_*
- VALIDATION_STRUCTURAL_*
- VALIDATION_SEMANTIC_*
- ROUTING_*
- BUSINESS_RULE_*
- SYSTEM_*
2) Non-Functional Requirements (For Pricing Baseline)
2.1 Security
- TLS 1.2+ for all APIs
- JWE payload support for ERP message exchange
- RBAC for Admin/Support/User
- Audit log for both user and admin activities
- Key rotation support (public key registry)
2.2 Performance
- API p95 latency target (business APIs): <= 1.5s (excluding large file upload)
- Search response target: <= 2s สำหรับ query ปกติ
- รองรับ burst traffic ในช่วงเวลาวางบิล
2.3 Availability & Reliability
- Target uptime: 99.5% (MVP), 99.9% (phase ถัดไป)
- มี retry + dead-letter strategy สำหรับ routing ล้มเหลว
- graceful degradation เมื่อ service บางตัวช้าหรือไม่พร้อม
2.4 Observability
- Structured logs + centralized log management
- Technical metrics (RPS, error rate, queue lag)
- Business metrics (document success/fail by type)
- Alerting และ runbook สำหรับ support
2.5 Data & Compliance
- เก็บ audit ตามนโยบาย retention ที่ตกลง
- Backup รายวัน + restore test เป็นระยะ
- Time synchronization สำหรับ timestamp integrity
3) Integration Scope
3.1 ERP Integration Patterns
- Pattern A: Direct synchronous API call
- Pattern B: Async submission + callback status
- Pattern C: Portal upload/manual operation สำหรับผู้ใช้ไม่มี ERP
3.2 Key Exchange & Encryption
- ผู้เข้าร่วมลงทะเบียน public key ใน Participant Registry
- ผู้ส่งเข้ารหัส payload (JWE) ก่อนส่ง
- ระบบใช้ metadata (
message_id,sender_id,receiver_id,doc_type,timestamp) สำหรับ validation/routing
3.3 Notification Channels
- Minimum: Email
- Optional future: webhook/SMS/LINE integration
- ผู้ใช้งานกำหนด preference ได้
3.4 External Dependencies ที่ต้องตกลงก่อนเริ่ม
- SMTP/Email provider
- Identity provider (ถ้ามี SSO)
- Monitoring/Logging stack
- API security policy (token format, lifetime)
4) Implementation Phases and Milestones
Phase 1: MVP Foundation (ประมาณ 3-4 เดือน)
Scope: - Participant onboarding + KYC/KYB approval - RBAC พื้นฐาน - Product catalog registry + search - Quotation, PO, Order Confirmation - Basic API Gateway + structural validation - Basic dashboard + audit log viewer
Deliverables: - ระบบใช้งานจริงใน UAT - เอกสาร API v1 draft - คู่มือ admin/support เบื้องต้น
Acceptance: - รองรับธุรกรรม core order flow end-to-end - มี trace/audit ที่ตรวจสอบย้อนหลังได้
Phase 2: Logistics and Billing Expansion (ประมาณ 2-3 เดือน)
Scope: - Invoice/Tax Invoice, Delivery Note, Goods Receipt - Billing + Payment Confirmation - Semantic validation rules เพิ่มเติม - Routing callback + failure handling - Support transaction viewer ที่ครบขึ้น
Deliverables: - E2E flow ครบจาก quote ถึง payment confirmation - รายงานสถานะธุรกรรมและ failure reasons
Acceptance: - ตรวจสอบ routing/validation failures ได้จาก back-office - รองรับ claim flow กรณีสินค้าไม่ครบ
Phase 3: Hardening and Scale (ประมาณ 1-2 เดือน)
Scope: - Performance tuning, security hardening, DR drill - Advanced observability and operational runbook - Integration optimization สำหรับหลายองค์กร
Deliverables: - Production readiness checklist - SLA/SLO baseline + operation guide
Acceptance: - ผ่าน non-functional test ตามเกณฑ์ที่ตกลง
5) Commercial Assumptions สำหรับเปรียบเทียบใบเสนอราคา
เพื่อให้เทียบหลาย vendor ได้แฟร์ ควรขอให้ทุกเจ้าระบุเหมือนกัน: - Team composition (PM/BA/SA/BE/FE/QA/DevOps) - Effort by phase (person-month) - รวม/ไม่รวม infrastructure cost - รวม/ไม่รวม support หลัง go-live - จำนวนรอบแก้ไข requirement ที่รวมในสัญญา
6) Suggested Appendices (ถ้าต้องขยายต่อ)
- Glossary คำศัพท์ธุรกรรม/โลจิสติกส์
- RACI ระหว่างหน่วยงานธุรกิจกับทีมไอที
- Open Questions Log สำหรับประชุม vendor รอบถัดไป