Orders and product master report guide
Create a monthly product report from order CSV: master join, unmatched rows, and totals
Use product IDs to add names, keep matched and unmatched rows separate, and verify that the original total reconciles to the report plus the held amount.
Separate order and master roles
Orders contain order ID, product ID, quantity, and original line amount. The master contains product ID and name. Use the master to add names, not to overwrite historical order amounts with current prices.
| Input | Key | Use |
|---|
| Orders | order_id / sku | qty / line_total |
| Product master | sku | name |
Join by product ID
Keep string 001 distinct from numeric-looking 1. If the right key is duplicated, stop for review rather than selecting the first name. A left order must not become multiple rows.
Hold one unmatched order
SKU 999 has no product name. Keep O4, amount 50, and the reason in a separate unmatched table. State that it is excluded from the product report. Do not delete the order or invent a name.
| Orders | SKU | Amount | Result |
|---|
| O1–O3 | 001 / 002 | 700 | reported |
| O4 | 999 | 50 | unmatched / held |
Aggregate quantity and original amount
Apples have quantity 5 and amount 500. Pears have quantity 1 and amount 200. These are synthetic ledger values, not a tax, return, or discount calculation. The report total is 700.
| SKU | Name | Quantity | Original amount |
|---|
| 001 | りんご | 5 | 500 |
| 002 | なし | 1 | 200 |
| Report total | 700 |
Reconcile 750 = 700 + 50
The input total is 750, the product report is 700, and the unmatched amount is 50. Confirm 750=700+50 before saving. This example does not prove tax, accounting, returns, or complete order coverage.
Carry the rules into next month
Save the key, selected columns, aggregation conditions, and unmatched policy. On rerun, check the master revision and unmatched list. Do not fill from last month’s values.