Invoice Details
569020
Invoice Information
PurchaseEast End
569020
Jul 04, 2025
Not provided
SUPA VALU, LTD.
Not provided
$93.52
Line Items
| # | Description | Brand | Size | Qty | Unit Price | Total |
|---|---|---|---|---|---|---|
| 1 | STRAWBERRY SLICED 6/6.5# | 1217802 | - | 1.00 | $21.00 | $21.00 |
| 2 | ONION RED MEDIUM | 2806201 | - | 2.00 | $2.07 | $6.84 |
| 3 | TOMATO VINE RIPE 6X6 | 2811401 | - | 2.00 | $2.36 | $2.18 |
| 4 | KALE | 2815201 | - | 1.00 | $2.18 | $3.38 |
| 5 | SPINACH CELLO 12/10Z | 2816201 | - | 1.00 | $3.38 | $19.66 |
| 6 | BEET ROOT CS | 2819201 | - | 10.00 | $1.68 | $2.40 |
| 7 | CARROTS BULK CS | 2823601 | - | 15.00 | $1.26 | $4.52 |
| 8 | CELERY EAST 30CT | 2825401 | - | 1.00 | $2.40 | $3.29 |
| 9 | PEPPER GREEN MED | 2839401 | - | 1.00 | $2.38 | $5.52 |
| 10 | PEPPER RED BELL | 2840601 | - | 2.00 | $3.05 | $4.98 |
| 11 | GINGER ROOT | 2850501 | - | 1.00 | $2.76 | $63.62 |
| 12 | LEMON JUICE | 3404401 | - | 3.00 | $10.16 | $0.00 |
| 13 | KS WATER | 3410580 | - | 0.00 | $1.66 | $0.00 |
| 14 | SUGAR BROWN LIGHT 24/1# | 4026605 | - | 3.00 | $6.54 | $0.00 |
| 15 | VIRGIN OLIVE OIL 25/8.5Z | GY11051 | - | 1.00 | $63.62 | $0.00 |
| 16 | GARLIC EX VIRGIN OIL 12/8 | GY11950 | - | 1.00 | $0.00 | $0.00 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | OKRA CUT | 1210801 | - | 1.00 | $5.27 | $5.27 |
| 3 | SPINACH CHOPPED FROZEN | 1212601 | - | 1.00 | $6.12 | $6.12 |
| 4 | POTATO BAKING 90CT | 2801601 | - | 2.00 | $1.19 | $2.86 |
| 5 | ONION RED MEDIUM | 2806201 | - | 1.00 | $2.07 | $3.11 |
| 6 | BROCCOLI | 2819801 | - | 1.00 | $4.40 | $4.40 |
| 7 | CELERY EAST 30CT | 2825401 | - | 1.00 | $2.31 | $2.31 |
| 8 | GRAIN QUINOA WHITE ORGANI | 4011101 | - | 1.00 | $6.41 | $6.41 |
| 9 | BLACK EYE PEAS | GY24741 | - | 1.00 | $2.03 | $2.03 |
| 10 | CHIC PEAS DRY | GY24781 | - | 0.00 | $2.07 | $0.00 |
| 11 | RICE BROWN LONG GRAIN | GY26121 | - | 1.00 | $4.20 | $4.20 |
| 1 | PLANTATN SWEET SLICED | 1217181 | - | 1.00 | $12.68 | $12.68 |
| 2 | STRAWBERRY SLICED 6/6.5# | 1217801 | - | 1.00 | $21.00 | $21.00 |
| 3 | PITA WHEAT TOUFAYAN | 2225601 | - | 3.00 | $2.95 | $8.85 |
| 4 | APPLE GRANNY SMITH | 2607601 | - | 6.00 | $0.67 | $4.02 |
| 5 | APPLE RED | 2609001 | - | 6.00 | $2.36 | $6.37 |
| 6 | TOMATO VINE RIPE 6X6 | 2811401 | - | 2.00 | $2.68 | $4.56 |
| 7 | BEET ROOT | 2819201 | - | 0.00 | $3.46 | $5.54 |
| 8 | PEPPER GREEN MED | 2839401 | - | 1.00 | $2.82 | $7.33 |
| 9 | GINGER ROOT | 2850601 | - | 2.00 | $2.60 | $0.00 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | PLANTIAN SHEET SLICED | 1217181 | - | 1.00 | $12.68 | $12.68 |
| 3 | THYME FRESH | 2856601 | - | 1.00 | $1.40 | $1.40 |
| 4 | BARILLA MACARONI ELBOW | 4002851 | - | 3.00 | $2.91 | $2.91 |
| 5 | COCONUT MILK 1X13.5Z | 4808471 | - | 3.00 | $3.28 | $9.84 |
| 6 | BLACK EYE PEAS | GY24741 | - | 1.00 | $2.03 | $2.03 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | STRAWBERRY SLICED 6/6.5# | 1217801 | - | 1.00 | $21.00 | $21.00 |
| 3 | PINEAPPLE GOLDEN RIPE | 2624201 | - | 3.00 | $4.60 | $4.60 |
| 4 | BROCCOLI | 2819801 | - | 1.00 | $4.40 | $4.40 |
| 5 | CARROTS BULK | 2823601 | - | 20.00 | $1.31 | $27.25 |
| 6 | PEPPER RED BELL | 2840601 | - | 1.00 | $3.86 | $6.56 |
| 7 | GINGER ROOT | 2850601 | - | 0.00 | $0.00 | $0.00 |
| 1 | POTATO BAKING 90CT | 2801601 | - | 3.00 | $1.19 | $3.93 |
| 2 | ONION RED MEDIUM | 2806201 | - | 2.00 | $2.07 | $3.11 |
| 3 | ONION YELLOW JUMBO | 2807201 | - | 5.00 | $1.28 | $2.82 |
| 4 | CARROTS BULK | 2823601 | - | 5.00 | $1.31 | $6.94 |
| 5 | GARLIC JUMBO | 2830401 | - | 1.00 | $4.07 | $4.88 |
| 6 | PEPPER GREEN MED | 2839401 | - | 1.00 | $4.68 | $6.08 |
| 7 | PEPPER RED BELL | 2840601 | - | 1.00 | $3.86 | $5.02 |
| 8 | SQUASH ZUCCHINI FANCY | 2847001 | - | 1.00 | $2.42 | $3.39 |
| 9 | TOFU (FIRM 2/PC) | 2848701 | - | 1.00 | $4.70 | $4.70 |
| 10 | BARILLA LINGUINI #13 | 3005601 | - | 2.00 | $2.56 | $2.56 |
| 11 | GRAIN QUINOA WHITE ORGANI | 4002801 | - | 1.00 | $6.41 | $6.41 |
| 12 | COCONUT MILK 1X13.5Z | 4011101 | - | 1.00 | $3.28 | $6.56 |
| 13 | ONION POWDER | 5009301 | - | 1.00 | $1.91 | $1.91 |
| 14 | RED KIDNEY BEANS DRY | GY24711 | - | 1.00 | $4.20 | $4.20 |
| 15 | RICE BROWN LONG GRAIN | GY26121 | - | 1.00 | $1.40 | $1.40 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | STRAWBERRY SLICED 6/6.5# | 1217801 | - | 1.00 | $21.00 | $21.00 |
| 3 | EGGPLANT | 2828801 | - | 2.00 | $1.90 | $4.94 |
| 4 | ROSEMARY FRESH | 2855601 | - | 1.00 | $1.62 | $1.62 |
| 5 | LEMON JUICE | 3404401 | - | 1.00 | $4.68 | $4.68 |
| 6 | COCONUT MILK 1X13.5Z | 4808471 | - | 1.00 | $3.28 | $3.28 |
| 7 | BLACK EYE PEAS | GY24741 | - | 0.00 | $2.03 | $0.00 |
| 8 | BLACK BEANS DRY | GY24791 | - | 1.00 | $1.91 | $1.91 |
| 1 | APPLE RED | 2609001 | - | 6.00 | $0.57 | $3.42 |
| 2 | PINEAPPLE GOLDEN RIPE | 2624201 | - | 3.00 | $4.60 | $13.80 |
| 3 | ONION RED MEDIUM | 2806201 | - | 2.00 | $2.07 | $6.00 |
| 4 | KALE | 2815201 | - | 1.00 | $2.18 | $2.18 |
| 5 | SPINACH CELLO | 2816201 | - | 1.00 | $3.38 | $3.38 |
| 6 | BEET ROOT | 2819201 | - | 10.00 | $1.31 | $17.30 |
| 7 | CARROTS BULK | 2823601 | - | 15.00 | $1.68 | $20.83 |
| 8 | PEPPER GREEN MED | 2839401 | - | 1.00 | $4.68 | $7.02 |
| 9 | PEPPER RED BELL | 2840601 | - | 1.00 | $3.86 | $6.95 |
| 10 | KS WATER | 3410580 | - | 1.00 | $10.16 | $10.16 |
| 11 | PORTION CUP 2z TRANSLUCEN | 6807061 | - | 1.00 | $8.56 | $8.56 |
| 12 | OLIVE OIL PURE GOYA 25/8. | GY13411 | - | 0.00 | $8.56 | $0.00 |
| 13 | GARLIC EX VIRGIN OIL 12/8 | GY11950 | - | 1.00 | $6.38 | $63.62 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 2.00 | $19.84 | $39.68 |
| 2 | OKRA CUT | 1210801 | - | 1.00 | $4.78 | $4.78 |
| 3 | POTATO BAKING 50CT | 2801601 | - | 4.00 | $1.19 | $5.36 |
| 4 | ONION YELLOW JUMBO | 2807201 | - | 2.00 | $1.28 | $3.07 |
| 5 | BROCCOLI | 2819801 | - | 1.00 | $4.12 | $4.12 |
| 6 | CABBAGE GREEN | 2821201 | - | 1.00 | $1.16 | $3.94 |
| 7 | CARROTS BULK | 2823601 | - | 5.00 | $1.26 | $6.30 |
| 8 | CELERY EAST 30CT | 2825401 | - | 1.00 | $2.31 | $2.31 |
| 9 | THYME FRESH | 2856601 | - | 1.00 | $1.40 | $1.40 |
| 10 | BARILLA MACARONI ELBOW | 4002851 | - | 1.00 | $2.91 | $2.91 |
| 11 | GRAIN QUINOA WHITE ORGANI | 4011101 | - | 1.00 | $6.41 | $6.41 |
| 12 | CURRY POWDER | 5004811 | - | 1.00 | $9.04 | $9.04 |
| 13 | RICE BROWN LONG GRAIN | G226121 | - | 1.00 | $4.20 | $4.20 |
| Total: | $774.56 | |||||
Original Images
Page 1
13.jpg
153.2 KB
Page 2
14.jpg
140.7 KB
Page 3
15.jpg
142.4 KB
Page 4
16.jpg
135.5 KB
Page 5
17.jpg
138.3 KB
Page 6
18.jpg
170.2 KB
Page 7
19.jpg
138.0 KB
Page 8
20.jpg
153.7 KB
Page 9
21.jpg
148.5 KB
[
{
"text": "{\n \"invoice_number\": \"569020\",\n \"invoice_date\": \"2025-07-04\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217802\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 6.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.36,\n \"extended_price\": 2.18\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"EA\",\n \"description\": \"KALE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.18,\n \"extended_price\": 3.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"EA\",\n \"description\": \"SPINACH CELLO 12\/10Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.38,\n \"extended_price\": 19.66\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT CS\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.68,\n \"extended_price\": 2.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK CS\",\n \"quantity_shipped\": 15,\n \"unit_price\": 1.26,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"CW\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.4,\n \"extended_price\": 3.29\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"CW\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.38,\n \"extended_price\": 5.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.05,\n \"extended_price\": 4.98\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850501\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.76,\n \"extended_price\": 63.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3404401\",\n \"unit\": \"CS\",\n \"description\": \"LEMON JUICE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 10.16,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410580\",\n \"unit\": \"EA\",\n \"description\": \"KS WATER\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.66,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4026605\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN LIGHT 24\/1#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 6.54,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11051\",\n \"unit\": \"EA\",\n \"description\": \"VIRGIN OLIVE OIL 25\/8.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 63.62,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11950\",\n \"unit\": \"CS\",\n \"description\": \"GARLIC EX VIRGIN OIL 12\/8\",\n \"quantity_shipped\": 1,\n \"unit_price\": 0,\n \"extended_price\": 0\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "03b8f10e-ba8e-4ccc-b5ed-bb8791b90ed6",
"chatMessageId": "bbc4803f-1daa-4ad1-afa0-6329f73cd698",
"executionId": "73da2f67-b1b8-43dc-bd63-91443f5bbfe3",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "13.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569020\",\n \"invoice_date\": \"2025-07-04\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217802\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 6.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.36,\n \"extended_price\": 2.18\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"EA\",\n \"description\": \"KALE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.18,\n \"extended_price\": 3.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"EA\",\n \"description\": \"SPINACH CELLO 12\/10Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.38,\n \"extended_price\": 19.66\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT CS\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.68,\n \"extended_price\": 2.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK CS\",\n \"quantity_shipped\": 15,\n \"unit_price\": 1.26,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"CW\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.4,\n \"extended_price\": 3.29\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"CW\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.38,\n \"extended_price\": 5.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.05,\n \"extended_price\": 4.98\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850501\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.76,\n \"extended_price\": 63.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3404401\",\n \"unit\": \"CS\",\n \"description\": \"LEMON JUICE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 10.16,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410580\",\n \"unit\": \"EA\",\n \"description\": \"KS WATER\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.66,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4026605\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN LIGHT 24\/1#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 6.54,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11051\",\n \"unit\": \"EA\",\n \"description\": \"VIRGIN OLIVE OIL 25\/8.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 63.62,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11950\",\n \"unit\": \"CS\",\n \"description\": \"GARLIC EX VIRGIN OIL 12\/8\",\n \"quantity_shipped\": 1,\n \"unit_price\": 0,\n \"extended_price\": 0\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194329591,
"end": 1756194366498,
"delta": 36907
},
"invoice_number": "569020",
"invoice_date": "2025-07-04",
"vendor_name": "SUPA VALU, LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "1217802",
"unit": "EA",
"description": "STRAWBERRY SLICED 6\/6.5#",
"quantity_shipped": 1,
"unit_price": 21,
"extended_price": 21
}
},
{
"type": "object",
"properties": {
"product_code": "2806201",
"unit": "LB",
"description": "ONION RED MEDIUM",
"quantity_shipped": 2,
"unit_price": 2.07,
"extended_price": 6.84
}
},
{
"type": "object",
"properties": {
"product_code": "2811401",
"unit": "LB",
"description": "TOMATO VINE RIPE 6X6",
"quantity_shipped": 2,
"unit_price": 2.36,
"extended_price": 2.18
}
},
{
"type": "object",
"properties": {
"product_code": "2815201",
"unit": "EA",
"description": "KALE",
"quantity_shipped": 1,
"unit_price": 2.18,
"extended_price": 3.38
}
},
{
"type": "object",
"properties": {
"product_code": "2816201",
"unit": "EA",
"description": "SPINACH CELLO 12\/10Z",
"quantity_shipped": 1,
"unit_price": 3.38,
"extended_price": 19.66
}
},
{
"type": "object",
"properties": {
"product_code": "2819201",
"unit": "LB",
"description": "BEET ROOT CS",
"quantity_shipped": 10,
"unit_price": 1.68,
"extended_price": 2.4
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK CS",
"quantity_shipped": 15,
"unit_price": 1.26,
"extended_price": 4.52
}
},
{
"type": "object",
"properties": {
"product_code": "2825401",
"unit": "CW",
"description": "CELERY EAST 30CT",
"quantity_shipped": 1,
"unit_price": 2.4,
"extended_price": 3.29
}
},
{
"type": "object",
"properties": {
"product_code": "2839401",
"unit": "CW",
"description": "PEPPER GREEN MED",
"quantity_shipped": 1,
"unit_price": 2.38,
"extended_price": 5.52
}
},
{
"type": "object",
"properties": {
"product_code": "2840601",
"unit": "PD",
"description": "PEPPER RED BELL",
"quantity_shipped": 2,
"unit_price": 3.05,
"extended_price": 4.98
}
},
{
"type": "object",
"properties": {
"product_code": "2850501",
"unit": "#",
"description": "GINGER ROOT",
"quantity_shipped": 1,
"unit_price": 2.76,
"extended_price": 63.62
}
},
{
"type": "object",
"properties": {
"product_code": "3404401",
"unit": "CS",
"description": "LEMON JUICE",
"quantity_shipped": 3,
"unit_price": 10.16,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "3410580",
"unit": "EA",
"description": "KS WATER",
"quantity_shipped": 0,
"unit_price": 1.66,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "4026605",
"unit": "EA",
"description": "SUGAR BROWN LIGHT 24\/1#",
"quantity_shipped": 3,
"unit_price": 6.54,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "GY11051",
"unit": "EA",
"description": "VIRGIN OLIVE OIL 25\/8.5Z",
"quantity_shipped": 1,
"unit_price": 63.62,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "GY11950",
"unit": "CS",
"description": "GARLIC EX VIRGIN OIL 12\/8",
"quantity_shipped": 1,
"unit_price": 0,
"extended_price": 0
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "13.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569020\",\n \"invoice_date\": \"2025-07-04\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217802\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 6.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.36,\n \"extended_price\": 2.18\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"EA\",\n \"description\": \"KALE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.18,\n \"extended_price\": 3.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"EA\",\n \"description\": \"SPINACH CELLO 12\/10Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.38,\n \"extended_price\": 19.66\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT CS\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.68,\n \"extended_price\": 2.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK CS\",\n \"quantity_shipped\": 15,\n \"unit_price\": 1.26,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"CW\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.4,\n \"extended_price\": 3.29\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"CW\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.38,\n \"extended_price\": 5.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.05,\n \"extended_price\": 4.98\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850501\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.76,\n \"extended_price\": 63.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3404401\",\n \"unit\": \"CS\",\n \"description\": \"LEMON JUICE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 10.16,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410580\",\n \"unit\": \"EA\",\n \"description\": \"KS WATER\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.66,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4026605\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN LIGHT 24\/1#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 6.54,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11051\",\n \"unit\": \"EA\",\n \"description\": \"VIRGIN OLIVE OIL 25\/8.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 63.62,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11950\",\n \"unit\": \"CS\",\n \"description\": \"GARLIC EX VIRGIN OIL 12\/8\",\n \"quantity_shipped\": 1,\n \"unit_price\": 0,\n \"extended_price\": 0\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "03b8f10e-ba8e-4ccc-b5ed-bb8791b90ed6"
},
{
"text": "{\n \"invoice_number\": \"569671\",\n \"invoice_date\": \"2025-07-16\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1210801\",\n \"unit\": \"EA\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 5.27,\n \"extended_price\": 5.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1212601\",\n \"unit\": \"EA\",\n \"description\": \"SPINACH CHOPPED FROZEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.12,\n \"extended_price\": 6.12\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.19,\n \"extended_price\": 2.86\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.07,\n \"extended_price\": 3.11\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"PK\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"EA\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.07,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY26121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "8f8cc6cd-cb06-4ba0-8b9e-7aabe58a3f23",
"chatMessageId": "f47cff82-38df-4925-918f-7b022e45a8af",
"executionId": "c87de0c8-711d-40a2-82ea-11b88dcc8724",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "14.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569671\",\n \"invoice_date\": \"2025-07-16\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1210801\",\n \"unit\": \"EA\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 5.27,\n \"extended_price\": 5.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1212601\",\n \"unit\": \"EA\",\n \"description\": \"SPINACH CHOPPED FROZEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.12,\n \"extended_price\": 6.12\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.19,\n \"extended_price\": 2.86\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.07,\n \"extended_price\": 3.11\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"PK\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"EA\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.07,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY26121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194369101,
"end": 1756194385910,
"delta": 16809
},
"invoice_number": "569671",
"invoice_date": "2025-07-16",
"vendor_name": "SUPA VALU LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660421",
"unit": "EA",
"description": "WORTHINGTON DINNER ROAST",
"quantity_shipped": 1,
"unit_price": 19.84,
"extended_price": 19.84
}
},
{
"type": "object",
"properties": {
"product_code": "1210801",
"unit": "EA",
"description": "OKRA CUT",
"quantity_shipped": 1,
"unit_price": 5.27,
"extended_price": 5.27
}
},
{
"type": "object",
"properties": {
"product_code": "1212601",
"unit": "EA",
"description": "SPINACH CHOPPED FROZEN",
"quantity_shipped": 1,
"unit_price": 6.12,
"extended_price": 6.12
}
},
{
"type": "object",
"properties": {
"product_code": "2801601",
"unit": "CW",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 2,
"unit_price": 1.19,
"extended_price": 2.86
}
},
{
"type": "object",
"properties": {
"product_code": "2806201",
"unit": "LB",
"description": "ONION RED MEDIUM",
"quantity_shipped": 1,
"unit_price": 2.07,
"extended_price": 3.11
}
},
{
"type": "object",
"properties": {
"product_code": "2819801",
"unit": "EA",
"description": "BROCCOLI",
"quantity_shipped": 1,
"unit_price": 4.4,
"extended_price": 4.4
}
},
{
"type": "object",
"properties": {
"product_code": "2825401",
"unit": "EA",
"description": "CELERY EAST 30CT",
"quantity_shipped": 1,
"unit_price": 2.31,
"extended_price": 2.31
}
},
{
"type": "object",
"properties": {
"product_code": "4011101",
"unit": "PK",
"description": "GRAIN QUINOA WHITE ORGANI",
"quantity_shipped": 1,
"unit_price": 6.41,
"extended_price": 6.41
}
},
{
"type": "object",
"properties": {
"product_code": "GY24741",
"unit": "EA",
"description": "BLACK EYE PEAS",
"quantity_shipped": 1,
"unit_price": 2.03,
"extended_price": 2.03
}
},
{
"type": "object",
"properties": {
"product_code": "GY24781",
"unit": "EA",
"description": "CHIC PEAS DRY",
"quantity_shipped": 0,
"unit_price": 2.07,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "GY26121",
"unit": "EA",
"description": "RICE BROWN LONG GRAIN",
"quantity_shipped": 1,
"unit_price": 4.2,
"extended_price": 4.2
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "14.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569671\",\n \"invoice_date\": \"2025-07-16\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1210801\",\n \"unit\": \"EA\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 5.27,\n \"extended_price\": 5.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1212601\",\n \"unit\": \"EA\",\n \"description\": \"SPINACH CHOPPED FROZEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.12,\n \"extended_price\": 6.12\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.19,\n \"extended_price\": 2.86\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.07,\n \"extended_price\": 3.11\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"PK\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"EA\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.07,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY26121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "8f8cc6cd-cb06-4ba0-8b9e-7aabe58a3f23"
},
{
"text": "{\n \"invoice_number\": \"569695\",\n \"invoice_date\": \"2025-07-17\",\n \"vendor_name\": \"SUPA VALU, LTD.-TORTOLA-\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTATN SWEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 12.68,\n \"extended_price\": 12.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2225601\",\n \"unit\": \"PK\",\n \"description\": \"PITA WHEAT TOUFAYAN\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.95,\n \"extended_price\": 8.85\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2607601\",\n \"unit\": \"EA\",\n \"description\": \"APPLE GRANNY SMITH\",\n \"quantity_shipped\": 6,\n \"unit_price\": 0.67,\n \"extended_price\": 4.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2609001\",\n \"unit\": \"EA\",\n \"description\": \"APPLE RED\",\n \"quantity_shipped\": 6,\n \"unit_price\": 2.36,\n \"extended_price\": 6.37\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.68,\n \"extended_price\": 4.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 3.46,\n \"extended_price\": 5.54\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.82,\n \"extended_price\": 7.33\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.6,\n \"extended_price\": 0\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "4d4d46be-bfb4-405d-acd4-35753d4999f0",
"chatMessageId": "9a234d5f-87ab-416d-a6c8-647ce4379e07",
"executionId": "d24ca56c-bb2b-4698-a01e-3f1f5065266e",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "15.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569695\",\n \"invoice_date\": \"2025-07-17\",\n \"vendor_name\": \"SUPA VALU, LTD.-TORTOLA-\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTATN SWEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 12.68,\n \"extended_price\": 12.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2225601\",\n \"unit\": \"PK\",\n \"description\": \"PITA WHEAT TOUFAYAN\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.95,\n \"extended_price\": 8.85\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2607601\",\n \"unit\": \"EA\",\n \"description\": \"APPLE GRANNY SMITH\",\n \"quantity_shipped\": 6,\n \"unit_price\": 0.67,\n \"extended_price\": 4.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2609001\",\n \"unit\": \"EA\",\n \"description\": \"APPLE RED\",\n \"quantity_shipped\": 6,\n \"unit_price\": 2.36,\n \"extended_price\": 6.37\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.68,\n \"extended_price\": 4.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 3.46,\n \"extended_price\": 5.54\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.82,\n \"extended_price\": 7.33\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.6,\n \"extended_price\": 0\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194387933,
"end": 1756194409508,
"delta": 21575
},
"invoice_number": "569695",
"invoice_date": "2025-07-17",
"vendor_name": "SUPA VALU, LTD.-TORTOLA-",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "1217181",
"unit": "EA",
"description": "PLANTATN SWEET SLICED",
"quantity_shipped": 1,
"unit_price": 12.68,
"extended_price": 12.68
}
},
{
"type": "object",
"properties": {
"product_code": "1217801",
"unit": "EA",
"description": "STRAWBERRY SLICED 6\/6.5#",
"quantity_shipped": 1,
"unit_price": 21,
"extended_price": 21
}
},
{
"type": "object",
"properties": {
"product_code": "2225601",
"unit": "PK",
"description": "PITA WHEAT TOUFAYAN",
"quantity_shipped": 3,
"unit_price": 2.95,
"extended_price": 8.85
}
},
{
"type": "object",
"properties": {
"product_code": "2607601",
"unit": "EA",
"description": "APPLE GRANNY SMITH",
"quantity_shipped": 6,
"unit_price": 0.67,
"extended_price": 4.02
}
},
{
"type": "object",
"properties": {
"product_code": "2609001",
"unit": "EA",
"description": "APPLE RED",
"quantity_shipped": 6,
"unit_price": 2.36,
"extended_price": 6.37
}
},
{
"type": "object",
"properties": {
"product_code": "2811401",
"unit": "LB",
"description": "TOMATO VINE RIPE 6X6",
"quantity_shipped": 2,
"unit_price": 2.68,
"extended_price": 4.56
}
},
{
"type": "object",
"properties": {
"product_code": "2819201",
"unit": "LB",
"description": "BEET ROOT",
"quantity_shipped": 0,
"unit_price": 3.46,
"extended_price": 5.54
}
},
{
"type": "object",
"properties": {
"product_code": "2839401",
"unit": "PD",
"description": "PEPPER GREEN MED",
"quantity_shipped": 1,
"unit_price": 2.82,
"extended_price": 7.33
}
},
{
"type": "object",
"properties": {
"product_code": "2850601",
"unit": "#",
"description": "GINGER ROOT",
"quantity_shipped": 2,
"unit_price": 2.6,
"extended_price": 0
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "15.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569695\",\n \"invoice_date\": \"2025-07-17\",\n \"vendor_name\": \"SUPA VALU, LTD.-TORTOLA-\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTATN SWEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 12.68,\n \"extended_price\": 12.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2225601\",\n \"unit\": \"PK\",\n \"description\": \"PITA WHEAT TOUFAYAN\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.95,\n \"extended_price\": 8.85\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2607601\",\n \"unit\": \"EA\",\n \"description\": \"APPLE GRANNY SMITH\",\n \"quantity_shipped\": 6,\n \"unit_price\": 0.67,\n \"extended_price\": 4.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2609001\",\n \"unit\": \"EA\",\n \"description\": \"APPLE RED\",\n \"quantity_shipped\": 6,\n \"unit_price\": 2.36,\n \"extended_price\": 6.37\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.68,\n \"extended_price\": 4.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 3.46,\n \"extended_price\": 5.54\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.82,\n \"extended_price\": 7.33\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.6,\n \"extended_price\": 0\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "4d4d46be-bfb4-405d-acd4-35753d4999f0"
},
{
"text": "{\n \"invoice_number\": \"569724\",\n \"invoice_date\": \"2025-07-17\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTIAN SHEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 12.68,\n \"extended_price\": 12.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002851\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA MACARONI ELBOW\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.91,\n \"extended_price\": 2.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 3,\n \"unit_price\": 3.28,\n \"extended_price\": 9.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"PK\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "4e7434cb-0d03-4d26-b650-bfa597057534",
"chatMessageId": "85c8eb76-ab90-4b07-8199-4ddb5dda33af",
"executionId": "26ddba45-dbbb-48d4-9303-4a7e0d5c806b",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "16.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569724\",\n \"invoice_date\": \"2025-07-17\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTIAN SHEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 12.68,\n \"extended_price\": 12.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002851\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA MACARONI ELBOW\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.91,\n \"extended_price\": 2.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 3,\n \"unit_price\": 3.28,\n \"extended_price\": 9.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"PK\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194411365,
"end": 1756194424564,
"delta": 13199
},
"invoice_number": "569724",
"invoice_date": "2025-07-17",
"vendor_name": "SUPA VALU LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660421",
"unit": "EA",
"description": "WORTHINGTON DINNER ROAST",
"quantity_shipped": 1,
"unit_price": 19.84,
"extended_price": 19.84
}
},
{
"type": "object",
"properties": {
"product_code": "1217181",
"unit": "EA",
"description": "PLANTIAN SHEET SLICED",
"quantity_shipped": 1,
"unit_price": 12.68,
"extended_price": 12.68
}
},
{
"type": "object",
"properties": {
"product_code": "2856601",
"unit": "EA",
"description": "THYME FRESH",
"quantity_shipped": 1,
"unit_price": 1.4,
"extended_price": 1.4
}
},
{
"type": "object",
"properties": {
"product_code": "4002851",
"unit": "EA",
"description": "BARILLA MACARONI ELBOW",
"quantity_shipped": 3,
"unit_price": 2.91,
"extended_price": 2.91
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 3,
"unit_price": 3.28,
"extended_price": 9.84
}
},
{
"type": "object",
"properties": {
"product_code": "GY24741",
"unit": "PK",
"description": "BLACK EYE PEAS",
"quantity_shipped": 1,
"unit_price": 2.03,
"extended_price": 2.03
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "16.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569724\",\n \"invoice_date\": \"2025-07-17\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTIAN SHEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 12.68,\n \"extended_price\": 12.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002851\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA MACARONI ELBOW\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.91,\n \"extended_price\": 2.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 3,\n \"unit_price\": 3.28,\n \"extended_price\": 9.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"PK\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "4e7434cb-0d03-4d26-b650-bfa597057534"
},
{
"text": "{\n \"invoice_number\": \"570119\",\n \"invoice_date\": \"2025-07-24\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2624201\",\n \"unit\": \"EA\",\n \"description\": \"PINEAPPLE GOLDEN RIPE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 4.6,\n \"extended_price\": 4.6\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 20,\n \"unit_price\": 1.31,\n \"extended_price\": 27.25\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 0,\n \"extended_price\": 0\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "184564e8-c0bd-414c-b490-f0ba393fccd9",
"chatMessageId": "f135d091-a201-4907-b595-d9e3f1b73532",
"executionId": "b3e4f77a-a3af-4fcf-a787-843605898934",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "17.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"570119\",\n \"invoice_date\": \"2025-07-24\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2624201\",\n \"unit\": \"EA\",\n \"description\": \"PINEAPPLE GOLDEN RIPE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 4.6,\n \"extended_price\": 4.6\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 20,\n \"unit_price\": 1.31,\n \"extended_price\": 27.25\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 0,\n \"extended_price\": 0\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194425953,
"end": 1756194456280,
"delta": 30327
},
"invoice_number": "570119",
"invoice_date": "2025-07-24",
"vendor_name": "SUPA VALU, LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660421",
"unit": "EA",
"description": "WORTHINGTON DINNER ROAST",
"quantity_shipped": 1,
"unit_price": 19.84,
"extended_price": 19.84
}
},
{
"type": "object",
"properties": {
"product_code": "1217801",
"unit": "EA",
"description": "STRAWBERRY SLICED 6\/6.5#",
"quantity_shipped": 1,
"unit_price": 21,
"extended_price": 21
}
},
{
"type": "object",
"properties": {
"product_code": "2624201",
"unit": "EA",
"description": "PINEAPPLE GOLDEN RIPE",
"quantity_shipped": 3,
"unit_price": 4.6,
"extended_price": 4.6
}
},
{
"type": "object",
"properties": {
"product_code": "2819801",
"unit": "EA",
"description": "BROCCOLI",
"quantity_shipped": 1,
"unit_price": 4.4,
"extended_price": 4.4
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 20,
"unit_price": 1.31,
"extended_price": 27.25
}
},
{
"type": "object",
"properties": {
"product_code": "2840601",
"unit": "PD",
"description": "PEPPER RED BELL",
"quantity_shipped": 1,
"unit_price": 3.86,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "2850601",
"unit": "#",
"description": "GINGER ROOT",
"quantity_shipped": 0,
"unit_price": 0,
"extended_price": 0
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "17.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"570119\",\n \"invoice_date\": \"2025-07-24\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2624201\",\n \"unit\": \"EA\",\n \"description\": \"PINEAPPLE GOLDEN RIPE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 4.6,\n \"extended_price\": 4.6\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 20,\n \"unit_price\": 1.31,\n \"extended_price\": 27.25\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 0,\n \"extended_price\": 0\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "184564e8-c0bd-414c-b490-f0ba393fccd9"
},
{
"text": "{\n \"invoice_number\": \"569918\",\n \"invoice_date\": \"2025-07-21\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 3.93\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 3.11\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.28,\n \"extended_price\": 2.82\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"LB\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 6.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2830401\",\n \"unit\": \"PD\",\n \"description\": \"GARLIC JUMBO\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.07,\n \"extended_price\": 4.88\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 6.08\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 5.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2847001\",\n \"unit\": \"PD\",\n \"description\": \"SQUASH ZUCCHINI FANCY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.42,\n \"extended_price\": 3.39\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2848701\",\n \"unit\": \"EA\",\n \"description\": \"TOFU (FIRM 2\/PC)\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.7,\n \"extended_price\": 4.7\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3005601\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5009301\",\n \"unit\": \"EA\",\n \"description\": \"ONION POWDER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.91,\n \"extended_price\": 1.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24711\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEANS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY26121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "97d00f35-2b12-42bb-bc78-18e93e7a8b5f",
"chatMessageId": "39aa6754-e03a-486b-bdc4-22ab86c8ef7b",
"executionId": "3bb6d01d-7d44-453b-9553-8e36d2a430f7",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "18.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569918\",\n \"invoice_date\": \"2025-07-21\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 3.93\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 3.11\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.28,\n \"extended_price\": 2.82\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"LB\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 6.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2830401\",\n \"unit\": \"PD\",\n \"description\": \"GARLIC JUMBO\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.07,\n \"extended_price\": 4.88\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 6.08\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 5.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2847001\",\n \"unit\": \"PD\",\n \"description\": \"SQUASH ZUCCHINI FANCY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.42,\n \"extended_price\": 3.39\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2848701\",\n \"unit\": \"EA\",\n \"description\": \"TOFU (FIRM 2\/PC)\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.7,\n \"extended_price\": 4.7\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3005601\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5009301\",\n \"unit\": \"EA\",\n \"description\": \"ONION POWDER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.91,\n \"extended_price\": 1.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24711\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEANS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY26121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194457774,
"end": 1756194488354,
"delta": 30580
},
"invoice_number": "569918",
"invoice_date": "2025-07-21",
"vendor_name": "SUPA VALU LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "2801601",
"unit": "PD",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 3,
"unit_price": 1.19,
"extended_price": 3.93
}
},
{
"type": "object",
"properties": {
"product_code": "2806201",
"unit": "LB",
"description": "ONION RED MEDIUM",
"quantity_shipped": 2,
"unit_price": 2.07,
"extended_price": 3.11
}
},
{
"type": "object",
"properties": {
"product_code": "2807201",
"unit": "LB",
"description": "ONION YELLOW JUMBO",
"quantity_shipped": 5,
"unit_price": 1.28,
"extended_price": 2.82
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "LB",
"description": "CARROTS BULK",
"quantity_shipped": 5,
"unit_price": 1.31,
"extended_price": 6.94
}
},
{
"type": "object",
"properties": {
"product_code": "2830401",
"unit": "PD",
"description": "GARLIC JUMBO",
"quantity_shipped": 1,
"unit_price": 4.07,
"extended_price": 4.88
}
},
{
"type": "object",
"properties": {
"product_code": "2839401",
"unit": "PD",
"description": "PEPPER GREEN MED",
"quantity_shipped": 1,
"unit_price": 4.68,
"extended_price": 6.08
}
},
{
"type": "object",
"properties": {
"product_code": "2840601",
"unit": "PD",
"description": "PEPPER RED BELL",
"quantity_shipped": 1,
"unit_price": 3.86,
"extended_price": 5.02
}
},
{
"type": "object",
"properties": {
"product_code": "2847001",
"unit": "PD",
"description": "SQUASH ZUCCHINI FANCY",
"quantity_shipped": 1,
"unit_price": 2.42,
"extended_price": 3.39
}
},
{
"type": "object",
"properties": {
"product_code": "2848701",
"unit": "EA",
"description": "TOFU (FIRM 2\/PC)",
"quantity_shipped": 1,
"unit_price": 4.7,
"extended_price": 4.7
}
},
{
"type": "object",
"properties": {
"product_code": "3005601",
"unit": "EA",
"description": "BARILLA LINGUINI #13",
"quantity_shipped": 2,
"unit_price": 2.56,
"extended_price": 2.56
}
},
{
"type": "object",
"properties": {
"product_code": "4002801",
"unit": "EA",
"description": "GRAIN QUINOA WHITE ORGANI",
"quantity_shipped": 1,
"unit_price": 6.41,
"extended_price": 6.41
}
},
{
"type": "object",
"properties": {
"product_code": "4011101",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 1,
"unit_price": 3.28,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "5009301",
"unit": "EA",
"description": "ONION POWDER",
"quantity_shipped": 1,
"unit_price": 1.91,
"extended_price": 1.91
}
},
{
"type": "object",
"properties": {
"product_code": "GY24711",
"unit": "EA",
"description": "RED KIDNEY BEANS DRY",
"quantity_shipped": 1,
"unit_price": 4.2,
"extended_price": 4.2
}
},
{
"type": "object",
"properties": {
"product_code": "GY26121",
"unit": "EA",
"description": "RICE BROWN LONG GRAIN",
"quantity_shipped": 1,
"unit_price": 1.4,
"extended_price": 1.4
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "18.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569918\",\n \"invoice_date\": \"2025-07-21\",\n \"vendor_name\": \"SUPA VALU LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 3.93\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 3.11\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.28,\n \"extended_price\": 2.82\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"LB\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 6.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2830401\",\n \"unit\": \"PD\",\n \"description\": \"GARLIC JUMBO\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.07,\n \"extended_price\": 4.88\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 6.08\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 5.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2847001\",\n \"unit\": \"PD\",\n \"description\": \"SQUASH ZUCCHINI FANCY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.42,\n \"extended_price\": 3.39\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2848701\",\n \"unit\": \"EA\",\n \"description\": \"TOFU (FIRM 2\/PC)\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.7,\n \"extended_price\": 4.7\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3005601\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5009301\",\n \"unit\": \"EA\",\n \"description\": \"ONION POWDER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.91,\n \"extended_price\": 1.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24711\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEANS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY26121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "97d00f35-2b12-42bb-bc78-18e93e7a8b5f"
},
{
"text": "{\n \"invoice_number\": \"569989\",\n \"invoice_date\": \"2025-07-22\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2828801\",\n \"unit\": \"PD\",\n \"description\": \"EGGPLANT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.9,\n \"extended_price\": 4.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2855601\",\n \"unit\": \"EA\",\n \"description\": \"ROSEMARY FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.62,\n \"extended_price\": 1.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3404401\",\n \"unit\": \"EA\",\n \"description\": \"LEMON JUICE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 4.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"PK\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 3.28\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"EA\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.03,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24791\",\n \"unit\": \"EA\",\n \"description\": \"BLACK BEANS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.91,\n \"extended_price\": 1.91\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "77c61221-d4b7-40c3-8704-4fc59b1fb64e",
"chatMessageId": "87dc0846-0c46-4f1b-999d-db2784aecb38",
"executionId": "c852095e-4472-4065-9ad9-9548981b8238",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "19.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569989\",\n \"invoice_date\": \"2025-07-22\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2828801\",\n \"unit\": \"PD\",\n \"description\": \"EGGPLANT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.9,\n \"extended_price\": 4.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2855601\",\n \"unit\": \"EA\",\n \"description\": \"ROSEMARY FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.62,\n \"extended_price\": 1.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3404401\",\n \"unit\": \"EA\",\n \"description\": \"LEMON JUICE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 4.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"PK\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 3.28\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"EA\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.03,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24791\",\n \"unit\": \"EA\",\n \"description\": \"BLACK BEANS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.91,\n \"extended_price\": 1.91\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194490699,
"end": 1756194503793,
"delta": 13094
},
"invoice_number": "569989",
"invoice_date": "2025-07-22",
"vendor_name": "SUPA VALU, LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660421",
"unit": "EA",
"description": "WORTHINGTON DINNER ROAST",
"quantity_shipped": 1,
"unit_price": 19.84,
"extended_price": 19.84
}
},
{
"type": "object",
"properties": {
"product_code": "1217801",
"unit": "EA",
"description": "STRAWBERRY SLICED 6\/6.5#",
"quantity_shipped": 1,
"unit_price": 21,
"extended_price": 21
}
},
{
"type": "object",
"properties": {
"product_code": "2828801",
"unit": "PD",
"description": "EGGPLANT",
"quantity_shipped": 2,
"unit_price": 1.9,
"extended_price": 4.94
}
},
{
"type": "object",
"properties": {
"product_code": "2855601",
"unit": "EA",
"description": "ROSEMARY FRESH",
"quantity_shipped": 1,
"unit_price": 1.62,
"extended_price": 1.62
}
},
{
"type": "object",
"properties": {
"product_code": "3404401",
"unit": "EA",
"description": "LEMON JUICE",
"quantity_shipped": 1,
"unit_price": 4.68,
"extended_price": 4.68
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "PK",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 1,
"unit_price": 3.28,
"extended_price": 3.28
}
},
{
"type": "object",
"properties": {
"product_code": "GY24741",
"unit": "EA",
"description": "BLACK EYE PEAS",
"quantity_shipped": 0,
"unit_price": 2.03,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "GY24791",
"unit": "EA",
"description": "BLACK BEANS DRY",
"quantity_shipped": 1,
"unit_price": 1.91,
"extended_price": 1.91
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "19.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569989\",\n \"invoice_date\": \"2025-07-22\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 1,\n \"unit_price\": 19.84,\n \"extended_price\": 19.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/6.5#\",\n \"quantity_shipped\": 1,\n \"unit_price\": 21,\n \"extended_price\": 21\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2828801\",\n \"unit\": \"PD\",\n \"description\": \"EGGPLANT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.9,\n \"extended_price\": 4.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2855601\",\n \"unit\": \"EA\",\n \"description\": \"ROSEMARY FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.62,\n \"extended_price\": 1.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3404401\",\n \"unit\": \"EA\",\n \"description\": \"LEMON JUICE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 4.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"PK\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 3.28\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24741\",\n \"unit\": \"EA\",\n \"description\": \"BLACK EYE PEAS\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.03,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24791\",\n \"unit\": \"EA\",\n \"description\": \"BLACK BEANS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.91,\n \"extended_price\": 1.91\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "77c61221-d4b7-40c3-8704-4fc59b1fb64e"
},
{
"text": "{\n \"invoice_number\": \"569942\",\n \"invoice_date\": \"2025-07-22\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2609001\",\n \"unit\": \"EA\",\n \"description\": \"APPLE RED\",\n \"quantity_shipped\": 6,\n \"unit_price\": 0.57,\n \"extended_price\": 3.42\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2624201\",\n \"unit\": \"EA\",\n \"description\": \"PINEAPPLE GOLDEN RIPE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 4.6,\n \"extended_price\": 13.8\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 6\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"EA\",\n \"description\": \"KALE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.18,\n \"extended_price\": 2.18\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"LB\",\n \"description\": \"SPINACH CELLO\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.38,\n \"extended_price\": 3.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 17.3\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 15,\n \"unit_price\": 1.68,\n \"extended_price\": 20.83\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"CW\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 7.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 6.95\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410580\",\n \"unit\": \"CS\",\n \"description\": \"KS WATER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.16,\n \"extended_price\": 10.16\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"6807061\",\n \"unit\": \"PK\",\n \"description\": \"PORTION CUP 2z TRANSLUCEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 8.56,\n \"extended_price\": 8.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY13411\",\n \"unit\": \"EA\",\n \"description\": \"OLIVE OIL PURE GOYA 25\/8.\",\n \"quantity_shipped\": 0,\n \"unit_price\": 8.56,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11950\",\n \"unit\": \"CS\",\n \"description\": \"GARLIC EX VIRGIN OIL 12\/8\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.38,\n \"extended_price\": 63.62\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "eadac7ee-e97b-4fff-bc4e-ef3c64e5fa5b",
"chatMessageId": "ab3611df-8e72-4cc2-ace9-8cecdde6fd89",
"executionId": "4b3356ef-062d-430f-bd36-a2c9cb2026e2",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "20.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569942\",\n \"invoice_date\": \"2025-07-22\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2609001\",\n \"unit\": \"EA\",\n \"description\": \"APPLE RED\",\n \"quantity_shipped\": 6,\n \"unit_price\": 0.57,\n \"extended_price\": 3.42\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2624201\",\n \"unit\": \"EA\",\n \"description\": \"PINEAPPLE GOLDEN RIPE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 4.6,\n \"extended_price\": 13.8\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 6\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"EA\",\n \"description\": \"KALE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.18,\n \"extended_price\": 2.18\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"LB\",\n \"description\": \"SPINACH CELLO\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.38,\n \"extended_price\": 3.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 17.3\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 15,\n \"unit_price\": 1.68,\n \"extended_price\": 20.83\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"CW\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 7.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 6.95\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410580\",\n \"unit\": \"CS\",\n \"description\": \"KS WATER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.16,\n \"extended_price\": 10.16\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"6807061\",\n \"unit\": \"PK\",\n \"description\": \"PORTION CUP 2z TRANSLUCEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 8.56,\n \"extended_price\": 8.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY13411\",\n \"unit\": \"EA\",\n \"description\": \"OLIVE OIL PURE GOYA 25\/8.\",\n \"quantity_shipped\": 0,\n \"unit_price\": 8.56,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11950\",\n \"unit\": \"CS\",\n \"description\": \"GARLIC EX VIRGIN OIL 12\/8\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.38,\n \"extended_price\": 63.62\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194505458,
"end": 1756194520201,
"delta": 14743
},
"invoice_number": "569942",
"invoice_date": "2025-07-22",
"vendor_name": "SUPA VALU,LTD.-TORTOLA",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "2609001",
"unit": "EA",
"description": "APPLE RED",
"quantity_shipped": 6,
"unit_price": 0.57,
"extended_price": 3.42
}
},
{
"type": "object",
"properties": {
"product_code": "2624201",
"unit": "EA",
"description": "PINEAPPLE GOLDEN RIPE",
"quantity_shipped": 3,
"unit_price": 4.6,
"extended_price": 13.8
}
},
{
"type": "object",
"properties": {
"product_code": "2806201",
"unit": "LB",
"description": "ONION RED MEDIUM",
"quantity_shipped": 2,
"unit_price": 2.07,
"extended_price": 6
}
},
{
"type": "object",
"properties": {
"product_code": "2815201",
"unit": "EA",
"description": "KALE",
"quantity_shipped": 1,
"unit_price": 2.18,
"extended_price": 2.18
}
},
{
"type": "object",
"properties": {
"product_code": "2816201",
"unit": "LB",
"description": "SPINACH CELLO",
"quantity_shipped": 1,
"unit_price": 3.38,
"extended_price": 3.38
}
},
{
"type": "object",
"properties": {
"product_code": "2819201",
"unit": "LB",
"description": "BEET ROOT",
"quantity_shipped": 10,
"unit_price": 1.31,
"extended_price": 17.3
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 15,
"unit_price": 1.68,
"extended_price": 20.83
}
},
{
"type": "object",
"properties": {
"product_code": "2839401",
"unit": "CW",
"description": "PEPPER GREEN MED",
"quantity_shipped": 1,
"unit_price": 4.68,
"extended_price": 7.02
}
},
{
"type": "object",
"properties": {
"product_code": "2840601",
"unit": "PD",
"description": "PEPPER RED BELL",
"quantity_shipped": 1,
"unit_price": 3.86,
"extended_price": 6.95
}
},
{
"type": "object",
"properties": {
"product_code": "3410580",
"unit": "CS",
"description": "KS WATER",
"quantity_shipped": 1,
"unit_price": 10.16,
"extended_price": 10.16
}
},
{
"type": "object",
"properties": {
"product_code": "6807061",
"unit": "PK",
"description": "PORTION CUP 2z TRANSLUCEN",
"quantity_shipped": 1,
"unit_price": 8.56,
"extended_price": 8.56
}
},
{
"type": "object",
"properties": {
"product_code": "GY13411",
"unit": "EA",
"description": "OLIVE OIL PURE GOYA 25\/8.",
"quantity_shipped": 0,
"unit_price": 8.56,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "GY11950",
"unit": "CS",
"description": "GARLIC EX VIRGIN OIL 12\/8",
"quantity_shipped": 1,
"unit_price": 6.38,
"extended_price": 63.62
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "20.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569942\",\n \"invoice_date\": \"2025-07-22\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2609001\",\n \"unit\": \"EA\",\n \"description\": \"APPLE RED\",\n \"quantity_shipped\": 6,\n \"unit_price\": 0.57,\n \"extended_price\": 3.42\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2624201\",\n \"unit\": \"EA\",\n \"description\": \"PINEAPPLE GOLDEN RIPE\",\n \"quantity_shipped\": 3,\n \"unit_price\": 4.6,\n \"extended_price\": 13.8\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2806201\",\n \"unit\": \"LB\",\n \"description\": \"ONION RED MEDIUM\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 6\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"EA\",\n \"description\": \"KALE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.18,\n \"extended_price\": 2.18\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"LB\",\n \"description\": \"SPINACH CELLO\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.38,\n \"extended_price\": 3.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 17.3\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 15,\n \"unit_price\": 1.68,\n \"extended_price\": 20.83\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"CW\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.68,\n \"extended_price\": 7.02\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2840601\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER RED BELL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.86,\n \"extended_price\": 6.95\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410580\",\n \"unit\": \"CS\",\n \"description\": \"KS WATER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.16,\n \"extended_price\": 10.16\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"6807061\",\n \"unit\": \"PK\",\n \"description\": \"PORTION CUP 2z TRANSLUCEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 8.56,\n \"extended_price\": 8.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY13411\",\n \"unit\": \"EA\",\n \"description\": \"OLIVE OIL PURE GOYA 25\/8.\",\n \"quantity_shipped\": 0,\n \"unit_price\": 8.56,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY11950\",\n \"unit\": \"CS\",\n \"description\": \"GARLIC EX VIRGIN OIL 12\/8\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.38,\n \"extended_price\": 63.62\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "eadac7ee-e97b-4fff-bc4e-ef3c64e5fa5b"
},
{
"text": "{\n \"invoice_number\": \"569255\",\n \"invoice_date\": \"2025-07-09\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 2,\n \"unit_price\": 19.84,\n \"extended_price\": 39.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1210801\",\n \"unit\": \"EA\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.78,\n \"extended_price\": 4.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 50CT\",\n \"quantity_shipped\": 4,\n \"unit_price\": 1.19,\n \"extended_price\": 5.36\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.28,\n \"extended_price\": 3.07\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.12,\n \"extended_price\": 4.12\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.16,\n \"extended_price\": 3.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.26,\n \"extended_price\": 6.3\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002851\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA MACARONI ELBOW\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.91,\n \"extended_price\": 2.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"EA\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5004811\",\n \"unit\": \"EA\",\n \"description\": \"CURRY POWDER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 9.04,\n \"extended_price\": 9.04\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"G226121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations.",
"chatId": "9eaf8b0c-9e80-41b7-9d1e-56edc1a543d0",
"chatMessageId": "4b421985-e6d7-417d-aacb-1009c14d4d3f",
"executionId": "e876ce7a-fb90-48eb-b40c-e92747cd16d6",
"agentFlowExecutedData": [
{
"nodeId": "startAgentflow_0",
"nodeLabel": "Start",
"data": {
"id": "startAgentflow_0",
"name": "startAgentflow",
"input": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"output": {
"question": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
"state": []
},
"previousNodeIds": [],
"status": "FINISHED"
},
{
"nodeId": "llmAgentflow_0",
"nodeLabel": "Extract & Analyze Invoice",
"data": {
"id": "llmAgentflow_0",
"name": "llmAgentflow",
"input": {
"messages": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "21.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "user",
"content": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding"
}
],
"llmModel": "chatGoogleGenerativeAI",
"llmEnableMemory": true,
"llmMemoryType": "allMessages",
"llmUserMessage": "Invoice Analyzer Instructions\n=============================\n\nYou are a comprehensive invoice analyzer. Your task is to extract and structure all relevant information from invoice documents with high accuracy and consistency from Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations. or \n\nProcessing Guidelines\n---------------------\n\n### Multi-Invoice Documents\n\n* **Separate Analysis**: If a document contains multiple invoices, each invoice individually and present results separately\n \n* **Clear Identification**: Number each invoice (Invoice 1, Invoice 2, etc.) when multiple invoices are present\n \n* **Page Continuations**: Recognize when invoices span multiple pages and consolidate information appropriately\n \n\n### Data Extraction Requirements\n\nExtract the following information for each invoice:\n\n#### Essential Invoice Details\n\n* **Invoice Number**: Unique identifier for the invoice\n \n* **Invoice Date**: Date the invoice was issued\n \n* **Due Date**: Payment due date (if specified)\n \n* **Purchase Order Number**: Reference number (if present)\n \n\n#### Vendor\/Supplier Information\n\n* **Company Name**: Full legal name of the billing entity\n \n* **Address**: Complete billing address\n \n* **Contact Information**: Phone, email, website (if available)\n \n* **Tax ID\/Registration Numbers**: VAT, GST, EIN, or other tax identifiers\n \n\n#### Customer\/Bill-to Information\n\n* **Company Name**: Full name of the entity being billed\n \n* **Address**: Complete billing\/shipping address\n \n* **Contact Person**: If specified\n \n\n#### Financial Details\n\n* **Line Items**: Each product\/service with:\n \n * Description\n \n * Quantity\n \n * Unit price\n \n * Total amount per line\n \n* **Subtotal**: Pre-tax amount\n \n* **Tax Information**:\n \n * Tax rate(s)\n \n * Tax amount(s)\n \n * Tax type (VAT, GST, sales tax, etc.)\n \n* **Discounts**: Any applied discounts or credits\n \n* **Total Amount**: Final amount due\n \n* **Currency**: Specified currency\n \n\n#### Payment Information\n\n* **Payment Terms**: Net 30, due on receipt, etc.\n \n* **Payment Methods**: Accepted payment options\n \n* **Bank Details**: If provided for wire transfers\n \n\n#### Additional Information\n\n* **Notes\/Comments**: Any special instructions or terms\n \n* **Reference Numbers**: Order numbers, contract references\n \n* **Shipping Information**: If different from billing address\n \n\nOutput Format\n-------------\n\nPresent extracted information in a structured format:\n\n INVOICE [Number if multiple]\n ========================\n Invoice Number: [number]\n Date: [date]\n Due Date: [date]\n PO Number: [if applicable]\n \n VENDOR:\n Name: [company name]\n Address: [full address]\n Contact: [phone\/email]\n Tax ID: [if present]\n \n CUSTOMER:\n Name: [company name] \n Address: [full address]\n \n LINE ITEMS:\n 1. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n 2. [Description] | Qty: [X] | Unit: $[amount] | Total: $[amount]\n [continue for all items]\n \n FINANCIAL SUMMARY:\n Subtotal: $[amount]\n Tax ([rate]%): $[amount]\n Total: $[amount]\n Currency: [currency]\n \n PAYMENT TERMS: [terms]\n NOTES: [any additional information]\n \n\nQuality Standards\n-----------------\n\n* **Accuracy**: Double-check all numerical values and dates\n \n* **Completeness**: Flag any missing critical information\n \n* **Consistency**: Use standardized date formats (YYYY-MM-DD) and currency notation\n \n* **Clarity**: If text is unclear or illegible, note as \"\\[UNCLEAR\\]\" rather than guessing\n \n* **Validation**: Cross-reference totals to ensure mathematical accuracy\n \n\nError Handling\n--------------\n\n* If information is partially visible or cut off, extract what's readable and note limitations\n \n* For poor quality images, indicate which fields may be unreliable\n \n* If no invoice is detected in the document, clearly state this finding",
"llmReturnResponseAs": "assistantMessage",
"llmStructuredOutput": [
{
"key": "invoice_number",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "Invoice Number"
},
{
"key": "invoice_date",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "invoice date"
},
{
"key": "vendor_name",
"type": "string",
"enumValues": "",
"jsonSchema": "",
"description": "vendor name"
},
{
"key": "line_items",
"type": "jsonArray",
"enumValues": "",
"jsonSchema": "{ \"type\": \"object\", \"properties\": { \"product_code\": { \"type\": \"string\", \"description\": \"Product identification code\" }, \"unit\": { \"type\": \"string\", \"description\": \"Unit of measurement (EA, LB, etc.)\" }, \"description\": { \"type\": \"string\", \"description\": \"Product description\" }, \"quantity_shipped\": { \"type\": \"number\", \"description\": \"Quantity that was actually shipped\" }, \"unit_price\": { \"type\": \"number\", \"description\": \"Price per unit\" }, \"extended_price\": { \"type\": \"number\", \"description\": \"Total price for this line item\" } } }",
"description": "Used to get the product lines"
}
],
"llmModelConfig": {
"credential": "",
"modelName": "gemini-2.5-flash",
"customModelName": "",
"temperature": "0.2",
"streaming": true,
"maxOutputTokens": "",
"topP": "",
"topK": "",
"safetySettings": "",
"baseUrl": "",
"allowImageUploads": true,
"llmModel": "chatGoogleGenerativeAI"
}
},
"output": {
"content": "{\n \"invoice_number\": \"569255\",\n \"invoice_date\": \"2025-07-09\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 2,\n \"unit_price\": 19.84,\n \"extended_price\": 39.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1210801\",\n \"unit\": \"EA\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.78,\n \"extended_price\": 4.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 50CT\",\n \"quantity_shipped\": 4,\n \"unit_price\": 1.19,\n \"extended_price\": 5.36\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.28,\n \"extended_price\": 3.07\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.12,\n \"extended_price\": 4.12\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.16,\n \"extended_price\": 3.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.26,\n \"extended_price\": 6.3\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002851\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA MACARONI ELBOW\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.91,\n \"extended_price\": 2.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"EA\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5004811\",\n \"unit\": \"EA\",\n \"description\": \"CURRY POWDER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 9.04,\n \"extended_price\": 9.04\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"G226121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194522199,
"end": 1756194538250,
"delta": 16051
},
"invoice_number": "569255",
"invoice_date": "2025-07-09",
"vendor_name": "SUPA VALU,LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660421",
"unit": "EA",
"description": "WORTHINGTON DINNER ROAST",
"quantity_shipped": 2,
"unit_price": 19.84,
"extended_price": 39.68
}
},
{
"type": "object",
"properties": {
"product_code": "1210801",
"unit": "EA",
"description": "OKRA CUT",
"quantity_shipped": 1,
"unit_price": 4.78,
"extended_price": 4.78
}
},
{
"type": "object",
"properties": {
"product_code": "2801601",
"unit": "PD",
"description": "POTATO BAKING 50CT",
"quantity_shipped": 4,
"unit_price": 1.19,
"extended_price": 5.36
}
},
{
"type": "object",
"properties": {
"product_code": "2807201",
"unit": "LB",
"description": "ONION YELLOW JUMBO",
"quantity_shipped": 2,
"unit_price": 1.28,
"extended_price": 3.07
}
},
{
"type": "object",
"properties": {
"product_code": "2819801",
"unit": "EA",
"description": "BROCCOLI",
"quantity_shipped": 1,
"unit_price": 4.12,
"extended_price": 4.12
}
},
{
"type": "object",
"properties": {
"product_code": "2821201",
"unit": "LB",
"description": "CABBAGE GREEN",
"quantity_shipped": 1,
"unit_price": 1.16,
"extended_price": 3.94
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 5,
"unit_price": 1.26,
"extended_price": 6.3
}
},
{
"type": "object",
"properties": {
"product_code": "2825401",
"unit": "EA",
"description": "CELERY EAST 30CT",
"quantity_shipped": 1,
"unit_price": 2.31,
"extended_price": 2.31
}
},
{
"type": "object",
"properties": {
"product_code": "2856601",
"unit": "EA",
"description": "THYME FRESH",
"quantity_shipped": 1,
"unit_price": 1.4,
"extended_price": 1.4
}
},
{
"type": "object",
"properties": {
"product_code": "4002851",
"unit": "EA",
"description": "BARILLA MACARONI ELBOW",
"quantity_shipped": 1,
"unit_price": 2.91,
"extended_price": 2.91
}
},
{
"type": "object",
"properties": {
"product_code": "4011101",
"unit": "EA",
"description": "GRAIN QUINOA WHITE ORGANI",
"quantity_shipped": 1,
"unit_price": 6.41,
"extended_price": 6.41
}
},
{
"type": "object",
"properties": {
"product_code": "5004811",
"unit": "EA",
"description": "CURRY POWDER",
"quantity_shipped": 1,
"unit_price": 9.04,
"extended_price": 9.04
}
},
{
"type": "object",
"properties": {
"product_code": "G226121",
"unit": "EA",
"description": "RICE BROWN LONG GRAIN",
"quantity_shipped": 1,
"unit_price": 4.2,
"extended_price": 4.2
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "21.jpg",
"mime": "image\/jpeg"
}
]
},
{
"role": "user",
"content": "Analyze this invoice image and extract key information. Return ONLY a valid JSON object with the following structure: {\"invoice_number\": \"string\", \"invoice_date\": \"YYYY-MM-DD\", \"vendor_name\": \"string\", \"total_amount\": number, \"line_items\": [{\"product_code\": \"string\", \"description\": \"string\", \"quantity_shipped\": number, \"unit_price\": number, \"extended_price\": number, \"unit\": \"string\"}]}. Do not include any other text or explanations."
},
{
"role": "assistant",
"content": "{\n \"invoice_number\": \"569255\",\n \"invoice_date\": \"2025-07-09\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660421\",\n \"unit\": \"EA\",\n \"description\": \"WORTHINGTON DINNER ROAST\",\n \"quantity_shipped\": 2,\n \"unit_price\": 19.84,\n \"extended_price\": 39.68\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1210801\",\n \"unit\": \"EA\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.78,\n \"extended_price\": 4.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 50CT\",\n \"quantity_shipped\": 4,\n \"unit_price\": 1.19,\n \"extended_price\": 5.36\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.28,\n \"extended_price\": 3.07\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.12,\n \"extended_price\": 4.12\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.16,\n \"extended_price\": 3.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.26,\n \"extended_price\": 6.3\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.4,\n \"extended_price\": 1.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4002851\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA MACARONI ELBOW\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.91,\n \"extended_price\": 2.91\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011101\",\n \"unit\": \"EA\",\n \"description\": \"GRAIN QUINOA WHITE ORGANI\",\n \"quantity_shipped\": 1,\n \"unit_price\": 6.41,\n \"extended_price\": 6.41\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5004811\",\n \"unit\": \"EA\",\n \"description\": \"CURRY POWDER\",\n \"quantity_shipped\": 1,\n \"unit_price\": 9.04,\n \"extended_price\": 9.04\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"G226121\",\n \"unit\": \"EA\",\n \"description\": \"RICE BROWN LONG GRAIN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "9eaf8b0c-9e80-41b7-9d1e-56edc1a543d0"
}
]