Invoice Details
569256
Invoice Information
PurchaseEast End
569256
Jul 09, 2025
Not provided
SUPA VALU,LTD.
Not provided
$75.21
Line Items
| # | Description | Brand | Size | Qty | Unit Price | Total |
|---|---|---|---|---|---|---|
| 1 | STRAWBERRY SLICED 6/6.5# | 1217801 | - | 1.00 | $21.00 | $21.00 |
| 2 | PINEAPPLE GOLDEN RIPE | 2624201 | - | 3.00 | $4.60 | $13.80 |
| 1 | POTATO BAKING 90CT | 2801601 | - | 3.00 | $1.19 | $4.52 |
| 2 | CABBAGE RED | 2821801 | - | 5.00 | $1.31 | $7.21 |
| 3 | CARROTS BULK | 2823601 | - | 5.00 | $1.31 | $7.73 |
| 4 | CELERY EAST 30CT | 2825401 | - | 1.00 | $2.31 | $2.31 |
| 5 | ROSEMARY FRESH | 2855601 | - | 1.00 | $1.62 | $1.62 |
| 6 | THYME FRESH | 2856601 | - | 1.00 | $1.40 | $1.40 |
| 7 | TOFU (FIRM 2/PC) | 3005601 | - | 1.00 | $4.70 | $4.70 |
| 8 | BARILLA LINGUINI #13 | 4002801 | - | 1.00 | $2.56 | $2.56 |
| 9 | BLACK BEANS DRY | GY24791 | - | 1.00 | $1.91 | $1.91 |
| 10 | RED KIDNEY BEAN SMALL | GY24861 | - | 0.00 | $1.94 | $1.94 |
| 11 | RICE BROWN LONG GRAIN | GY26121 | - | 1.00 | $4.20 | $4.20 |
| 1 | VEGEBURGER GRILLERS PATTY | 0660491 | - | 1.00 | $18.43 | $18.43 |
| 2 | ONION YELLOW JUMBO | 2807201 | - | 2.00 | $1.28 | $3.07 |
| 3 | EGGPLANT | 2828801 | - | 3.00 | $1.87 | $6.73 |
| 4 | PEPPER GREEN MED | 2839401 | - | 1.00 | $2.68 | $3.22 |
| 5 | PEPPER RED BELL | 2840601 | - | 1.00 | $3.46 | $3.81 |
| 6 | QUINOA TRI-COLOR | 4011151 | - | 1.00 | $7.58 | $7.58 |
| 7 | SALT IODIZED | 4024801 | - | 1.00 | $2.27 | $2.27 |
| 8 | COCONUT MILK 1X13.5Z | 4808471 | - | 2.00 | $3.28 | $6.56 |
| 9 | TUMERIC GROUND | 5021611 | - | 1.00 | $8.33 | $8.33 |
| 10 | RED KIDNEY BEAN SMALL | GY24861 | - | 1.00 | $1.94 | $4.01 |
| 11 | LASAGNE | GY39511 | - | 0.00 | $4.01 | $0.00 |
| 1 | SPINACH CHOPPED FROZEN | 1212601 | - | 1.00 | $6.12 | $6.12 |
| 2 | POTATO BAKING 90CT | 2801601 | - | 3.00 | $1.19 | $4.05 |
| 3 | ONION YELLOW JUMBO | 2807201 | - | 3.00 | $1.28 | $4.22 |
| 4 | TOMATO VINE RIPE 6X6 | 2811401 | - | 3.00 | $2.46 | $7.63 |
| 5 | CABBAGE GREEN | 2821201 | - | 1.00 | $1.16 | $2.09 |
| 6 | CARROTS BULK | 2823601 | - | 5.00 | $1.31 | $6.55 |
| 7 | CELERY CELLO SLEEVED | 2824601 | - | 1.00 | $2.45 | $2.45 |
| 8 | CELERY EAST 30CT | 2825401 | - | 0.00 | $2.31 | $2.66 |
| 9 | CUCUMBER SELECT | 2828401 | - | 2.00 | $1.33 | $6.56 |
| 10 | COCONUT MILK 1X13.5Z | 4808471 | - | 2.00 | $3.28 | $4.20 |
| 11 | CHIC PEAS DRY | GY24781 | - | 1.00 | $2.07 | $4.20 |
| 12 | RICE BROWN LONG GRAIN | GY26121 | - | 1.00 | $4.20 | $4.20 |
| 1 | SPINACH CHOPPED FROZEN | 1212601 | - | 1.00 | $6.12 | $6.12 |
| 2 | PINEAPPLE GOLDEN RIPE | 2624201 | - | 3.00 | $4.60 | $13.80 |
| 3 | ONION RED MEDIUM | 2806201 | - | 1.90 | $2.07 | $3.93 |
| 4 | KALE | 2815201 | - | 1.00 | $2.18 | $2.18 |
| 5 | BEET ROOT | 2819201 | - | 10.00 | $1.68 | $17.14 |
| 6 | CARROTS BULK | 2823601 | - | 10.00 | $1.31 | $13.62 |
| 7 | GARLIC JUMBO | 2830401 | - | 2.00 | $4.07 | $5.29 |
| 8 | PEPPER GREEN MED | 2839401 | - | 2.00 | $4.75 | $11.40 |
| 9 | PEPPER RED BELL | 2840601 | - | 2.00 | $4.23 | $11.84 |
| 10 | GINGER ROOT *CUT* | 2850601 | - | 1.00 | $1.86 | $4.70 |
| 11 | TOFU (FIRM 2/PC) | 3005601 | - | 1.00 | $4.26 | $3.72 |
| 12 | SUGAR BROWN DARK | 4026001 | - | 1.00 | $3.28 | $4.26 |
| 13 | DELI CONT LID CLEAR 8-32Z | 7003461 | - | 1.00 | $3.28 | $3.28 |
| 14 | DELI WRAP 10X10, 75 12/500 | 7401001 | - | 1.00 | $10.71 | $10.71 |
| 15 | DELI WRAP 12X10, 75 12/500 | 7401201 | - | 1.00 | $10.71 | $10.71 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | POTATO BAKING 90CT | 2801601 | - | 3.00 | $1.19 | $4.40 |
| 3 | CABBAGE RED | 2821801 | - | 3.00 | $1.31 | $5.11 |
| 4 | ROSEMARY FRESH | 2855601 | - | 1.00 | $1.62 | $1.62 |
| 5 | THYME FRESH | 2856601 | - | 1.00 | $1.40 | $1.40 |
| 6 | TOFU (FIRM 2/PC) | 3005601 | - | 1.00 | $4.70 | $4.70 |
| 7 | BARILLA LINGUINI #13 | 4002801 | - | 1.00 | $2.56 | $2.56 |
| 8 | QUINOA TRI-COLOR | 4011151 | - | 1.00 | $7.58 | $7.58 |
| 9 | COCONUT MILK 1X13.5Z | 4080471 | - | 2.00 | $3.28 | $6.56 |
| 10 | RICE BROWN LONG GRAIN | GX26121 | - | 1.00 | $4.20 | $4.20 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | ONION YELLOW JUMBO | 2807201 | - | 3.00 | $1.26 | $3.78 |
| 3 | BEET ROOT | 2819201 | - | 5.00 | $1.31 | $6.81 |
| 4 | CARROTS BULK | 2823601 | - | 1.00 | $2.31 | $2.31 |
| 5 | CELERY EAST 30CT | 2825401 | - | 2.00 | $2.09 | $4.81 |
| 6 | EGGPLANT | 2828801 | - | 2.00 | $2.62 | $2.88 |
| 7 | GINGER ROOT | 2850601 | - | 1.00 | $3.28 | $6.56 |
| 8 | COCONUT MILK 1X13.5Z | 4808471 | - | 2.00 | $3.43 | $3.43 |
| 9 | CUMIN GROUND | 5004401 | - | 1.00 | $1.97 | $1.97 |
| 10 | RED KIDNEY BEANS DRY | GY247411 | - | 2.00 | $2.03 | $2.03 |
| 11 | BLACK EYE PEAS DRY | GY24781 | - | 2.00 | $2.07 | $4.14 |
| 12 | LASAGNE | GY39511 | - | 1.00 | $4.01 | $4.01 |
| 1 | PLANTAN SHEET SLICED | 1217181 | - | 1.00 | $13.78 | $13.78 |
| 2 | STRAWBERRY SLICED 6/.5# | 1217801 | - | 3.00 | $7.00 | $21.00 |
| 3 | PITA WHEAT TOUFAYAN | 2225601 | - | 6.00 | $2.95 | $8.85 |
| 4 | APPLE GRANNY SMITH | 2607601 | - | 6.00 | $0.67 | $4.02 |
| 5 | TOMATO VINE RIPE 6X6 | 2811401 | - | 2.00 | $3.02 | $6.03 |
| 6 | SPINACH CELLO | 2816201 | - | 1.00 | $3.38 | $3.38 |
| 7 | PARSLEY | 2834801 | - | 1.00 | $1.15 | $1.15 |
| 8 | GINGER ROOT | 2850601 | - | 2.00 | $2.62 | $6.81 |
| 9 | LEMON JUICE | 3404401 | - | 1.00 | $4.68 | $4.68 |
| 10 | KS WATER | 3410580 | - | 1.00 | $10.16 | $10.16 |
| 11 | SEASONING ITALIAN | 5017561 | - | 1.00 | $4.58 | $4.58 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | OKRA CUT | 1210801 | - | 3.00 | $5.27 | $5.27 |
| 3 | POTATO BAKING 90CT | 2801601 | - | 1.00 | $1.19 | $4.52 |
| 4 | BROCCOLI | 2819801 | - | 0.00 | $4.40 | $4.40 |
| 5 | CABBAGE GREEN | 2821201 | - | 20.00 | $1.31 | $27.38 |
| 6 | CARROTS BULK | 2823601 | - | 1.00 | $1.40 | $1.40 |
| 7 | THYME FRESH | 2856601 | - | 1.00 | $6.41 | $6.41 |
| 8 | GRAIN QUINOA WHITE ORGANIC | 4011101 | - | 2.00 | $3.28 | $6.56 |
| 9 | COCONUT MILK 1X13.5Z | 4808471 | - | 2.00 | $2.10 | $4.20 |
| 10 | LENTILS | GY24761 | - | 2.00 | $4.20 | $4.20 |
| 11 | RICE BROWN LONG GRAIN | GY26121 | - | 1.00 | $4.20 | $4.20 |
| 1 | VEGEBURGER GRILLERS PATTY | 0660491 | - | 1.00 | $18.43 | $18.43 |
| 2 | STRAWBERRY SLICED 6/6.5# | 1217801 | - | 1.00 | $21.00 | $21.00 |
| 3 | PINEAPPLE GOLDEN RIPE | 2624201 | - | 3.00 | $4.60 | $13.80 |
| 4 | CUCUMBER SELECT | 2828401 | - | 0.00 | $1.28 | $2.94 |
| 5 | KS WATER | 3410560 | - | 1.00 | $10.16 | $10.16 |
| 6 | SUGAR BROWN LIGHT 24/1# | 4026601 | - | 3.00 | $1.66 | $4.98 |
| 1 | WORTHINGTON DINNER ROAST | 0660421 | - | 1.00 | $19.84 | $19.84 |
| 2 | SPINACH CHOPPED FROZEN | 1212601 | - | 1.00 | $6.12 | $6.12 |
| 3 | PLANTAIN SWEET SLICED | 1217181 | - | 3.00 | $13.78 | $13.78 |
| 4 | POTATO BAKING 90CT | 2801601 | - | 1.00 | $1.19 | $4.64 |
| 5 | CABBAGE GREEN | 2821201 | - | 0.00 | $1.16 | $0.00 |
| 6 | CARROTS BULK | 2823601 | - | 10.00 | $1.31 | $13.62 |
| 7 | CELERY EAST 30CT | 2825401 | - | 2.00 | $2.31 | $2.31 |
| 8 | COCONUT MILK 1X13.5Z | 4808471 | - | 2.00 | $3.28 | $6.56 |
| 9 | LENTILS | GY24761 | - | 2.00 | $2.10 | $4.20 |
| 10 | CHIC PEAS DRY | GY24781 | - | 2.00 | $2.07 | $4.14 |
| Total: | $756.42 | |||||
Original Images
Page 1
1.jpg
122.4 KB
Page 2
2.jpg
148.1 KB
Page 3
3.jpg
143.4 KB
Page 4
4.jpg
139.3 KB
Page 5
5.jpg
155.4 KB
Page 6
6.jpg
166.9 KB
Page 7
7.jpg
150.1 KB
Page 8
8.jpg
154.0 KB
Page 9
9.jpg
146.5 KB
Page 10
10.jpg
145.8 KB
Page 11
11.jpg
134.0 KB
Page 12
12.jpg
147.1 KB
[
{
"text": "{\n \"invoice_number\": \"569256\",\n \"invoice_date\": \"2025-07-09\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\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\": 13.8\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": "4d4083e1-3612-4f44-8fda-e86ad1bd6522",
"chatMessageId": "81af694c-df28-4274-a415-9f6287d4a851",
"executionId": "80eba609-71a7-4a0b-b96b-ec51964175d2",
"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": "1.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\": \"569256\",\n \"invoice_date\": \"2025-07-09\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\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\": 13.8\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194020412,
"end": 1756194027253,
"delta": 6841
},
"invoice_number": "569256",
"invoice_date": "2025-07-09",
"vendor_name": "SUPA VALU,LTD.",
"line_items": [
{
"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": 13.8
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "1.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\": \"569256\",\n \"invoice_date\": \"2025-07-09\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\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\": 13.8\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "4d4083e1-3612-4f44-8fda-e86ad1bd6522"
},
{
"text": "[\n {\n \"type\": \"text\",\n \"text\": \"{\\\"invoice_number\\\": \\\"569519\\\", \\\"invoice_date\\\": \\\"2025-07-14\\\", \\\"vendor_name\\\": \\\"SUPA VALU,LTD.\\\", \\\"line_items\\\": [{\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"1217801\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"STRAWBERRY SLICED 6\/6.5#\\\", \\\"quantity_shipped\\\": 1, \\\"unit_price\\\": 21.00, \\\"extended_price\\\": 21.00}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2624201\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"PINEAPPLE GOLDEN RIPE\\\", \\\"quantity_shipped\\\": 3, \\\"unit_price\\\": 4.60, \\\"extended_price\\\": 13.80}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2815201\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"KALE\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 2.18, \\\"extended_price\\\": 4.36}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2816201\\\", \\\"unit\\\": \\\"EA\\\", \\\"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.68, \\\"extended_price\\\": 17.81}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2823601\\\", \\\"unit\\\": \\\"PD\\\", \\\"description\\\": \\\"CARROTS BULK\\\", \\\"quantity_shipped\\\": 15, \\\"unit_price\\\": 1.31, \\\"extended_price\\\": 20.31}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2828401\\\", \\\"unit\\\": \\\"LB\\\", \\\"description\\\": \\\"CUCUMBER SELECT\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 1.23, \\\"extended_price\\\": 3.08}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2850601\\\", \\\"unit\\\": \\\"LB\\\", \\\"description\\\": \\\"GINGER ROOT\\\", \\\"quantity_shipped\\\": 2.80, \\\"unit_price\\\": 2.82, \\\"extended_price\\\": 7.90}}, {\\\"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\\\": \\\"4026601\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"SUGAR BROWN LIGHT\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 1.66, \\\"extended_price\\\": 3.32}}]}\"\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": "f815c5f3-7cf7-4f07-b8c9-a04bdece5475",
"chatMessageId": "1fa9f3d1-5751-47d6-8596-ca5f6e0031e2",
"executionId": "a63eb5bd-3c71-40ee-8491-11f24b6dc942",
"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": "2.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": {
"0": {
"type": "text",
"text": "{\"invoice_number\": \"569519\", \"invoice_date\": \"2025-07-14\", \"vendor_name\": \"SUPA VALU,LTD.\", \"line_items\": [{\"type\": \"object\", \"properties\": {\"product_code\": \"1217801\", \"unit\": \"EA\", \"description\": \"STRAWBERRY SLICED 6\/6.5#\", \"quantity_shipped\": 1, \"unit_price\": 21.00, \"extended_price\": 21.00}}, {\"type\": \"object\", \"properties\": {\"product_code\": \"2624201\", \"unit\": \"EA\", \"description\": \"PINEAPPLE GOLDEN RIPE\", \"quantity_shipped\": 3, \"unit_price\": 4.60, \"extended_price\": 13.80}}, {\"type\": \"object\", \"properties\": {\"product_code\": \"2815201\", \"unit\": \"EA\", \"description\": \"KALE\", \"quantity_shipped\": 2, \"unit_price\": 2.18, \"extended_price\": 4.36}}, {\"type\": \"object\", \"properties\": {\"product_code\": \"2816201\", \"unit\": \"EA\", \"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.68, \"extended_price\": 17.81}}, {\"type\": \"object\", \"properties\": {\"product_code\": \"2823601\", \"unit\": \"PD\", \"description\": \"CARROTS BULK\", \"quantity_shipped\": 15, \"unit_price\": 1.31, \"extended_price\": 20.31}}, {\"type\": \"object\", \"properties\": {\"product_code\": \"2828401\", \"unit\": \"LB\", \"description\": \"CUCUMBER SELECT\", \"quantity_shipped\": 2, \"unit_price\": 1.23, \"extended_price\": 3.08}}, {\"type\": \"object\", \"properties\": {\"product_code\": \"2850601\", \"unit\": \"LB\", \"description\": \"GINGER ROOT\", \"quantity_shipped\": 2.80, \"unit_price\": 2.82, \"extended_price\": 7.90}}, {\"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\": \"4026601\", \"unit\": \"EA\", \"description\": \"SUGAR BROWN LIGHT\", \"quantity_shipped\": 2, \"unit_price\": 1.66, \"extended_price\": 3.32}}]}"
},
"content": "[\n {\n \"type\": \"text\",\n \"text\": \"{\\\"invoice_number\\\": \\\"569519\\\", \\\"invoice_date\\\": \\\"2025-07-14\\\", \\\"vendor_name\\\": \\\"SUPA VALU,LTD.\\\", \\\"line_items\\\": [{\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"1217801\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"STRAWBERRY SLICED 6\/6.5#\\\", \\\"quantity_shipped\\\": 1, \\\"unit_price\\\": 21.00, \\\"extended_price\\\": 21.00}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2624201\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"PINEAPPLE GOLDEN RIPE\\\", \\\"quantity_shipped\\\": 3, \\\"unit_price\\\": 4.60, \\\"extended_price\\\": 13.80}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2815201\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"KALE\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 2.18, \\\"extended_price\\\": 4.36}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2816201\\\", \\\"unit\\\": \\\"EA\\\", \\\"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.68, \\\"extended_price\\\": 17.81}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2823601\\\", \\\"unit\\\": \\\"PD\\\", \\\"description\\\": \\\"CARROTS BULK\\\", \\\"quantity_shipped\\\": 15, \\\"unit_price\\\": 1.31, \\\"extended_price\\\": 20.31}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2828401\\\", \\\"unit\\\": \\\"LB\\\", \\\"description\\\": \\\"CUCUMBER SELECT\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 1.23, \\\"extended_price\\\": 3.08}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2850601\\\", \\\"unit\\\": \\\"LB\\\", \\\"description\\\": \\\"GINGER ROOT\\\", \\\"quantity_shipped\\\": 2.80, \\\"unit_price\\\": 2.82, \\\"extended_price\\\": 7.90}}, {\\\"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\\\": \\\"4026601\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"SUGAR BROWN LIGHT\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 1.66, \\\"extended_price\\\": 3.32}}]}\"\n }\n]",
"timeMetadata": {
"start": 1756194028504,
"end": 1756194045734,
"delta": 17230
}
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "2.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 {\n \"type\": \"text\",\n \"text\": \"{\\\"invoice_number\\\": \\\"569519\\\", \\\"invoice_date\\\": \\\"2025-07-14\\\", \\\"vendor_name\\\": \\\"SUPA VALU,LTD.\\\", \\\"line_items\\\": [{\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"1217801\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"STRAWBERRY SLICED 6\/6.5#\\\", \\\"quantity_shipped\\\": 1, \\\"unit_price\\\": 21.00, \\\"extended_price\\\": 21.00}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2624201\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"PINEAPPLE GOLDEN RIPE\\\", \\\"quantity_shipped\\\": 3, \\\"unit_price\\\": 4.60, \\\"extended_price\\\": 13.80}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2815201\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"KALE\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 2.18, \\\"extended_price\\\": 4.36}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2816201\\\", \\\"unit\\\": \\\"EA\\\", \\\"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.68, \\\"extended_price\\\": 17.81}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2823601\\\", \\\"unit\\\": \\\"PD\\\", \\\"description\\\": \\\"CARROTS BULK\\\", \\\"quantity_shipped\\\": 15, \\\"unit_price\\\": 1.31, \\\"extended_price\\\": 20.31}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2828401\\\", \\\"unit\\\": \\\"LB\\\", \\\"description\\\": \\\"CUCUMBER SELECT\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 1.23, \\\"extended_price\\\": 3.08}}, {\\\"type\\\": \\\"object\\\", \\\"properties\\\": {\\\"product_code\\\": \\\"2850601\\\", \\\"unit\\\": \\\"LB\\\", \\\"description\\\": \\\"GINGER ROOT\\\", \\\"quantity_shipped\\\": 2.80, \\\"unit_price\\\": 2.82, \\\"extended_price\\\": 7.90}}, {\\\"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\\\": \\\"4026601\\\", \\\"unit\\\": \\\"EA\\\", \\\"description\\\": \\\"SUGAR BROWN LIGHT\\\", \\\"quantity_shipped\\\": 2, \\\"unit_price\\\": 1.66, \\\"extended_price\\\": 3.32}}]}\"\n }\n]",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "f815c5f3-7cf7-4f07-b8c9-a04bdece5475"
},
{
"text": "{\n \"invoice_number\": \"569515\",\n \"invoice_date\": \"2025-07-14\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821801\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE RED\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 7.21\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.31,\n \"extended_price\": 7.73\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\": \"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\": \"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\": \"3005601\",\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\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\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 \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24861\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEAN SMALL\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.94,\n \"extended_price\": 1.94\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": "7e5dec15-14c1-41f6-a2a6-83639a2a6ee1",
"chatMessageId": "287887c3-0179-4956-a0d4-58f08b829dda",
"executionId": "6d327301-a74d-4bd6-8e44-c61e6df08a01",
"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": "3.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\": \"569515\",\n \"invoice_date\": \"2025-07-14\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821801\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE RED\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 7.21\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.31,\n \"extended_price\": 7.73\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\": \"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\": \"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\": \"3005601\",\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\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\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 \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24861\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEAN SMALL\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.94,\n \"extended_price\": 1.94\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": 1756194046290,
"end": 1756194070817,
"delta": 24527
},
"invoice_number": "569515",
"invoice_date": "2025-07-14",
"vendor_name": "SUPA VALU,LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "2801601",
"unit": "CW",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 3,
"unit_price": 1.19,
"extended_price": 4.52
}
},
{
"type": "object",
"properties": {
"product_code": "2821801",
"unit": "LB",
"description": "CABBAGE RED",
"quantity_shipped": 5,
"unit_price": 1.31,
"extended_price": 7.21
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 5,
"unit_price": 1.31,
"extended_price": 7.73
}
},
{
"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": "2855601",
"unit": "EA",
"description": "ROSEMARY FRESH",
"quantity_shipped": 1,
"unit_price": 1.62,
"extended_price": 1.62
}
},
{
"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": "3005601",
"unit": "EA",
"description": "TOFU (FIRM 2\/PC)",
"quantity_shipped": 1,
"unit_price": 4.7,
"extended_price": 4.7
}
},
{
"type": "object",
"properties": {
"product_code": "4002801",
"unit": "EA",
"description": "BARILLA LINGUINI #13",
"quantity_shipped": 1,
"unit_price": 2.56,
"extended_price": 2.56
}
},
{
"type": "object",
"properties": {
"product_code": "GY24791",
"unit": "EA",
"description": "BLACK BEANS DRY",
"quantity_shipped": 1,
"unit_price": 1.91,
"extended_price": 1.91
}
},
{
"type": "object",
"properties": {
"product_code": "GY24861",
"unit": "EA",
"description": "RED KIDNEY BEAN SMALL",
"quantity_shipped": 0,
"unit_price": 1.94,
"extended_price": 1.94
}
},
{
"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": "3.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\": \"569515\",\n \"invoice_date\": \"2025-07-14\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821801\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE RED\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 7.21\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.31,\n \"extended_price\": 7.73\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\": \"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\": \"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\": \"3005601\",\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\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\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 \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24861\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEAN SMALL\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.94,\n \"extended_price\": 1.94\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": "7e5dec15-14c1-41f6-a2a6-83639a2a6ee1"
},
{
"text": "{\n \"invoice_number\": \"569608\",\n \"invoice_date\": \"2025-07-15\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660491\",\n \"unit\": \"EA\",\n \"description\": \"VEGEBURGER GRILLERS PATTY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 18.43,\n \"extended_price\": 18.43\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\": \"2828801\",\n \"unit\": \"PD\",\n \"description\": \"EGGPLANT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.87,\n \"extended_price\": 6.73\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.68,\n \"extended_price\": 3.22\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.46,\n \"extended_price\": 3.81\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011151\",\n \"unit\": \"EA\",\n \"description\": \"QUINOA TRI-COLOR\",\n \"quantity_shipped\": 1,\n \"unit_price\": 7.58,\n \"extended_price\": 7.58\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4024801\",\n \"unit\": \"EA\",\n \"description\": \"SALT IODIZED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.27,\n \"extended_price\": 2.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5021611\",\n \"unit\": \"EA\",\n \"description\": \"TUMERIC GROUND\",\n \"quantity_shipped\": 1,\n \"unit_price\": 8.33,\n \"extended_price\": 8.33\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24861\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEAN SMALL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.94,\n \"extended_price\": 4.01\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY39511\",\n \"unit\": \"PK\",\n \"description\": \"LASAGNE\",\n \"quantity_shipped\": 0,\n \"unit_price\": 4.01,\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": "9d529776-fd71-40e0-ae13-85b4e5865090",
"chatMessageId": "5692ecd9-e1ab-4170-8ca5-64b2bf1888e5",
"executionId": "cb62e652-4c67-49e5-a739-24abc116d45c",
"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": "4.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\": \"569608\",\n \"invoice_date\": \"2025-07-15\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660491\",\n \"unit\": \"EA\",\n \"description\": \"VEGEBURGER GRILLERS PATTY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 18.43,\n \"extended_price\": 18.43\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\": \"2828801\",\n \"unit\": \"PD\",\n \"description\": \"EGGPLANT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.87,\n \"extended_price\": 6.73\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.68,\n \"extended_price\": 3.22\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.46,\n \"extended_price\": 3.81\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011151\",\n \"unit\": \"EA\",\n \"description\": \"QUINOA TRI-COLOR\",\n \"quantity_shipped\": 1,\n \"unit_price\": 7.58,\n \"extended_price\": 7.58\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4024801\",\n \"unit\": \"EA\",\n \"description\": \"SALT IODIZED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.27,\n \"extended_price\": 2.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5021611\",\n \"unit\": \"EA\",\n \"description\": \"TUMERIC GROUND\",\n \"quantity_shipped\": 1,\n \"unit_price\": 8.33,\n \"extended_price\": 8.33\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24861\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEAN SMALL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.94,\n \"extended_price\": 4.01\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY39511\",\n \"unit\": \"PK\",\n \"description\": \"LASAGNE\",\n \"quantity_shipped\": 0,\n \"unit_price\": 4.01,\n \"extended_price\": 0\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194072630,
"end": 1756194085693,
"delta": 13063
},
"invoice_number": "569608",
"invoice_date": "2025-07-15",
"vendor_name": "SUPA VALU, LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660491",
"unit": "EA",
"description": "VEGEBURGER GRILLERS PATTY",
"quantity_shipped": 1,
"unit_price": 18.43,
"extended_price": 18.43
}
},
{
"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": "2828801",
"unit": "PD",
"description": "EGGPLANT",
"quantity_shipped": 3,
"unit_price": 1.87,
"extended_price": 6.73
}
},
{
"type": "object",
"properties": {
"product_code": "2839401",
"unit": "PD",
"description": "PEPPER GREEN MED",
"quantity_shipped": 1,
"unit_price": 2.68,
"extended_price": 3.22
}
},
{
"type": "object",
"properties": {
"product_code": "2840601",
"unit": "PD",
"description": "PEPPER RED BELL",
"quantity_shipped": 1,
"unit_price": 3.46,
"extended_price": 3.81
}
},
{
"type": "object",
"properties": {
"product_code": "4011151",
"unit": "EA",
"description": "QUINOA TRI-COLOR",
"quantity_shipped": 1,
"unit_price": 7.58,
"extended_price": 7.58
}
},
{
"type": "object",
"properties": {
"product_code": "4024801",
"unit": "EA",
"description": "SALT IODIZED",
"quantity_shipped": 1,
"unit_price": 2.27,
"extended_price": 2.27
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 2,
"unit_price": 3.28,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "5021611",
"unit": "EA",
"description": "TUMERIC GROUND",
"quantity_shipped": 1,
"unit_price": 8.33,
"extended_price": 8.33
}
},
{
"type": "object",
"properties": {
"product_code": "GY24861",
"unit": "EA",
"description": "RED KIDNEY BEAN SMALL",
"quantity_shipped": 1,
"unit_price": 1.94,
"extended_price": 4.01
}
},
{
"type": "object",
"properties": {
"product_code": "GY39511",
"unit": "PK",
"description": "LASAGNE",
"quantity_shipped": 0,
"unit_price": 4.01,
"extended_price": 0
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "4.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\": \"569608\",\n \"invoice_date\": \"2025-07-15\",\n \"vendor_name\": \"SUPA VALU, LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660491\",\n \"unit\": \"EA\",\n \"description\": \"VEGEBURGER GRILLERS PATTY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 18.43,\n \"extended_price\": 18.43\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\": \"2828801\",\n \"unit\": \"PD\",\n \"description\": \"EGGPLANT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.87,\n \"extended_price\": 6.73\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.68,\n \"extended_price\": 3.22\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.46,\n \"extended_price\": 3.81\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011151\",\n \"unit\": \"EA\",\n \"description\": \"QUINOA TRI-COLOR\",\n \"quantity_shipped\": 1,\n \"unit_price\": 7.58,\n \"extended_price\": 7.58\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4024801\",\n \"unit\": \"EA\",\n \"description\": \"SALT IODIZED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.27,\n \"extended_price\": 2.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5021611\",\n \"unit\": \"EA\",\n \"description\": \"TUMERIC GROUND\",\n \"quantity_shipped\": 1,\n \"unit_price\": 8.33,\n \"extended_price\": 8.33\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24861\",\n \"unit\": \"EA\",\n \"description\": \"RED KIDNEY BEAN SMALL\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.94,\n \"extended_price\": 4.01\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY39511\",\n \"unit\": \"PK\",\n \"description\": \"LASAGNE\",\n \"quantity_shipped\": 0,\n \"unit_price\": 4.01,\n \"extended_price\": 0\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "9d529776-fd71-40e0-ae13-85b4e5865090"
},
{
"text": "{\n \"invoice_number\": \"570052\",\n \"invoice_date\": \"2025-07-23\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\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\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.05\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.28,\n \"extended_price\": 4.22\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.46,\n \"extended_price\": 7.63\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\": 2.09\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.31,\n \"extended_price\": 6.55\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2824601\",\n \"unit\": \"EA\",\n \"description\": \"CELERY CELLO SLEEVED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.45,\n \"extended_price\": 2.45\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.31,\n \"extended_price\": 2.66\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2828401\",\n \"unit\": \"EA\",\n \"description\": \"CUCUMBER SELECT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.33,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.07,\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\": 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": "51d0047d-6d89-46b2-bd94-c6e99b56b282",
"chatMessageId": "ae02af06-8c16-4afc-a0de-9d26e2e98452",
"executionId": "56de1424-a1f6-49b6-9050-cf7f5803a334",
"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": "5.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\": \"570052\",\n \"invoice_date\": \"2025-07-23\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\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\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.05\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.28,\n \"extended_price\": 4.22\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.46,\n \"extended_price\": 7.63\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\": 2.09\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.31,\n \"extended_price\": 6.55\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2824601\",\n \"unit\": \"EA\",\n \"description\": \"CELERY CELLO SLEEVED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.45,\n \"extended_price\": 2.45\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.31,\n \"extended_price\": 2.66\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2828401\",\n \"unit\": \"EA\",\n \"description\": \"CUCUMBER SELECT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.33,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.07,\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\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194087675,
"end": 1756194110859,
"delta": 23184
},
"invoice_number": "570052",
"invoice_date": "2025-07-23",
"vendor_name": "SUPA VALU,LTD.",
"line_items": [
{
"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": "PD",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 3,
"unit_price": 1.19,
"extended_price": 4.05
}
},
{
"type": "object",
"properties": {
"product_code": "2807201",
"unit": "LB",
"description": "ONION YELLOW JUMBO",
"quantity_shipped": 3,
"unit_price": 1.28,
"extended_price": 4.22
}
},
{
"type": "object",
"properties": {
"product_code": "2811401",
"unit": "LB",
"description": "TOMATO VINE RIPE 6X6",
"quantity_shipped": 3,
"unit_price": 2.46,
"extended_price": 7.63
}
},
{
"type": "object",
"properties": {
"product_code": "2821201",
"unit": "LB",
"description": "CABBAGE GREEN",
"quantity_shipped": 1,
"unit_price": 1.16,
"extended_price": 2.09
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 5,
"unit_price": 1.31,
"extended_price": 6.55
}
},
{
"type": "object",
"properties": {
"product_code": "2824601",
"unit": "EA",
"description": "CELERY CELLO SLEEVED",
"quantity_shipped": 1,
"unit_price": 2.45,
"extended_price": 2.45
}
},
{
"type": "object",
"properties": {
"product_code": "2825401",
"unit": "EA",
"description": "CELERY EAST 30CT",
"quantity_shipped": 0,
"unit_price": 2.31,
"extended_price": 2.66
}
},
{
"type": "object",
"properties": {
"product_code": "2828401",
"unit": "EA",
"description": "CUCUMBER SELECT",
"quantity_shipped": 2,
"unit_price": 1.33,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 2,
"unit_price": 3.28,
"extended_price": 4.2
}
},
{
"type": "object",
"properties": {
"product_code": "GY24781",
"unit": "EA",
"description": "CHIC PEAS DRY",
"quantity_shipped": 1,
"unit_price": 2.07,
"extended_price": 4.2
}
},
{
"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": "5.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\": \"570052\",\n \"invoice_date\": \"2025-07-23\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\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\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.05\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.28,\n \"extended_price\": 4.22\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 3,\n \"unit_price\": 2.46,\n \"extended_price\": 7.63\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\": 2.09\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.31,\n \"extended_price\": 6.55\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2824601\",\n \"unit\": \"EA\",\n \"description\": \"CELERY CELLO SLEEVED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.45,\n \"extended_price\": 2.45\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 2.31,\n \"extended_price\": 2.66\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2828401\",\n \"unit\": \"EA\",\n \"description\": \"CUCUMBER SELECT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 1.33,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.07,\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\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "51d0047d-6d89-46b2-bd94-c6e99b56b282"
},
{
"text": "{\n \"invoice_number\": \"570268\",\n \"invoice_date\": \"2025-07-28\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA-\",\n \"line_items\": [\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\": \"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\": 1.9,\n \"unit_price\": 2.07,\n \"extended_price\": 3.93\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"LB\",\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\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.68,\n \"extended_price\": 17.14\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 13.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2830401\",\n \"unit\": \"LB\",\n \"description\": \"GARLIC JUMBO\",\n \"quantity_shipped\": 2,\n \"unit_price\": 4.07,\n \"extended_price\": 5.29\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 2,\n \"unit_price\": 4.75,\n \"extended_price\": 11.4\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\": 4.23,\n \"extended_price\": 11.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT *CUT*\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.86,\n \"extended_price\": 4.7\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3005601\",\n \"unit\": \"EA\",\n \"description\": \"TOFU (FIRM 2\/PC)\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.26,\n \"extended_price\": 3.72\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4026001\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN DARK\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 4.26\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"7003461\",\n \"unit\": \"PK\",\n \"description\": \"DELI CONT LID CLEAR 8-32Z\",\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\": \"7401001\",\n \"unit\": \"EA\",\n \"description\": \"DELI WRAP 10X10, 75 12\/500\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.71,\n \"extended_price\": 10.71\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"7401201\",\n \"unit\": \"EA\",\n \"description\": \"DELI WRAP 12X10, 75 12\/500\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.71,\n \"extended_price\": 10.71\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": "e12fa214-a790-4d4b-9d73-6281f2c7f2ad",
"chatMessageId": "863bb840-68d6-44d6-8022-2db3d52695ed",
"executionId": "ddcf35d4-7ee1-4376-b1c7-53f1878502d5",
"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": "6.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\": \"570268\",\n \"invoice_date\": \"2025-07-28\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA-\",\n \"line_items\": [\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\": \"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\": 1.9,\n \"unit_price\": 2.07,\n \"extended_price\": 3.93\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"LB\",\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\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.68,\n \"extended_price\": 17.14\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 13.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2830401\",\n \"unit\": \"LB\",\n \"description\": \"GARLIC JUMBO\",\n \"quantity_shipped\": 2,\n \"unit_price\": 4.07,\n \"extended_price\": 5.29\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 2,\n \"unit_price\": 4.75,\n \"extended_price\": 11.4\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\": 4.23,\n \"extended_price\": 11.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT *CUT*\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.86,\n \"extended_price\": 4.7\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3005601\",\n \"unit\": \"EA\",\n \"description\": \"TOFU (FIRM 2\/PC)\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.26,\n \"extended_price\": 3.72\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4026001\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN DARK\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 4.26\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"7003461\",\n \"unit\": \"PK\",\n \"description\": \"DELI CONT LID CLEAR 8-32Z\",\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\": \"7401001\",\n \"unit\": \"EA\",\n \"description\": \"DELI WRAP 10X10, 75 12\/500\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.71,\n \"extended_price\": 10.71\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"7401201\",\n \"unit\": \"EA\",\n \"description\": \"DELI WRAP 12X10, 75 12\/500\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.71,\n \"extended_price\": 10.71\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194112960,
"end": 1756194140690,
"delta": 27730
},
"invoice_number": "570268",
"invoice_date": "2025-07-28",
"vendor_name": "SUPA VALU,LTD.-TORTOLA-",
"line_items": [
{
"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": "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": 1.9,
"unit_price": 2.07,
"extended_price": 3.93
}
},
{
"type": "object",
"properties": {
"product_code": "2815201",
"unit": "LB",
"description": "KALE",
"quantity_shipped": 1,
"unit_price": 2.18,
"extended_price": 2.18
}
},
{
"type": "object",
"properties": {
"product_code": "2819201",
"unit": "LB",
"description": "BEET ROOT",
"quantity_shipped": 10,
"unit_price": 1.68,
"extended_price": 17.14
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 10,
"unit_price": 1.31,
"extended_price": 13.62
}
},
{
"type": "object",
"properties": {
"product_code": "2830401",
"unit": "LB",
"description": "GARLIC JUMBO",
"quantity_shipped": 2,
"unit_price": 4.07,
"extended_price": 5.29
}
},
{
"type": "object",
"properties": {
"product_code": "2839401",
"unit": "PD",
"description": "PEPPER GREEN MED",
"quantity_shipped": 2,
"unit_price": 4.75,
"extended_price": 11.4
}
},
{
"type": "object",
"properties": {
"product_code": "2840601",
"unit": "PD",
"description": "PEPPER RED BELL",
"quantity_shipped": 2,
"unit_price": 4.23,
"extended_price": 11.84
}
},
{
"type": "object",
"properties": {
"product_code": "2850601",
"unit": "#",
"description": "GINGER ROOT *CUT*",
"quantity_shipped": 1,
"unit_price": 1.86,
"extended_price": 4.7
}
},
{
"type": "object",
"properties": {
"product_code": "3005601",
"unit": "EA",
"description": "TOFU (FIRM 2\/PC)",
"quantity_shipped": 1,
"unit_price": 4.26,
"extended_price": 3.72
}
},
{
"type": "object",
"properties": {
"product_code": "4026001",
"unit": "EA",
"description": "SUGAR BROWN DARK",
"quantity_shipped": 1,
"unit_price": 3.28,
"extended_price": 4.26
}
},
{
"type": "object",
"properties": {
"product_code": "7003461",
"unit": "PK",
"description": "DELI CONT LID CLEAR 8-32Z",
"quantity_shipped": 1,
"unit_price": 3.28,
"extended_price": 3.28
}
},
{
"type": "object",
"properties": {
"product_code": "7401001",
"unit": "EA",
"description": "DELI WRAP 10X10, 75 12\/500",
"quantity_shipped": 1,
"unit_price": 10.71,
"extended_price": 10.71
}
},
{
"type": "object",
"properties": {
"product_code": "7401201",
"unit": "EA",
"description": "DELI WRAP 12X10, 75 12\/500",
"quantity_shipped": 1,
"unit_price": 10.71,
"extended_price": 10.71
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "6.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\": \"570268\",\n \"invoice_date\": \"2025-07-28\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA-\",\n \"line_items\": [\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\": \"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\": 1.9,\n \"unit_price\": 2.07,\n \"extended_price\": 3.93\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2815201\",\n \"unit\": \"LB\",\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\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.68,\n \"extended_price\": 17.14\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 13.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2830401\",\n \"unit\": \"LB\",\n \"description\": \"GARLIC JUMBO\",\n \"quantity_shipped\": 2,\n \"unit_price\": 4.07,\n \"extended_price\": 5.29\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2839401\",\n \"unit\": \"PD\",\n \"description\": \"PEPPER GREEN MED\",\n \"quantity_shipped\": 2,\n \"unit_price\": 4.75,\n \"extended_price\": 11.4\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\": 4.23,\n \"extended_price\": 11.84\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"#\",\n \"description\": \"GINGER ROOT *CUT*\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.86,\n \"extended_price\": 4.7\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3005601\",\n \"unit\": \"EA\",\n \"description\": \"TOFU (FIRM 2\/PC)\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.26,\n \"extended_price\": 3.72\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4026001\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN DARK\",\n \"quantity_shipped\": 1,\n \"unit_price\": 3.28,\n \"extended_price\": 4.26\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"7003461\",\n \"unit\": \"PK\",\n \"description\": \"DELI CONT LID CLEAR 8-32Z\",\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\": \"7401001\",\n \"unit\": \"EA\",\n \"description\": \"DELI WRAP 10X10, 75 12\/500\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.71,\n \"extended_price\": 10.71\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"7401201\",\n \"unit\": \"EA\",\n \"description\": \"DELI WRAP 12X10, 75 12\/500\",\n \"quantity_shipped\": 1,\n \"unit_price\": 10.71,\n \"extended_price\": 10.71\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "e12fa214-a790-4d4b-9d73-6281f2c7f2ad"
},
{
"text": "{\n \"invoice_number\": \"570271\",\n \"invoice_date\": \"2025-07-28\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA-\",\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\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821801\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE RED\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.31,\n \"extended_price\": 5.11\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\": \"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\": \"3005601\",\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\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011151\",\n \"unit\": \"EA\",\n \"description\": \"QUINOA TRI-COLOR\",\n \"quantity_shipped\": 1,\n \"unit_price\": 7.58,\n \"extended_price\": 7.58\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4080471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GX26121\",\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": "cc1211fa-07ee-45c5-8614-b28db5d09174",
"chatMessageId": "4f533fda-fc3c-4589-b3c4-46fdf7e3cdf8",
"executionId": "d78a241d-9085-40cb-acd4-2e74297b69c1",
"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": "7.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\": \"570271\",\n \"invoice_date\": \"2025-07-28\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA-\",\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\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821801\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE RED\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.31,\n \"extended_price\": 5.11\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\": \"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\": \"3005601\",\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\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011151\",\n \"unit\": \"EA\",\n \"description\": \"QUINOA TRI-COLOR\",\n \"quantity_shipped\": 1,\n \"unit_price\": 7.58,\n \"extended_price\": 7.58\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4080471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GX26121\",\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": 1756194142870,
"end": 1756194160803,
"delta": 17933
},
"invoice_number": "570271",
"invoice_date": "2025-07-28",
"vendor_name": "SUPA VALU,LTD.-TORTOLA-",
"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": "2801601",
"unit": "PD",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 3,
"unit_price": 1.19,
"extended_price": 4.4
}
},
{
"type": "object",
"properties": {
"product_code": "2821801",
"unit": "LB",
"description": "CABBAGE RED",
"quantity_shipped": 3,
"unit_price": 1.31,
"extended_price": 5.11
}
},
{
"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": "2856601",
"unit": "EA",
"description": "THYME FRESH",
"quantity_shipped": 1,
"unit_price": 1.4,
"extended_price": 1.4
}
},
{
"type": "object",
"properties": {
"product_code": "3005601",
"unit": "EA",
"description": "TOFU (FIRM 2\/PC)",
"quantity_shipped": 1,
"unit_price": 4.7,
"extended_price": 4.7
}
},
{
"type": "object",
"properties": {
"product_code": "4002801",
"unit": "EA",
"description": "BARILLA LINGUINI #13",
"quantity_shipped": 1,
"unit_price": 2.56,
"extended_price": 2.56
}
},
{
"type": "object",
"properties": {
"product_code": "4011151",
"unit": "EA",
"description": "QUINOA TRI-COLOR",
"quantity_shipped": 1,
"unit_price": 7.58,
"extended_price": 7.58
}
},
{
"type": "object",
"properties": {
"product_code": "4080471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 2,
"unit_price": 3.28,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "GX26121",
"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": "7.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\": \"570271\",\n \"invoice_date\": \"2025-07-28\",\n \"vendor_name\": \"SUPA VALU,LTD.-TORTOLA-\",\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\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.19,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821801\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE RED\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.31,\n \"extended_price\": 5.11\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\": \"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\": \"3005601\",\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\": \"4002801\",\n \"unit\": \"EA\",\n \"description\": \"BARILLA LINGUINI #13\",\n \"quantity_shipped\": 1,\n \"unit_price\": 2.56,\n \"extended_price\": 2.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4011151\",\n \"unit\": \"EA\",\n \"description\": \"QUINOA TRI-COLOR\",\n \"quantity_shipped\": 1,\n \"unit_price\": 7.58,\n \"extended_price\": 7.58\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4080471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GX26121\",\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": "cc1211fa-07ee-45c5-8614-b28db5d09174"
},
{
"text": "{\n \"invoice_number\": \"570346\",\n \"invoice_date\": \"2025-07-29\",\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\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.26,\n \"extended_price\": 3.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 6.81\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\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\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.09,\n \"extended_price\": 4.81\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\": 2.62,\n \"extended_price\": 2.88\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"CW\",\n \"description\": \"GINGER ROOT\",\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\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.43,\n \"extended_price\": 3.43\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5004401\",\n \"unit\": \"EA\",\n \"description\": \"CUMIN GROUND\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.97,\n \"extended_price\": 1.97\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY247411\",\n \"unit\": \"PK\",\n \"description\": \"RED KIDNEY BEANS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"PK\",\n \"description\": \"BLACK EYE PEAS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 4.14\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY39511\",\n \"unit\": \"PK\",\n \"description\": \"LASAGNE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.01,\n \"extended_price\": 4.01\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": "a089fd51-87a2-4cb6-8d4b-eea6cd828b80",
"chatMessageId": "d874ee1a-599e-4280-bb3e-4083b168fa73",
"executionId": "9e8f0a0b-0b5c-4eee-89c6-15b75009d60e",
"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": "8.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\": \"570346\",\n \"invoice_date\": \"2025-07-29\",\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\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.26,\n \"extended_price\": 3.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 6.81\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\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\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.09,\n \"extended_price\": 4.81\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\": 2.62,\n \"extended_price\": 2.88\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"CW\",\n \"description\": \"GINGER ROOT\",\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\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.43,\n \"extended_price\": 3.43\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5004401\",\n \"unit\": \"EA\",\n \"description\": \"CUMIN GROUND\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.97,\n \"extended_price\": 1.97\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY247411\",\n \"unit\": \"PK\",\n \"description\": \"RED KIDNEY BEANS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"PK\",\n \"description\": \"BLACK EYE PEAS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 4.14\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY39511\",\n \"unit\": \"PK\",\n \"description\": \"LASAGNE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.01,\n \"extended_price\": 4.01\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194162470,
"end": 1756194175915,
"delta": 13445
},
"invoice_number": "570346",
"invoice_date": "2025-07-29",
"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": "2807201",
"unit": "LB",
"description": "ONION YELLOW JUMBO",
"quantity_shipped": 3,
"unit_price": 1.26,
"extended_price": 3.78
}
},
{
"type": "object",
"properties": {
"product_code": "2819201",
"unit": "LB",
"description": "BEET ROOT",
"quantity_shipped": 5,
"unit_price": 1.31,
"extended_price": 6.81
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 1,
"unit_price": 2.31,
"extended_price": 2.31
}
},
{
"type": "object",
"properties": {
"product_code": "2825401",
"unit": "EA",
"description": "CELERY EAST 30CT",
"quantity_shipped": 2,
"unit_price": 2.09,
"extended_price": 4.81
}
},
{
"type": "object",
"properties": {
"product_code": "2828801",
"unit": "PD",
"description": "EGGPLANT",
"quantity_shipped": 2,
"unit_price": 2.62,
"extended_price": 2.88
}
},
{
"type": "object",
"properties": {
"product_code": "2850601",
"unit": "CW",
"description": "GINGER ROOT",
"quantity_shipped": 1,
"unit_price": 3.28,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 2,
"unit_price": 3.43,
"extended_price": 3.43
}
},
{
"type": "object",
"properties": {
"product_code": "5004401",
"unit": "EA",
"description": "CUMIN GROUND",
"quantity_shipped": 1,
"unit_price": 1.97,
"extended_price": 1.97
}
},
{
"type": "object",
"properties": {
"product_code": "GY247411",
"unit": "PK",
"description": "RED KIDNEY BEANS DRY",
"quantity_shipped": 2,
"unit_price": 2.03,
"extended_price": 2.03
}
},
{
"type": "object",
"properties": {
"product_code": "GY24781",
"unit": "PK",
"description": "BLACK EYE PEAS DRY",
"quantity_shipped": 2,
"unit_price": 2.07,
"extended_price": 4.14
}
},
{
"type": "object",
"properties": {
"product_code": "GY39511",
"unit": "PK",
"description": "LASAGNE",
"quantity_shipped": 1,
"unit_price": 4.01,
"extended_price": 4.01
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "8.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\": \"570346\",\n \"invoice_date\": \"2025-07-29\",\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\": \"2807201\",\n \"unit\": \"LB\",\n \"description\": \"ONION YELLOW JUMBO\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.26,\n \"extended_price\": 3.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819201\",\n \"unit\": \"LB\",\n \"description\": \"BEET ROOT\",\n \"quantity_shipped\": 5,\n \"unit_price\": 1.31,\n \"extended_price\": 6.81\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\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\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.09,\n \"extended_price\": 4.81\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\": 2.62,\n \"extended_price\": 2.88\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2850601\",\n \"unit\": \"CW\",\n \"description\": \"GINGER ROOT\",\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\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.43,\n \"extended_price\": 3.43\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"5004401\",\n \"unit\": \"EA\",\n \"description\": \"CUMIN GROUND\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.97,\n \"extended_price\": 1.97\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY247411\",\n \"unit\": \"PK\",\n \"description\": \"RED KIDNEY BEANS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.03,\n \"extended_price\": 2.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"PK\",\n \"description\": \"BLACK EYE PEAS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 4.14\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY39511\",\n \"unit\": \"PK\",\n \"description\": \"LASAGNE\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.01,\n \"extended_price\": 4.01\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "a089fd51-87a2-4cb6-8d4b-eea6cd828b80"
},
{
"text": "{\n \"invoice_number\": \"570393\",\n \"invoice_date\": \"2025-07-30\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTAN SHEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 13.78,\n \"extended_price\": 13.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/.5#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 7,\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\": 6,\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\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.02,\n \"extended_price\": 6.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"EA\",\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\": \"2834801\",\n \"unit\": \"EA\",\n \"description\": \"PARSLEY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.15,\n \"extended_price\": 1.15\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.62,\n \"extended_price\": 6.81\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\": \"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\": \"5017561\",\n \"unit\": \"EA\",\n \"description\": \"SEASONING ITALIAN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.58,\n \"extended_price\": 4.58\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": "7d31f047-92dd-4a56-a4cd-4a188ac63545",
"chatMessageId": "ccd1edd7-3888-4642-b190-8f6fd1f76bad",
"executionId": "45a876db-b1be-433f-ad2b-90c9ee192825",
"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": "9.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\": \"570393\",\n \"invoice_date\": \"2025-07-30\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTAN SHEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 13.78,\n \"extended_price\": 13.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/.5#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 7,\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\": 6,\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\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.02,\n \"extended_price\": 6.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"EA\",\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\": \"2834801\",\n \"unit\": \"EA\",\n \"description\": \"PARSLEY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.15,\n \"extended_price\": 1.15\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.62,\n \"extended_price\": 6.81\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\": \"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\": \"5017561\",\n \"unit\": \"EA\",\n \"description\": \"SEASONING ITALIAN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.58,\n \"extended_price\": 4.58\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194177988,
"end": 1756194190161,
"delta": 12173
},
"invoice_number": "570393",
"invoice_date": "2025-07-30",
"vendor_name": "SUPA VALU,LTD.",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "1217181",
"unit": "EA",
"description": "PLANTAN SHEET SLICED",
"quantity_shipped": 1,
"unit_price": 13.78,
"extended_price": 13.78
}
},
{
"type": "object",
"properties": {
"product_code": "1217801",
"unit": "EA",
"description": "STRAWBERRY SLICED 6\/.5#",
"quantity_shipped": 3,
"unit_price": 7,
"extended_price": 21
}
},
{
"type": "object",
"properties": {
"product_code": "2225601",
"unit": "PK",
"description": "PITA WHEAT TOUFAYAN",
"quantity_shipped": 6,
"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": "2811401",
"unit": "LB",
"description": "TOMATO VINE RIPE 6X6",
"quantity_shipped": 2,
"unit_price": 3.02,
"extended_price": 6.03
}
},
{
"type": "object",
"properties": {
"product_code": "2816201",
"unit": "EA",
"description": "SPINACH CELLO",
"quantity_shipped": 1,
"unit_price": 3.38,
"extended_price": 3.38
}
},
{
"type": "object",
"properties": {
"product_code": "2834801",
"unit": "EA",
"description": "PARSLEY",
"quantity_shipped": 1,
"unit_price": 1.15,
"extended_price": 1.15
}
},
{
"type": "object",
"properties": {
"product_code": "2850601",
"unit": "#",
"description": "GINGER ROOT",
"quantity_shipped": 2,
"unit_price": 2.62,
"extended_price": 6.81
}
},
{
"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": "3410580",
"unit": "CS",
"description": "KS WATER",
"quantity_shipped": 1,
"unit_price": 10.16,
"extended_price": 10.16
}
},
{
"type": "object",
"properties": {
"product_code": "5017561",
"unit": "EA",
"description": "SEASONING ITALIAN",
"quantity_shipped": 1,
"unit_price": 4.58,
"extended_price": 4.58
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "9.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\": \"570393\",\n \"invoice_date\": \"2025-07-30\",\n \"vendor_name\": \"SUPA VALU,LTD.\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTAN SHEET SLICED\",\n \"quantity_shipped\": 1,\n \"unit_price\": 13.78,\n \"extended_price\": 13.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"1217801\",\n \"unit\": \"EA\",\n \"description\": \"STRAWBERRY SLICED 6\/.5#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 7,\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\": 6,\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\": \"2811401\",\n \"unit\": \"LB\",\n \"description\": \"TOMATO VINE RIPE 6X6\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.02,\n \"extended_price\": 6.03\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2816201\",\n \"unit\": \"EA\",\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\": \"2834801\",\n \"unit\": \"EA\",\n \"description\": \"PARSLEY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.15,\n \"extended_price\": 1.15\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.62,\n \"extended_price\": 6.81\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\": \"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\": \"5017561\",\n \"unit\": \"EA\",\n \"description\": \"SEASONING ITALIAN\",\n \"quantity_shipped\": 1,\n \"unit_price\": 4.58,\n \"extended_price\": 4.58\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "7d31f047-92dd-4a56-a4cd-4a188ac63545"
},
{
"text": "{\n \"invoice_number\": \"570418\",\n \"invoice_date\": \"2025-07-30\",\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\": \"PD\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 5.27,\n \"extended_price\": 5.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.19,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 0,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 20,\n \"unit_price\": 1.31,\n \"extended_price\": 27.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\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\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\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\": \"GRAIN QUINOA WHITE ORGANIC\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.1,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24761\",\n \"unit\": \"EA\",\n \"description\": \"LENTILS\",\n \"quantity_shipped\": 2,\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\": 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": "d2e12945-e275-4d5f-b456-e581cc11060c",
"chatMessageId": "ae7589d9-edac-42ba-8b89-f3a17edb4312",
"executionId": "3385e909-daa4-4c7f-8ea6-d135ac2de76b",
"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": "10.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\": \"570418\",\n \"invoice_date\": \"2025-07-30\",\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\": \"PD\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 5.27,\n \"extended_price\": 5.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.19,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 0,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 20,\n \"unit_price\": 1.31,\n \"extended_price\": 27.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\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\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\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\": \"GRAIN QUINOA WHITE ORGANIC\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.1,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24761\",\n \"unit\": \"EA\",\n \"description\": \"LENTILS\",\n \"quantity_shipped\": 2,\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\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194191930,
"end": 1756194207826,
"delta": 15896
},
"invoice_number": "570418",
"invoice_date": "2025-07-30",
"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": "PD",
"description": "OKRA CUT",
"quantity_shipped": 3,
"unit_price": 5.27,
"extended_price": 5.27
}
},
{
"type": "object",
"properties": {
"product_code": "2801601",
"unit": "CW",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 1,
"unit_price": 1.19,
"extended_price": 4.52
}
},
{
"type": "object",
"properties": {
"product_code": "2819801",
"unit": "EA",
"description": "BROCCOLI",
"quantity_shipped": 0,
"unit_price": 4.4,
"extended_price": 4.4
}
},
{
"type": "object",
"properties": {
"product_code": "2821201",
"unit": "LB",
"description": "CABBAGE GREEN",
"quantity_shipped": 20,
"unit_price": 1.31,
"extended_price": 27.38
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 1,
"unit_price": 1.4,
"extended_price": 1.4
}
},
{
"type": "object",
"properties": {
"product_code": "2856601",
"unit": "EA",
"description": "THYME FRESH",
"quantity_shipped": 1,
"unit_price": 6.41,
"extended_price": 6.41
}
},
{
"type": "object",
"properties": {
"product_code": "4011101",
"unit": "EA",
"description": "GRAIN QUINOA WHITE ORGANIC",
"quantity_shipped": 2,
"unit_price": 3.28,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 2,
"unit_price": 2.1,
"extended_price": 4.2
}
},
{
"type": "object",
"properties": {
"product_code": "GY24761",
"unit": "EA",
"description": "LENTILS",
"quantity_shipped": 2,
"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": 4.2,
"extended_price": 4.2
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "10.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\": \"570418\",\n \"invoice_date\": \"2025-07-30\",\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\": \"PD\",\n \"description\": \"OKRA CUT\",\n \"quantity_shipped\": 3,\n \"unit_price\": 5.27,\n \"extended_price\": 5.27\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"CW\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.19,\n \"extended_price\": 4.52\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2819801\",\n \"unit\": \"EA\",\n \"description\": \"BROCCOLI\",\n \"quantity_shipped\": 0,\n \"unit_price\": 4.4,\n \"extended_price\": 4.4\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 20,\n \"unit_price\": 1.31,\n \"extended_price\": 27.38\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\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\": \"2856601\",\n \"unit\": \"EA\",\n \"description\": \"THYME FRESH\",\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\": \"GRAIN QUINOA WHITE ORGANIC\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.1,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24761\",\n \"unit\": \"EA\",\n \"description\": \"LENTILS\",\n \"quantity_shipped\": 2,\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\": 4.2,\n \"extended_price\": 4.2\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "d2e12945-e275-4d5f-b456-e581cc11060c"
},
{
"text": "{\n \"invoice_number\": \"570514\",\n \"invoice_date\": \"2025-08-01\",\n \"vendor_name\": \"SUPA VALU, LTD.-TORTOLA\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660491\",\n \"unit\": \"EA\",\n \"description\": \"VEGEBURGER GRILLERS PATTY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 18.43,\n \"extended_price\": 18.43\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\": \"LB\",\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\": \"2828401\",\n \"unit\": \"LB\",\n \"description\": \"CUCUMBER SELECT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.28,\n \"extended_price\": 2.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410560\",\n \"unit\": \"#\",\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\": \"4026601\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN LIGHT 24\/1#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.66,\n \"extended_price\": 4.98\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": "30fe4d0c-dc29-4ffd-a82d-bfc5f2b706c3",
"chatMessageId": "d883c267-f102-40d6-81b5-98e2ad2f6731",
"executionId": "fa72b691-8d21-4634-a83a-899c60781322",
"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": "11.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\": \"570514\",\n \"invoice_date\": \"2025-08-01\",\n \"vendor_name\": \"SUPA VALU, LTD.-TORTOLA\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660491\",\n \"unit\": \"EA\",\n \"description\": \"VEGEBURGER GRILLERS PATTY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 18.43,\n \"extended_price\": 18.43\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\": \"LB\",\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\": \"2828401\",\n \"unit\": \"LB\",\n \"description\": \"CUCUMBER SELECT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.28,\n \"extended_price\": 2.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410560\",\n \"unit\": \"#\",\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\": \"4026601\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN LIGHT 24\/1#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.66,\n \"extended_price\": 4.98\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194209886,
"end": 1756194221674,
"delta": 11788
},
"invoice_number": "570514",
"invoice_date": "2025-08-01",
"vendor_name": "SUPA VALU, LTD.-TORTOLA",
"line_items": [
{
"type": "object",
"properties": {
"product_code": "0660491",
"unit": "EA",
"description": "VEGEBURGER GRILLERS PATTY",
"quantity_shipped": 1,
"unit_price": 18.43,
"extended_price": 18.43
}
},
{
"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": "LB",
"description": "PINEAPPLE GOLDEN RIPE",
"quantity_shipped": 3,
"unit_price": 4.6,
"extended_price": 13.8
}
},
{
"type": "object",
"properties": {
"product_code": "2828401",
"unit": "LB",
"description": "CUCUMBER SELECT",
"quantity_shipped": 0,
"unit_price": 1.28,
"extended_price": 2.94
}
},
{
"type": "object",
"properties": {
"product_code": "3410560",
"unit": "#",
"description": "KS WATER",
"quantity_shipped": 1,
"unit_price": 10.16,
"extended_price": 10.16
}
},
{
"type": "object",
"properties": {
"product_code": "4026601",
"unit": "EA",
"description": "SUGAR BROWN LIGHT 24\/1#",
"quantity_shipped": 3,
"unit_price": 1.66,
"extended_price": 4.98
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "11.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\": \"570514\",\n \"invoice_date\": \"2025-08-01\",\n \"vendor_name\": \"SUPA VALU, LTD.-TORTOLA\",\n \"line_items\": [\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"0660491\",\n \"unit\": \"EA\",\n \"description\": \"VEGEBURGER GRILLERS PATTY\",\n \"quantity_shipped\": 1,\n \"unit_price\": 18.43,\n \"extended_price\": 18.43\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\": \"LB\",\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\": \"2828401\",\n \"unit\": \"LB\",\n \"description\": \"CUCUMBER SELECT\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.28,\n \"extended_price\": 2.94\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"3410560\",\n \"unit\": \"#\",\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\": \"4026601\",\n \"unit\": \"EA\",\n \"description\": \"SUGAR BROWN LIGHT 24\/1#\",\n \"quantity_shipped\": 3,\n \"unit_price\": 1.66,\n \"extended_price\": 4.98\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "30fe4d0c-dc29-4ffd-a82d-bfc5f2b706c3"
},
{
"text": "{\n \"invoice_number\": \"570518\",\n \"invoice_date\": \"2025-08-01\",\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\": \"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\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTAIN SWEET SLICED\",\n \"quantity_shipped\": 3,\n \"unit_price\": 13.78,\n \"extended_price\": 13.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.19,\n \"extended_price\": 4.64\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.16,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 13.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24761\",\n \"unit\": \"EA\",\n \"description\": \"LENTILS\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.1,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 4.14\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": "25617e23-8b45-45c0-abaf-8f3894c4f412",
"chatMessageId": "83b57647-20df-426f-a402-169fb2ed844b",
"executionId": "e0704a28-7f07-4b9c-8cd8-fc73bc700a3a",
"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": "12.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\": \"570518\",\n \"invoice_date\": \"2025-08-01\",\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\": \"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\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTAIN SWEET SLICED\",\n \"quantity_shipped\": 3,\n \"unit_price\": 13.78,\n \"extended_price\": 13.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.19,\n \"extended_price\": 4.64\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.16,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 13.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24761\",\n \"unit\": \"EA\",\n \"description\": \"LENTILS\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.1,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 4.14\n }\n }\n ]\n}",
"timeMetadata": {
"start": 1756194222958,
"end": 1756194242113,
"delta": 19155
},
"invoice_number": "570518",
"invoice_date": "2025-08-01",
"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": "1212601",
"unit": "EA",
"description": "SPINACH CHOPPED FROZEN",
"quantity_shipped": 1,
"unit_price": 6.12,
"extended_price": 6.12
}
},
{
"type": "object",
"properties": {
"product_code": "1217181",
"unit": "EA",
"description": "PLANTAIN SWEET SLICED",
"quantity_shipped": 3,
"unit_price": 13.78,
"extended_price": 13.78
}
},
{
"type": "object",
"properties": {
"product_code": "2801601",
"unit": "PD",
"description": "POTATO BAKING 90CT",
"quantity_shipped": 1,
"unit_price": 1.19,
"extended_price": 4.64
}
},
{
"type": "object",
"properties": {
"product_code": "2821201",
"unit": "LB",
"description": "CABBAGE GREEN",
"quantity_shipped": 0,
"unit_price": 1.16,
"extended_price": 0
}
},
{
"type": "object",
"properties": {
"product_code": "2823601",
"unit": "PD",
"description": "CARROTS BULK",
"quantity_shipped": 10,
"unit_price": 1.31,
"extended_price": 13.62
}
},
{
"type": "object",
"properties": {
"product_code": "2825401",
"unit": "EA",
"description": "CELERY EAST 30CT",
"quantity_shipped": 2,
"unit_price": 2.31,
"extended_price": 2.31
}
},
{
"type": "object",
"properties": {
"product_code": "4808471",
"unit": "EA",
"description": "COCONUT MILK 1X13.5Z",
"quantity_shipped": 2,
"unit_price": 3.28,
"extended_price": 6.56
}
},
{
"type": "object",
"properties": {
"product_code": "GY24761",
"unit": "EA",
"description": "LENTILS",
"quantity_shipped": 2,
"unit_price": 2.1,
"extended_price": 4.2
}
},
{
"type": "object",
"properties": {
"product_code": "GY24781",
"unit": "EA",
"description": "CHIC PEAS DRY",
"quantity_shipped": 2,
"unit_price": 2.07,
"extended_price": 4.14
}
}
]
},
"state": [],
"chatHistory": [
{
"role": "user",
"content": [
{
"type": "stored-file",
"name": "12.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\": \"570518\",\n \"invoice_date\": \"2025-08-01\",\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\": \"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\": \"1217181\",\n \"unit\": \"EA\",\n \"description\": \"PLANTAIN SWEET SLICED\",\n \"quantity_shipped\": 3,\n \"unit_price\": 13.78,\n \"extended_price\": 13.78\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2801601\",\n \"unit\": \"PD\",\n \"description\": \"POTATO BAKING 90CT\",\n \"quantity_shipped\": 1,\n \"unit_price\": 1.19,\n \"extended_price\": 4.64\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2821201\",\n \"unit\": \"LB\",\n \"description\": \"CABBAGE GREEN\",\n \"quantity_shipped\": 0,\n \"unit_price\": 1.16,\n \"extended_price\": 0\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2823601\",\n \"unit\": \"PD\",\n \"description\": \"CARROTS BULK\",\n \"quantity_shipped\": 10,\n \"unit_price\": 1.31,\n \"extended_price\": 13.62\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"2825401\",\n \"unit\": \"EA\",\n \"description\": \"CELERY EAST 30CT\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.31,\n \"extended_price\": 2.31\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"4808471\",\n \"unit\": \"EA\",\n \"description\": \"COCONUT MILK 1X13.5Z\",\n \"quantity_shipped\": 2,\n \"unit_price\": 3.28,\n \"extended_price\": 6.56\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24761\",\n \"unit\": \"EA\",\n \"description\": \"LENTILS\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.1,\n \"extended_price\": 4.2\n }\n },\n {\n \"type\": \"object\",\n \"properties\": {\n \"product_code\": \"GY24781\",\n \"unit\": \"EA\",\n \"description\": \"CHIC PEAS DRY\",\n \"quantity_shipped\": 2,\n \"unit_price\": 2.07,\n \"extended_price\": 4.14\n }\n }\n ]\n}",
"name": "extract_&_analyze_invoice"
}
]
},
"previousNodeIds": [
"startAgentflow_0"
],
"status": "FINISHED"
}
],
"sessionId": "25617e23-8b45-45c0-abaf-8f3894c4f412"
}
]