Песочница: TESSACORPORATION

Intent ID: 17

Назад
1) Загрузить файл и получить сырой OCR JSON
Сохраняем последний файл и сырой OCR, чтобы можно было повторно тестировать маппинг без перезагрузки.
Скачать последний файл (90717835.pdf)
2) Правила трансформации
Правила трансформации OCR-данных в целевую схему (включая валидацию).
Промпт LLM-подсказки
Используется кнопкой «Подсказать rules».
Сырой OCR JSON (Pass 1)
{
  "awb": "145-9981 7594",
  "items": [
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY APRICOT JEWEL",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 15.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY BE LOYAL",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY BE STRONG",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY BS BONBON",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY CRETA",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FIBONACCI AUREUS",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FIRE UP",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY FLOREANA",
      "category": "Flowers",
      "quantity": 30,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 15.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY GREEN ROSEVER",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY MORNING STAR",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY NEW MOON",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY POLAR SENSATION",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY PORTRAIT",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY SHINING STAR",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY SNOWY JEWEL",
      "category": "Flowers",
      "quantity": 10,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 5.0
    },
    {
      "boxes": 1,
      "length": "60",
      "variety": "SPRAY SWEET DREAMS",
      "category": "Flowers",
      "quantity": 20,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 0.5,
      "box_marking": "HB XL 2",
      "total_price": 10.0
    },
    {
      "boxes": 1,
      "length": "ALLURE",
      "variety": "",
      "category": "Flowers",
      "quantity": 1,
      "box_number": "1",
      "plantation": "TESSA- R3",
      "unit_price": 10.0,
      "box_marking": "HB XL 2",
      "total_price": 0.5
    }
  ],
  "country": "Kyrgyz Republic (Kyrgyzstan)",
  "summary": {
    "total_boxes": 1,
    "total_stems": 250,
    "total_amount": 125.0
  },
  "supplier": "TOO QAZAQ IMEX /SOCIEDAD DE RESPONSABILIDAD LIMITADA",
  "invoice_date": "",
  "invoice_number": "",
  "processing_report": {
    "notes": "Тип инвойса: А (составные коробки). Обнаружена 1 физическая коробка. Обнаружены проблемы при извлечении данных для одной строки-детали (ALLURE) из-за смещения OCR. Раскрытие мультибокса не применялось, так как это вариант 1 (одна физическая коробка со смешанными сортами).",
    "status": "warning",
    "sum_boxes": 17,
    "sum_stems": 250,
    "sum_amount": 125.5,
    "items_count": 17,
    "discrepancies": [
      "Row 32 (TOTALS) contains summary for Box 1 (250 stems, $125.00), not the overall invoice total (expected 700 stems, $320.00).",
      "Total stems calculation from items (250) matches Box 1 totals, but not the overall expected total (700).",
      "Total amount calculation from items (125.5) does not match Box 1 totals (125.0).",
      "Row 31: Data for this item (ALLURE) appears to be misaligned by OCR, leading to variety='', length='ALLURE', quantity=1, unit_price=10.0, total_price=0.5 based on strict column mapping. This item's total_price (0.5) contributes to the discrepancy in sum_amount.",
      "invoice_number: The rule states to leave it empty, despite 'Invoice Number: 90717835' being present in the table.",
      "invoice_date: The rule states to leave it empty, despite 'Invoice Date: 02/26/2026' being present in the table."
    ],
    "expected_boxes": null,
    "expected_stems": 700,
    "expected_amount": 320.0
  }
}
Результат (Pass 2)

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