// EXECUTION_PIPELINE
Implementation Pipeline
Our engine handles the complexity of data movement while you focus on high-level decision logic.
PHASE_1 // Dynamic Run-Rate Calculation
Arcli ingests daily order volume and adjusts sales velocity based on recent micro-trends, ignoring stockout days.
PHASE_2 // Lead-Time Modeling
Input supplier lead times and safety buffer days at the SKU or vendor level.
PHASE_3 // Automated PO Triggers
Calculates the exact date to place a Purchase Order so inventory arrives precisely as current stock depletes.
PHASE_4 // Opportunity Cost Analysis
Visualizes exact Gross Profit bleeding per day on out-of-stock SKUs to justify expedited air freight.
// STRATEGIC_SCENARIO
Deep Data Retrieval
How Arcli grounds AI in your exact schema to generate highly-optimized, dialect-specific execution logic.
The Engine Room: Out-Of-Stock Excluded Velocity
How Arcli calculates true daily sales velocity by filtering out days where inventory was zero.
THE EXECUTIVE FILTER (ROI)
Ensures purchase orders are based on actual customer demand, preventing costly under-ordering caused by skewed data.
- Fully optimized for DuckDB SQL (Embedded Execution) constraints.
- Bypasses semantic layer hallucinations via strict schema grounding.
DuckDB SQL (Embedded Execution)_COMPILE
-- Generated by Arcli AI Semantic Router
WITH daily_sales AS (
SELECT
sku,
DATE_TRUNC('day', created_at) AS sale_date,
SUM(quantity) as units_sold
FROM tenant_workspace.shopify.order_lines
GROUP BY 1, 2
),
daily_inventory AS (
SELECT
sku,
date,
ending_inventory
FROM tenant_workspace.shopify.inventory_snapshots
WHERE ending_inventory > 0 -- The Arcli Secret: Exclude stockout days
),
true_velocity AS (
SELECT
s.sku,
AVG(s.units_sold) OVER (
PARTITION BY s.sku
ORDER BY s.sale_date
ROWS BETWEEN 30 PRECEDING AND CURRENT ROW
) AS true_daily_velocity
FROM daily_sales s
JOIN daily_inventory i ON s.sku = i.sku AND s.sale_date = i.date
)
SELECT
sku,
ROUND(MAX(true_daily_velocity), 2) AS adjusted_velocity_per_day
FROM true_velocity
GROUP BY 1
ORDER BY adjusted_velocity_per_day DESC;