Skip to content

Instantly share code, notes, and snippets.

@jon-dixon
Last active June 23, 2026 12:56
Show Gist options
  • Select an option

  • Save jon-dixon/5bb76987b806506f8f84cee69b5d81b6 to your computer and use it in GitHub Desktop.

Select an option

Save jon-dixon/5bb76987b806506f8f84cee69b5d81b6 to your computer and use it in GitHub Desktop.
APEX AI Agent - PO to JSON - Example JSON Output
{
"customerName": "Nimbus Ridge Technologies",
"orderDate": "2026-04-18",
"purchaseOrderNumber": "91842",
"orderCurrency": "USD",
"orderTotal": 521.64,
"shipTo": {
"companyName": "Nimbus Ridge Technologies",
"contactName": "Avery Patel",
"phone": "(858) 555-0147",
"email": "ap.purchasing@example.com",
"address1": "742 Coastal View Road",
"city": "Solana Beach",
"stateProvince": "CA",
"postalCode": "92075",
"country": "US"
},
"billTo": {
"companyName": "Nimbus Ridge Technologies",
"contactName": null,
"phone": null,
"email": null,
"address1": "742 Coastal View Road",
"city": "Solana Beach",
"stateProvince": "CA",
"postalCode": "92075",
"country": "US"
},
"customerNotes": "Business Number: NR-2026-01984",
"shippingInstructions": "Deliver to receiving dock.",
"freightAmount": 18,
"lines": [
{
"lineNumber": 1,
"quantity": 12,
"itemNumber": "ANS-GLC-SX-MM",
"customerItemNumber": "LAB-1162",
"vendorItemNumber": "ANS-GLC-SX-MM",
"manufacturerItemNumber": "NRT-SFP-1G-SX",
"itemDescription": "SFP transceiver, 1GE, 850nm, 550m, multimode, LC connector",
"uom": "Each",
"unitPrice": 24.5,
"lineTotal": 294,
"requestedDate": null,
"lineNotes": null
},
{
"lineNumber": 2,
"quantity": 12,
"itemNumber": "ANS-FIB-OM4-2M",
"customerItemNumber": "LAB-1162",
"vendorItemNumber": "ANS-FIB-OM4-2M",
"manufacturerItemNumber": "FPC-LC-LC-OM4-2M",
"itemDescription": "LambdaLink fiber patch cord, duplex 2.0 mm diameter, aqua, LC-UPC to LC-UPC, OM4 OFNP, 2 meter, low-smoke jacket.",
"uom": "Each",
"unitPrice": 14.25,
"lineTotal": 171,
"requestedDate": null,
"lineNotes": null
}
],
"extractionConfidence": {
"overall": 0.93,
"fields": {
"customerName": 0.98,
"orderDate": 0.99,
"purchaseOrderNumber": 0.99,
"orderCurrency": 0.9,
"orderTotal": 0.99,
"shipTo": 0.96,
"billTo": 0.95,
"customerNotes": 0.78,
"shippingInstructions": 0.98,
"freightAmount": 0.98,
"lines": 0.97
},
"warnings": [
"Vendor name appears in multiple places; customerName resolved to Nimbus Ridge Technologies from document header and shipping/bill-to information.",
"Sales tax and freight tax are shown separately; orderTotal uses final total.",
"Customer item number and vendor/manufacturer item identifiers are both present; itemNumber selected from vendor SKU for fulfillment."
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment