{
  "_what": "Rules for transform.py. One file = one bulk edit. Copy it, rename it after the job (orders-to-delivering.json), keep it next to the export so next month you can rerun it. version 1.0, 2026-09-17, MIT.",
  "key": "order_number",
  "required_columns": ["order_number", "status", "company"],
  "changes": [
    {
      "_why": "Mass status change: every READY_TO_SHIP order with today's delivery date becomes DELIVERING. 'where' is AND across columns; values must match exactly, including case.",
      "column": "status",
      "where": { "status": ["READY_TO_SHIP"], "delivery_date": ["2026-09-17"] },
      "set": "DELIVERING",
      "allowed_values": ["PENDING", "PROCESSING", "READY_TO_SHIP", "DELIVERING", "DELIVERED", "COMPLETED", "CANCELED"]
    }
  ],
  "_other_examples": {
    "bulk_cost_type_edit": {
      "key": "sku",
      "changes": [
        {
          "column": "cost_type",
          "map": { "Misc": "Packaging", "misc": "Packaging", "Labour": "Labor" },
          "keep_unmapped": true
        }
      ]
    },
    "image_url_mapping": {
      "key": "sku",
      "changes": [
        {
          "column": "image_url",
          "map": { "": "https://cdn.example.com/products/default.png" },
          "keep_unmapped": true
        }
      ]
    }
  }
}
