Shopify Orders CSV places order-level totals (Subtotal, Shipping, Taxes, Total, Financial Status) on the first line-item row of each order Name (e.g. #1001) and leaves them blank on subsequent line items. Migrate-Anything groups orders deterministically and reconciles totals in exact Decimal minor units.
| Shopify Order Quirk | Accounting Failure | Migrate-Anything Fix |
|---|---|---|
| Multi-row line items | Either subsequent line items drop blank Financial Status or naive fills double-count Total. |
Groups rows by order Name, extracts header totals once, and aggregates child items into line_items[]. |
| 1-cent tax rounding deltas | Per-line tax rounding vs order-level tax totals can differ by $0.01, causing strict Medusa/ERP rejections. |
Validates Total == Subtotal + Shipping + Taxes - Discount Amount in Decimal cents and emits rounding_reconciliation_delta when a 1-cent difference appears. |
curl -sS -X POST https://migrate.fastmesh.dev/v1/dry-run \
-H "Content-Type: application/json" \
-d '{
"source_format": "shopify",
"target_format": "postgres_ddl",
"table_name": "shopify_orders",
"source_data": "Name,Financial Status,Subtotal,Shipping,Taxes,Discount Amount,Total,Lineitem quantity,Lineitem name,Lineitem price,Lineitem sku\n#1001,paid,100.00,10.00,8.80,0.00,118.80,1,Shell Jacket,70.00,SJ-M\n#1001,,,,,,,1,Trail Cap,30.00,TC-1"
}'