Solutech Engineering

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 --> J

Integration Categories

Scheduled Synchronization (KDL → SAT)

These integration points run on automated schedules to ensure SAT always has the latest data from KDL:

Real-time Processing

These integration points handle immediate data synchronization for time-sensitive operations:

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 AuthenticateSAT service
  • 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

TypeLogSatRequest KeyFrequencyDirection
Customer SynccustomersEvery 5 minKDL → SAT
Product SyncproductsEvery 5 minKDL → SAT
Price List SyncpricelistsTwice dailyKDL → SAT
Invoice SyncinvoicesScheduledKDL → SAT
Stock Transferstock_transfersScheduledKDL → SAT
Stock Returnsstock_returnsScheduledKDL → SAT
Payment SyncpaymentsQueue-basedKDL → SAT
Order ManagementordersReal-timeSAT → KDL
Trip Syncsat.delivery_tripsReal-timeKDL ↔ 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 LogSatRequest table 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.