Песочница: UTOPIA FARMS UTF S.A.S

Intent ID: 41

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (invoice_162625.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": null,
  "items": [
    {
      "boxes": 0.5,
      "length": "60 CM",
      "variety": "SP. ROSE ASSORTED",
      "category": "SPRAY ROSES",
      "quantity": 200,
      "box_number": "ElC1",
      "plantation": "El Chivan",
      "unit_price": 0.7,
      "box_marking": "TDA",
      "total_price": 140.0
    },
    {
      "boxes": 1.0,
      "length": "60 CM",
      "variety": "SPRAY ROSE G FIBONACCI AUREUS",
      "category": "SPRAY ROSES",
      "quantity": 50,
      "box_number": "ElC2",
      "plantation": "El Chivan",
      "unit_price": 0.7,
      "box_marking": "TDA",
      "total_price": 35.0
    },
    {
      "boxes": 1.0,
      "length": "60 CM",
      "variety": "SPRAY ROSE G FIBONACCI GIOCONDA",
      "category": "SPRAY ROSES",
      "quantity": 40,
      "box_number": "ElC3",
      "plantation": "El Chivan",
      "unit_price": 0.7,
      "box_marking": "TDA",
      "total_price": 28.0
    },
    {
      "boxes": 1.0,
      "length": "60 CM",
      "variety": "SPRAY ROSE G FIBONACCI NAUTILUS",
      "category": "SPRAY ROSES",
      "quantity": 50,
      "box_number": "ElC4",
      "plantation": "El Chivan",
      "unit_price": 0.7,
      "box_marking": "TDA",
      "total_price": 35.0
    },
    {
      "boxes": 1.0,
      "length": "60 CM",
      "variety": "SPRAY ROSE G FIBONACCI YANTRA",
      "category": "SPRAY ROSES",
      "quantity": 60,
      "box_number": "ElC5",
      "plantation": "El Chivan",
      "unit_price": 0.7,
      "box_marking": "TDA",
      "total_price": 42.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE ASSORTED",
      "category": "ROSES",
      "quantity": 700,
      "box_number": "Flo1",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 196.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE ABSOLUT IN PINK",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo2",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE EXPLORER",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo3",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE FREEDOM",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo4",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE FULL MONTY",
      "category": "ROSES",
      "quantity": 100,
      "box_number": "Flo5",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 28.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE HIGH & MAGIC",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo6",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE JESSIKA",
      "category": "ROSES",
      "quantity": 100,
      "box_number": "Flo7",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 28.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE MONDIAL",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo8",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE PINK MONDIAL",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo9",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE REDIANT",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo10",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE SWEET MEMORY",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo11",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE V.I.PINK",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo12",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": null,
      "variety": "ROSE(G) COUNTRY SECRET",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo13",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE ASSORTED",
      "category": "ROSES",
      "quantity": 700,
      "box_number": "Flo14",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 196.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE ABSOLUT IN PINK",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo15",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE EXPLORER",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo16",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE FREEDOM",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo17",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE FULL MONTY",
      "category": "ROSES",
      "quantity": 100,
      "box_number": "Flo18",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 28.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE HIGH & MAGIC",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo19",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE JESSIKA",
      "category": "ROSES",
      "quantity": 100,
      "box_number": "Flo20",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 28.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE MONDIAL",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo21",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE PINK MONDIAL",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo22",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE REDIANT",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo23",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE SWEET MEMORY",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo24",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": "50 CM",
      "variety": "ROSE V.I.PINK",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo25",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 1.0,
      "length": null,
      "variety": "ROSE(G) COUNTRY SECRET",
      "category": "ROSES",
      "quantity": 50,
      "box_number": "Flo26",
      "plantation": "Flor y Campo",
      "unit_price": 0.28,
      "box_marking": null,
      "total_price": 14.0
    },
    {
      "boxes": 0.5,
      "length": "60 CM",
      "variety": "ROSE PINK FLOYD",
      "category": "ROSES",
      "quantity": 400,
      "box_number": "Flo27",
      "plantation": "Flor y Campo",
      "unit_price": 0.36,
      "box_marking": null,
      "total_price": 144.0
    },
    {
      "boxes": 1.0,
      "length": "60 CM",
      "variety": "ROSE PINK FLOYD",
      "category": "ROSES",
      "quantity": 400,
      "box_number": "Flo28",
      "plantation": "Flor y Campo",
      "unit_price": 0.36,
      "box_marking": null,
      "total_price": 144.0
    },
    {
      "boxes": 0.5,
      "length": "40 CM",
      "variety": "ROSE ASSORTED",
      "category": "ROSES",
      "quantity": 500,
      "box_number": "Flo29",
      "plantation": "Flor y Campo",
      "unit_price": 0.22,
      "box_marking": null,
      "total_price": 110.0
    },
    {
      "boxes": 1.0,
      "length": "40 CM",
      "variety": "ROSE ABSOLUT IN PINK",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "Flo30",
      "plantation": "Flor y Campo",
      "unit_price": 0.22,
      "box_marking": null,
      "total_price": 5.5
    },
    {
      "boxes": 1.0,
      "length": "40 CM",
      "variety": "ROSE FORTUNE",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "Flo31",
      "plantation": "Flor y Campo",
      "unit_price": 0.22,
      "box_marking": null,
      "total_price": 5.5
    },
    {
      "boxes": 1.0,
      "length": "40 CM",
      "variety": "ROSE FREEDOM",
      "category": "ROSES",
      "quantity": 25,
      "box_number": "Flo32",
      "plantation": "Flor y Campo",
      "unit_price": 0.22,
      "box_marking": null,
      "total_price": 5.5
    }
  ],
  "country": "Ecuador",
  "summary": {
    "total_boxes": 29.0,
    "total_stems": 5670,
    "total_amount": 1876.6
  },
  "supplier": "UTOPIA FARMS UTF S.A.S",
  "invoice_date": "3/6/2026",
  "invoice_number": "162625",
  "processing_report": {
    "notes": "Invoice type: Grouped. Found 32 physical boxes/items. Box count discrepancy detected. Multi-box expansion was not applied as per rules, each detail line parsed as an item. It seems 'boxes' for detail lines should default to 0 for sum total if they are sub-items of a master box.",
    "status": "ok",
    "sum_boxes": 29.0,
    "sum_stems": 5670,
    "sum_amount": 1876.6,
    "items_count": 32,
    "discrepancies": [
      "Total calculated boxes (29.0) does not match expected_boxes (7.375)."
    ],
    "expected_boxes": 7.375,
    "expected_stems": 5670,
    "expected_amount": 1876.6
  }
}
Результат (Pass 2)

  
История (последние 20)
ID Файл Дата