Overview
This example demonstrates a comprehensive data definition for extracting data from purchase orders (POs). It covers buyer information, vendor details, line items, shipping, pricing, and approval workflows for procurement management systems.Use Cases
- Procurement Automation: Extract PO data for automated order processing
- Vendor Management: Track vendor performance and order history
- Inventory Management: Capture ordered quantities for inventory planning
- Accounts Payable: Match POs with invoices for three-way matching
- Spend Analytics: Analyze purchasing patterns and spending by category
- Compliance Tracking: Ensure orders follow approval policies and budgets
Complete Data Definition Structure
YAML Configuration
Copy
Ask AI
slug: purchase-order
name: Purchase Order Data Extraction
description: Extract structured data from purchase orders for procurement and AP systems
taxonomyType: CONTENT
enabled: true
taxons:
# ==========================================
# Document Metadata
# ==========================================
- name: document_metadata
label: Document Metadata
group: true
children:
- name: filename
label: Original Filename
taxonType: STRING
valuePath: METADATA
metadataValue: FILENAME
- name: processing_date
label: Processing Date
taxonType: DATE_TIME
valuePath: METADATA
metadataValue: PROCESSING_DATE
- name: document_hash
label: Document Hash
taxonType: STRING
valuePath: METADATA
metadataValue: CONTENT_HASH
description: SHA-256 hash for document integrity
# ==========================================
# Purchase Order Header
# ==========================================
- name: po_header
label: Purchase Order Header
group: true
children:
- name: po_number
label: PO Number
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The unique purchase order number. Look for "PO#", "Order Number",
"Purchase Order No." in the header. This is the primary identifier.
- name: po_date
label: PO Date
taxonType: DATE
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The date the purchase order was created or issued. Look for "PO Date",
"Order Date", "Issue Date" in the header.
- name: required_by_date
label: Required By Date
taxonType: DATE
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The date by which goods/services are needed. May be labeled
"Delivery Date", "Need By", "Ship By", or "Required Date".
- name: revision_number
label: Revision Number
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Version or revision number if the PO has been amended (e.g., "Rev 1", "v2").
- name: original_po_number
label: Original PO Number
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
If this is a revision or amendment, the original PO number it replaces.
- name: requisition_number
label: Requisition Number
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The requisition or request number that led to this PO.
Look for "Req #", "PR #", "Request No."
- name: buyer_name
label: Buyer Name
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The name of the purchasing agent or buyer who created the PO.
- name: department
label: Department/Cost Center
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The department or cost center this order is charged to.
- name: project_code
label: Project Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Project or job number if this purchase is for a specific project.
# ==========================================
# Buyer/Company Information
# ==========================================
- name: buyer
label: Buyer/Company Information
group: true
description: The organization issuing the purchase order
children:
- name: company_name
label: Company Name
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The legal name of the buying organization. Usually in the header
or "Bill To" section.
- name: address
label: Company Address
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The full address of the buying organization.
- name: city
label: City
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: state_province
label: State/Province
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: postal_code
label: Postal Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: country
label: Country
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: phone
label: Phone
taxonType: PHONE_NUMBER
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: email
label: Email
taxonType: EMAIL_ADDRESS
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
# ==========================================
# Vendor/Supplier Information
# ==========================================
- name: vendor
label: Vendor/Supplier Information
group: true
description: The supplier fulfilling the order
children:
- name: vendor_name
label: Vendor Name
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The legal name of the vendor or supplier. Look in "Vendor",
"Supplier", or "Sold By" sections.
- name: vendor_id
label: Vendor ID/Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The buyer's internal vendor identification code or number.
- name: address
label: Vendor Address
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: "The vendor's business address"
- name: city
label: City
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: state_province
label: State/Province
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: postal_code
label: Postal Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: country
label: Country
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: phone
label: Phone
taxonType: PHONE_NUMBER
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: email
label: Email
taxonType: EMAIL_ADDRESS
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: contact_person
label: Contact Person
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Primary vendor contact for this order"
# ==========================================
# Ship To Information
# ==========================================
- name: ship_to
label: Ship To Information
group: true
description: Delivery destination
children:
- name: location_name
label: Location/Facility Name
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Name of the delivery location (e.g., "Warehouse A", "Main Office").
- name: attention_to
label: Attention To
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Person or department to receive the shipment"
- name: address
label: Shipping Address
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The complete shipping address. Look for "Ship To" section on the PO.
- name: city
label: City
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: state_province
label: State/Province
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: postal_code
label: Postal Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: country
label: Country
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: phone
label: Phone
taxonType: PHONE_NUMBER
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: delivery_instructions
label: Delivery Instructions
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Special delivery instructions (e.g., "Loading dock hours: 8am-5pm",
"Call before delivery").
# ==========================================
# Bill To Information
# ==========================================
- name: bill_to
label: Bill To Information
group: true
description: Invoicing destination (often same as buyer)
children:
- name: company_name
label: Company Name
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The name for invoicing. Look for "Bill To" section. May match buyer info.
- name: address
label: Billing Address
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: city
label: City
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: state_province
label: State/Province
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: postal_code
label: Postal Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: country
label: Country
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
- name: ap_contact
label: AP Contact
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Accounts payable contact person"
- name: ap_email
label: AP Email
taxonType: EMAIL_ADDRESS
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Email for sending invoices"
# ==========================================
# Line Items
# ==========================================
- name: line_items
label: Line Items
group: true
description: Ordered goods and services
children:
- name: line_number
label: Line Number
taxonType: NUMBER
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The line item number (1, 2, 3...). Usually the first column in the line items table.
- name: item_code
label: Item Code/SKU
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The product SKU, item number, or part number. Look for "Item #",
"Part #", "SKU", or "Code" columns.
- name: description
label: Description
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The description of the product or service. This is usually the longest
text field in the line items table.
- name: quantity
label: Quantity Ordered
taxonType: NUMBER
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The quantity being ordered. Look for "Qty", "Quantity", or "Ordered" columns.
- name: unit_of_measure
label: Unit of Measure
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The unit of measure (e.g., "EA" for each, "BOX", "LB", "HR", "FT").
May be labeled "UOM", "Unit", or "U/M".
- name: unit_price
label: Unit Price
taxonType: CURRENCY
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The price per unit. Look for "Unit Price", "Price Each", or "Rate" columns.
- name: line_total
label: Line Total
taxonType: CURRENCY
valuePath: FORMULA
semanticDefinition: "quantity * unit_price"
description: "Calculated total for this line"
- name: discount_percent
label: Discount Percentage
taxonType: PERCENTAGE
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Discount percentage applied to this line item if any.
- name: discount_amount
label: Discount Amount
taxonType: CURRENCY
valuePath: FORMULA
nullable: true
semanticDefinition: "line_total * (discount_percent / 100)"
description: "Calculated discount amount"
- name: net_line_total
label: Net Line Total
taxonType: CURRENCY
valuePath: FORMULA
semanticDefinition: "line_total - COALESCE(discount_amount, 0)"
description: "Line total after discount"
- name: delivery_date
label: Requested Delivery Date
taxonType: DATE
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Delivery date for this specific line item if different from PO-level
required by date.
- name: gl_account
label: GL Account Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The general ledger account code this expense should be charged to.
- name: notes
label: Line Notes
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Any special notes or comments for this line item"
# ==========================================
# Shipping Information
# ==========================================
- name: shipping
label: Shipping Information
group: true
children:
- name: shipping_method
label: Shipping Method
taxonType: SELECTION
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The shipping method or carrier. Look for "Ship Via", "Carrier",
or "Shipping Method" fields.
selectionOptions:
- label: "Ground"
- label: "Express"
- label: "Overnight"
- label: "2-Day"
- label: "Freight"
- label: "Customer Pickup"
- label: "Will Call"
- label: "Other"
- name: shipping_terms
label: Shipping Terms
taxonType: SELECTION
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Who pays shipping costs. Look for "FOB", "Freight Terms", or "Shipping Terms".
selectionOptions:
- label: "FOB Origin" # Buyer pays shipping
- label: "FOB Destination" # Seller pays shipping
- label: "Prepaid" # Seller pays
- label: "Collect" # Buyer pays
- label: "Prepaid & Add" # Seller pays, adds to invoice
- name: carrier
label: Carrier Name
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The shipping carrier name (e.g., "FedEx", "UPS", "USPS", "DHL").
- name: account_number
label: Carrier Account Number
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Buyer's account number with the carrier for billing purposes.
- name: shipping_cost
label: Shipping/Freight Cost
taxonType: CURRENCY
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The cost of shipping if specified on the PO.
- name: handling_cost
label: Handling Cost
taxonType: CURRENCY
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Any handling fees charged"
# ==========================================
# Payment Terms
# ==========================================
- name: payment
label: Payment Terms
group: true
children:
- name: payment_terms
label: Payment Terms
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The payment terms agreed upon. Look for "Payment Terms", "Terms",
or "Net" fields. Common values: "Net 30", "Net 60", "2/10 Net 30", "Due on Receipt".
- name: payment_method
label: Payment Method
taxonType: SELECTION
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
selectionOptions:
- label: "Check"
- label: "ACH/Wire Transfer"
- label: "Credit Card"
- label: "Purchase Card"
- label: "Other"
- name: currency
label: Currency
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
semanticDefinition: |
The currency for all monetary values (USD, EUR, GBP, CAD, etc.).
# ==========================================
# Totals
# ==========================================
- name: totals
label: Totals
group: true
children:
- name: subtotal
label: Subtotal
taxonType: CURRENCY
valuePath: FORMULA
semanticDefinition: "SUM(line_items.net_line_total)"
description: "Sum of all line items after discounts"
- name: discount_total
label: Total Discounts
taxonType: CURRENCY
valuePath: FORMULA
nullable: true
semanticDefinition: "SUM(line_items.discount_amount)"
description: "Total of all line item discounts"
- name: shipping_total
label: Total Shipping & Handling
taxonType: CURRENCY
valuePath: FORMULA
nullable: true
semanticDefinition: |
COALESCE(shipping.shipping_cost, 0) + COALESCE(shipping.handling_cost, 0)
description: "Combined shipping and handling costs"
- name: tax_rate
label: Tax Rate
taxonType: PERCENTAGE
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
The sales tax rate if specified on the PO.
- name: tax_amount
label: Tax Amount
taxonType: CURRENCY
valuePath: FORMULA
nullable: true
semanticDefinition: |
(subtotal + COALESCE(shipping_total, 0)) * (COALESCE(tax_rate, 0) / 100)
description: "Calculated tax on subtotal plus shipping"
- name: total_amount
label: Total PO Amount
taxonType: CURRENCY
valuePath: FORMULA
semanticDefinition: |
subtotal + COALESCE(shipping_total, 0) + COALESCE(tax_amount, 0)
description: "Grand total of the purchase order"
# ==========================================
# Special Instructions and Terms
# ==========================================
- name: instructions
label: Special Instructions and Terms
group: true
children:
- name: special_instructions
label: Special Instructions
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
multiValue: true
semanticDefinition: |
Any special handling, packaging, or fulfillment instructions.
Look for "Special Instructions", "Notes", or "Comments" sections.
- name: terms_and_conditions
label: Terms and Conditions
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Legal terms, return policies, or other contractual language.
May be in footer or separate terms section.
- name: cancellation_policy
label: Cancellation Policy
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Rules for canceling or modifying the order.
- name: warranty_terms
label: Warranty Terms
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Warranty or guarantee information if specified"
# ==========================================
# Approval Workflow
# ==========================================
- name: approval
label: Approval Workflow
group: true
children:
- name: approved_by
label: Approved By
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: |
Name of the person who approved the PO. Look for signature areas
or "Approved By" fields.
- name: approval_date
label: Approval Date
taxonType: DATE
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Date the PO was approved"
- name: signature_present
label: Signature Present
taxonType: BOOLEAN
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Is there an authorized signature on the PO?"
- name: budget_code
label: Budget Code
taxonType: STRING
valuePath: VALUE_OR_ALL_CONTENT
nullable: true
semanticDefinition: "Budget or authorization code if required"
- name: approval_level
label: Approval Level Required
taxonType: SELECTION
valuePath: FORMULA
semanticDefinition: |
IF(totals.total_amount > 50000, "Executive",
IF(totals.total_amount > 10000, "Manager", "Supervisor"))
selectionOptions:
- label: "Supervisor"
- label: "Manager"
- label: "Director"
- label: "Executive"
# ==========================================
# Status and Tracking
# ==========================================
- name: status
label: PO Status and Tracking
group: true
children:
- name: po_status
label: PO Status
taxonType: SELECTION
valuePath: REVIEW
userEditable: true
selectionOptions:
- label: "Draft"
- label: "Pending Approval"
- label: "Approved"
- label: "Sent to Vendor"
- label: "Acknowledged"
- label: "Partially Received"
- label: "Fully Received"
- label: "Invoiced"
- label: "Closed"
- label: "Cancelled"
- name: sent_to_vendor_date
label: Sent to Vendor Date
taxonType: DATE
valuePath: REVIEW
userEditable: true
nullable: true
- name: vendor_confirmation_number
label: Vendor Confirmation Number
taxonType: STRING
valuePath: REVIEW
userEditable: true
nullable: true
description: "Vendor's order confirmation or acknowledgment number"
- name: estimated_delivery
label: Estimated Delivery Date
taxonType: DATE
valuePath: REVIEW
userEditable: true
nullable: true
description: "Vendor's estimated delivery date"
- name: notes
label: Internal Notes
taxonType: STRING
valuePath: REVIEW
userEditable: true
nullable: true
description: "Internal tracking notes"
# ==========================================
# Validation Rules
# ==========================================
validationRules:
# Required Fields
- name: "PO number required"
ruleFormula: "NOT_EMPTY(po_header.po_number)"
messageFormula: '"Purchase order number is required"'
overridable: false
- name: "PO date required"
ruleFormula: "NOT_EMPTY(po_header.po_date)"
messageFormula: '"PO date is required"'
overridable: false
- name: "Vendor name required"
ruleFormula: "NOT_EMPTY(vendor.vendor_name)"
messageFormula: '"Vendor name is required"'
overridable: false
- name: "At least one line item"
ruleFormula: "COUNT(line_items) >= 1"
messageFormula: '"PO must have at least one line item"'
overridable: false
- name: "Ship to address required"
ruleFormula: "NOT_EMPTY(ship_to.address)"
messageFormula: '"Shipping address is required"'
overridable: false
# Date Logic
- name: "PO date not in future"
ruleFormula: "po_header.po_date <= TODAY()"
messageFormula: '"PO date should not be in the future"'
overridable: true
- name: "Required date after PO date"
ruleFormula: |
IS_EMPTY(po_header.required_by_date) OR
po_header.required_by_date >= po_header.po_date
messageFormula: '"Required by date should be on or after PO date"'
overridable: true
- name: "Approval date after or equal to PO date"
ruleFormula: |
IS_EMPTY(approval.approval_date) OR
approval.approval_date >= po_header.po_date
messageFormula: '"Approval date should be on or after PO date"'
overridable: true
# Line Item Validation
- name: "Line quantities must be positive"
ruleFormula: "ALL_VALUES(line_items.quantity) > 0"
messageFormula: '"All line item quantities must be greater than zero"'
overridable: false
- name: "Unit prices must be positive"
ruleFormula: "ALL_VALUES(line_items.unit_price) > 0"
messageFormula: '"All unit prices must be greater than zero"'
overridable: false
- name: "Line numbers unique"
ruleFormula: "UNIQUE(line_items.line_number)"
messageFormula: '"Line numbers must be unique"'
overridable: true
# Financial Validation
- name: "Total amount positive"
ruleFormula: "totals.total_amount > 0"
messageFormula: '"Total PO amount must be greater than zero"'
overridable: false
- name: "Currency specified"
ruleFormula: "NOT_EMPTY(payment.currency)"
messageFormula: '"Currency must be specified"'
overridable: false
- name: "Tax rate reasonable"
ruleFormula: |
IS_EMPTY(totals.tax_rate) OR
(totals.tax_rate >= 0 AND totals.tax_rate <= 25)
messageFormula: '"Tax rate should be between 0% and 25%"'
overridable: true
- name: "Payment terms specified"
ruleFormula: "NOT_EMPTY(payment.payment_terms)"
messageFormula: '"Payment terms should be specified"'
overridable: true
# Approval Validation
- name: "High-value POs require approval"
ruleFormula: |
totals.total_amount <= 10000 OR
NOT_EMPTY(approval.approved_by)
messageFormula: '"POs over $10,000 require approval"'
overridable: false
- name: "Executive approval for large orders"
ruleFormula: |
totals.total_amount <= 50000 OR
(NOT_EMPTY(approval.approved_by) AND
approval.approval_level == "Executive")
messageFormula: '"POs over $50,000 require executive approval"'
overridable: true
- name: "Signature required for approved POs"
conditional: true
conditionalFormula: 'status.po_status IN ["Approved", "Sent to Vendor", "Acknowledged"]'
ruleFormula: "approval.signature_present == true"
messageFormula: '"Approved POs must have an authorized signature"'
overridable: false
# Shipping Validation
- name: "Carrier required for non-pickup orders"
conditional: true
conditionalFormula: 'shipping.shipping_method NOT IN ["Customer Pickup", "Will Call"]'
ruleFormula: "NOT_EMPTY(shipping.carrier)"
messageFormula: '"Carrier name required unless customer pickup"'
overridable: true
- name: "Shipping cost for collect terms"
conditional: true
conditionalFormula: 'shipping.shipping_terms == "Collect"'
ruleFormula: "IS_EMPTY(shipping.shipping_cost)"
messageFormula: '"Shipping cost should not be specified for collect terms"'
overridable: true
# Contact Validation
- name: "Vendor contact information"
ruleFormula: |
NOT_EMPTY(vendor.phone) OR
NOT_EMPTY(vendor.email)
messageFormula: '"At least one vendor contact method (phone or email) required"'
overridable: true
# ==========================================
# Conditional Formatting
# ==========================================
conditionalFormats:
- name: "High-value order"
formula: "totals.total_amount > 50000"
backgroundColor: "#FEF3C7"
textColor: "#92400E"
fontWeight: "bold"
icon: "dollar-sign"
- name: "Urgent delivery"
formula: |
NOT_EMPTY(po_header.required_by_date) AND
po_header.required_by_date <= DATE_ADD(TODAY(), 7)
backgroundColor: "#FED7AA"
textColor: "#9A3412"
icon: "clock"
- name: "Overdue for delivery"
formula: |
NOT_EMPTY(po_header.required_by_date) AND
po_header.required_by_date < TODAY() AND
status.po_status NOT IN ["Fully Received", "Closed", "Cancelled"]
backgroundColor: "#FEE2E2"
textColor: "#991B1B"
fontWeight: "bold"
icon: "exclamation-triangle"
- name: "Pending approval"
formula: 'status.po_status IN ["Draft", "Pending Approval"]'
backgroundColor: "#DBEAFE"
textColor: "#1E40AF"
icon: "hourglass"
- name: "Cancelled order"
formula: 'status.po_status == "Cancelled"'
backgroundColor: "#FEE2E2"
textColor: "#991B1B"
icon: "times-circle"
- name: "Fully received"
formula: 'status.po_status IN ["Fully Received", "Closed"]'
backgroundColor: "#D1FAE5"
textColor: "#065F46"
icon: "check-circle"
- name: "Missing approval for large order"
formula: |
totals.total_amount > 10000 AND
IS_EMPTY(approval.approved_by)
backgroundColor: "#FEE2E2"
textColor: "#991B1B"
fontWeight: "bold"
icon: "warning"
- name: "Multiple line items"
formula: "COUNT(line_items) > 10"
backgroundColor: "#E0E7FF"
textColor: "#3730A3"
icon: "list"
Key Features
Comprehensive Header Information
- PO Identification: Number, date, revision tracking
- Reference Numbers: Requisition, project codes, department tracking
- Buyer Information: Purchasing agent, cost center allocation
Complete Party Details
- Buyer/Company: Issuing organization information
- Vendor/Supplier: Complete vendor details and contacts
- Ship To: Delivery destination with instructions
- Bill To: Invoicing destination for AP processing
Detailed Line Items
- Product Information: Item codes, descriptions, quantities
- Pricing: Unit prices, discounts, calculated totals
- Allocation: GL accounts, delivery dates per line
- Flexible UOM: Support for various units of measure
Shipping and Logistics
- Shipping Methods: Ground, express, overnight, freight, pickup
- Shipping Terms: FOB origin/destination, prepaid, collect
- Carrier Details: Carrier name, account numbers
- Costs: Shipping and handling fee tracking
Financial Management
- Payment Terms: Net 30, 2/10 Net 30, etc.
- Payment Methods: Check, ACH, credit card, purchase card
- Currency Support: Multi-currency handling
- Tax Calculation: Automatic tax computation on subtotal + shipping
Automated Calculations
- Line Totals: Quantity × Unit Price
- Discounts: Percentage-based discounts calculated automatically
- Net Totals: Line totals after discounts
- Subtotal: Sum of all line items
- Tax: Calculated on subtotal + shipping
- Grand Total: Complete PO amount
Approval Workflow
- Approval Tracking: Who approved and when
- Signature Verification: Ensure authorized signatures
- Budget Codes: Track authorization codes
- Dynamic Approval Levels: Based on PO amount (Supervisor < 10k,Manager<50k, Executive ≥ $50k)
Status Tracking
- Lifecycle Management: Draft → Approved → Sent → Received → Closed
- Vendor Communication: Track confirmation numbers and delivery estimates
- Internal Notes: Capture tracking and follow-up information
Validation Strategy
Critical Validations (Non-overridable)
Copy
Ask AI
- PO number required
- PO date required
- Vendor name required
- At least one line item
- Ship to address required
- Line quantities > 0
- Unit prices > 0
- Total amount > 0
- Currency specified
- High-value POs require approval
- Approved POs must have signature
Quality Checks (Overridable)
Copy
Ask AI
- PO date not in future
- Required date after PO date
- Line numbers unique
- Tax rate reasonable (0-25%)
- Payment terms specified
- Vendor contact information
Conditional Business Rules
Copy
Ask AI
- Executive approval for POs > $50k
- Carrier required for non-pickup orders
- Shipping cost logic for collect terms
Conditional Formatting
Provides visual indicators for:- High-value orders (> $50k) - Gold highlight
- Urgent delivery (< 7 days) - Orange warning
- Overdue delivery - Red alert
- Pending approval - Blue information
- Cancelled orders - Red indicator
- Fully received - Green success
- Missing approval (large orders) - Red warning
- Large orders (> 10 line items) - Purple indicator
Usage Tips
For Procurement Teams
- Use
po_headerfields for order tracking and management - Monitor
status.po_statusfor lifecycle management - Track
approvalinformation for compliance - Use
totals.total_amountfor spend analysis
For Accounts Payable
- Extract
vendorandbill_toinformation for invoice matching - Use
paymentterms for payment scheduling - Verify
totalsmatch invoice amounts (three-way matching) - Track
po_numberfor invoice-to-PO reconciliation
For Receiving/Warehouse
- Focus on
ship_toinformation for delivery routing - Use
line_itemsfor receiving verification - Track
shipping.delivery_instructionsfor special handling - Monitor
po_header.required_by_datefor prioritization
For Finance Teams
- Extract
line_items.gl_accountfor accounting allocation - Use
departmentandproject_codefor cost center reporting - Track
totalsfor budget monitoring - Monitor approval levels for spend compliance
Best Practices
- Always Extract Complete Line Items: Quantity, unit price, and description are critical
- Calculate Totals with Formulas: Use FORMULA type for line totals, subtotals, tax, and grand total
- Track Approval Workflow: Capture approver, date, and signature for audit trail
- Validate Financial Data: Ensure quantities and prices are positive, totals are accurate
- Monitor Delivery Dates: Flag urgent and overdue orders for priority handling
- Support Multiple Addresses: Ship To may differ from Bill To or Buyer address
- Handle Revisions: Track original PO numbers when processing amendments
- Capture Special Instructions: Delivery, packaging, and handling notes are important
- Link to Requisitions: Trace POs back to original purchase requests
- Enable Three-Way Matching: Structure data to match PO → Receipt → Invoice
Integration Examples
ERP/Procurement System
Copy
Ask AI
externalName: poNumber → po_header.po_number
externalName: vendorId → vendor.vendor_id
externalName: totalAmount → totals.total_amount
externalName: status → status.po_status
externalName: requiredDate → po_header.required_by_date
Accounts Payable System
Copy
Ask AI
externalName: invoiceMatchPO → po_header.po_number
externalName: vendorName → vendor.vendor_name
externalName: paymentTerms → payment.payment_terms
externalName: invoiceAmount → totals.total_amount
Inventory Management System
Copy
Ask AI
externalName: itemCode → line_items.item_code
externalName: quantityOrdered → line_items.quantity
externalName: expectedDate → po_header.required_by_date
externalName: receivingLocation → ship_to.location_name
Spend Analytics Platform
Copy
Ask AI
externalName: supplier → vendor.vendor_name
externalName: category → line_items.gl_account
externalName: spend → totals.total_amount
externalName: department → po_header.department
Related Examples
- Invoice Data Definition - For matching invoices to POs
- Contract Data Definition - For master purchase agreements
- Form Data Definition - For purchase requisition forms
