Shipping Intelligence Sync & Landed Cost Consolidation

This document describes the background process responsible for extracting and merging shipping costs into the MDL Ops Hub.

🟢 Overview

The Shipping Intelligence Sync is a proactive background process that scans the Logistics/UPS and 01_Sales/Active_Projects Outlook folders. It utilizes Gemini AI to analyze commercial and courier invoices to build a complete picture of total Landed Costs.

🛠️ Technical Process

  1. Trigger: An n8n schedule (or manual trigger) calls the /webhook/sync-shipping endpoint on the intelligent-processor.
  2. Analysis: The shipping_intelligence.py script identifies PDF invoices.
  3. AI Extraction: Gemini AI parses:
  4. First Leg Cost: Shipping from supplier to hub (Commercial Invoices).
  5. Second Leg Cost: Shipping from hub to customer (Courier Invoices).
  6. Customs & Brokerage: Duty and fees (excluding GST/HST).
  7. Parts & SKU Metadata: List of items in the shipment.
  8. Stitching (PO Normalization):
  9. The system automatically "stitches" costs from different invoices (e.g., Sencore + TotalShip) whenever they share a matching Purchase Order (PO) number.
  10. This provides a single row for the project showing the True Total Landed Cost.

📊 Dashboard Access

The final results are displayed in real-time on the Shipping Intelligence Dashboard: 👉 View Dashboard

⚖️ Constitutional Compliance

Every sync, merge, and update is logged to the Automation Backbone (Google Sheets) under the AUDIT_LOG tab to comply with Article III of the MDL Automation Constitution.


Last Updated: 2026-02-23 | MDL Ops Tech Team