Skip to main content
Version: Current

Purchase Order to Bill Transformation

Overview

The Purchase Order to Bill Transformation integration converts purchase orders into vendor bills with advanced allocation processing.

Direction: 📤 Zudello → NetSuite
Type: Real-time sync
API: NetSuite SOAP API
Frequency: On-demand processing

Key Benefits
  • Automatic PO to bill conversion
  • Advanced allocation processing
  • Line merging and consolidation
  • Partial receipt handling
  • Multi-location support

Header Field Mappings

The following fields are mapped during PO to bill transformation:

Source FieldTarget FieldDescription
PO NumbercreatedFromSource PO reference
VendorentityVendor reference (inherited)
CurrencycurrencyTransaction currency (inherited)
TermstermsPayment terms (inherited)
SubsidiarysubsidiarySubsidiary (inherited)
Invoice NumbertranIdNew bill transaction ID
Invoice DatetranDateBill transaction date
Due DatedueDatePayment due date
MemomemoTransaction memo

Line Processing

Transform Method

The transformation uses NetSuite's transform method:

  1. Load Purchase Order

    • Retrieve PO by internal ID
    • Validate PO status
    • Check for existing bills
  2. Transform to Bill

    • Use transform operation
    • Preserve PO relationships
    • Apply custom mappings

Line Merging

Lines are consolidated based on:

  • Item/Account matching
  • Location alignment
  • Department/Class/Customer matching
  • Tax code compatibility
Merge CriteriaDescription
Same ItemLines with identical items
Same AccountExpense lines with same account
Same DimensionsMatching location/dept/class
Same Tax CodeCompatible tax treatment

API Configuration

SOAP API Method

The integration uses the transform operation:

  • Source Type: PurchaseOrder
  • Target Type: VendorBill
  • Operation: transform
  • Response Handling: Captures new bill ID

Authentication

Uses token-based authentication with:

  • Account ID
  • Consumer Key
  • Consumer Secret
  • Token ID
  • Token Secret

Special Processing

Allocation Processing

Advanced allocation features include:

  1. Quantity Allocation

    • Partial receipt support
    • Remaining quantity tracking
    • Over-receipt prevention
  2. Amount Allocation

    • Price variance handling
    • Currency conversion
    • Rounding adjustments
  3. Multi-Location Allocation

    • Location-specific receipts
    • Cross-location transfers
    • Inventory impact

Line Amount Calculations

Complex amount processing includes:

Calculation TypeDescription
Standard RateQuantity × Unit Price
Variance AdjustmentActual vs Expected price
Tax HandlingInclusive/Exclusive processing
Currency ConversionMulti-currency support
Landed CostAdditional cost allocation

Receipt Status Tracking

The transformation considers:

  • Fully received POs
  • Partially received POs
  • Direct bill creation
  • Receipt-based billing

Processing Logic

Transformation Flow

  1. PO Validation

    • Verify PO exists
    • Check approval status
    • Validate vendor match
  2. Transform Execution

    • Load PO record
    • Execute transform
    • Apply customizations
  3. Line Processing

    • Merge similar lines
    • Apply allocations
    • Calculate amounts
  4. Bill Finalization

    • Set bill fields
    • Add custom data
    • Submit transaction

Allocation Rules

Allocation processing follows these rules:

  • Honor PO quantities
  • Respect receipt records
  • Apply variance tolerances
  • Maintain audit trail

Error Handling

Common Errors

Error TypeDescriptionResolution
INVALID_TRANSFORMCannot transform POCheck PO status and approvals
ALREADY_BILLEDPO already billedVerify bill doesn't exist
QTY_EXCEEDEDQuantity exceeds POReview allocation settings
CLOSED_POPO is closedReopen PO or check status
INVALID_ALLOCATIONAllocation errorReview line allocations
VARIANCE_EXCEEDEDPrice variance too highCheck variance tolerances

Retry Logic

  • Automatic retry for transient errors
  • Maximum 3 retry attempts
  • Exponential backoff strategy

Troubleshooting

IssuePossible CauseSolution
Transform failsPO not approvedEnsure PO is approved
Lines missingMerge logic issueReview consolidation rules
Amount mismatchAllocation errorCheck calculation settings
Duplicate billsMultiple transformsImplement idempotency checks
Receipt issuesReceipt not syncedVerify receipt records