SAT-KDL Integration
Comprehensive documentation for the SAT-KDL integration system covering all data synchronization points
SAT-KDL Integration Documentation
This comprehensive documentation covers all integration points between the SAT platform and KDL system. The integration ensures seamless data flow, maintains data integrity, and supports critical business operations.
Overview
The SAT-KDL integration consists of multiple synchronized data flows designed to keep both systems consistent and up-to-date. All integration points use a centralized logging system through the LogSatRequest model for comprehensive audit trails and troubleshooting capabilities.
Integration Architecture
graph TB
SAT[SAT System]
KDL[KDL System]
subgraph "Scheduled Sync (KDL → SAT)"
A[Customer Data]
B[Product Data]
C[Price Lists]
D[Invoices]
E[Stock Transfers]
end
subgraph "Real-time Sync"
F[Payments]
G[Orders]
H[Trips]
end
subgraph "Logging & Monitoring"
I[LogSatRequest Model]
J[Laravel Logs]
end
KDL --> A --> SAT
KDL --> B --> SAT
KDL --> C --> SAT
KDL --> D --> SAT
KDL --> E --> SAT
KDL --> F --> SAT
SAT --> G --> KDL
KDL --> H---> SAT
A --> I
B --> I
C --> I
D --> I
E --> I
F --> I
G --> I
H --> I
I --> JIntegration Categories
Scheduled Synchronization (KDL → SAT)
These integration points run on automated schedules to ensure SAT always has the latest data from KDL:
- Customer Data Sync - Every 5 minutes
- Product Data Sync - Every 5 minutes
- Price List Sync - Twice daily (11:00, 16:00)
- Invoice Sync - Scheduled intervals
- Stock Transfer & Returns - Scheduled intervals
Real-time Processing
These integration points handle immediate data synchronization for time-sensitive operations:
- Payment Processing - Queue-based processing
- Order Management - User-region scoped
- Trip Management - Bi-directional sync
Common Features
Global Logging System
All SAT-KDL integration points utilize the LogSatRequest model (app/Models/LogSatRequest.php) for comprehensive logging:
- Operation Tracking: Each sync operation is logged with type, payload, and response
- Error Handling: Failed operations include detailed error messages
- Audit Trail: Complete history of all integration activities
- Performance Monitoring: Response times and success rates tracking
Authentication & Security
- API Authentication: Centralized authentication using
AuthenticateSATservice - Access Control: Role-based and region-based access restrictions
- Secure Communication: HTTPS-only API communications
- Data Validation: Comprehensive validation before processing
Quick Reference
Integration Point Types by Key
| Type | LogSatRequest Key | Frequency | Direction |
|---|---|---|---|
| Customer Sync | customers | Every 5 min | KDL → SAT |
| Product Sync | products | Every 5 min | KDL → SAT |
| Price List Sync | pricelists | Twice daily | KDL → SAT |
| Invoice Sync | invoices | Scheduled | KDL → SAT |
| Stock Transfer | stock_transfers | Scheduled | KDL → SAT |
| Stock Returns | stock_returns | Scheduled | KDL → SAT |
| Payment Sync | payments | Queue-based | KDL → SAT |
| Order Management | orders | Real-time | SAT → KDL |
| Trip Sync | sat.delivery_trips | Real-time | KDL ↔ SAT |
Common Database Tables
- Core Integration:
LogSatRequest,settings - Customer Data:
ArCustomer,SalBranch,InvPrice - Product Data:
InvMaster,InvPrice - Order Processing:
temp_sales_headers,SalesHeader,SalesImport - Stocks:
TransferHeader,TransferLines,ReturnHeader,ReturnLines
Support & Troubleshooting
Common Issues
- Sync Failures: Check
LogSatRequesttable for error details - Authentication Errors: Create a new token using `php artisan passport:client'.
- Data Validation: Review source data for completeness and format
For detailed information about each integration point, navigate to the specific documentation pages using the menu.