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
- Trigger: An n8n schedule (or manual trigger) calls the
/webhook/sync-shippingendpoint on theintelligent-processor. - Analysis: The
shipping_intelligence.pyscript identifies PDF invoices. - AI Extraction: Gemini AI parses:
- First Leg Cost: Shipping from supplier to hub (Commercial Invoices).
- Second Leg Cost: Shipping from hub to customer (Courier Invoices).
- Customs & Brokerage: Duty and fees (excluding GST/HST).
- Parts & SKU Metadata: List of items in the shipment.
- Stitching (PO Normalization):
- The system automatically "stitches" costs from different invoices (e.g., Sencore + TotalShip) whenever they share a matching Purchase Order (PO) number.
- 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