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
- 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 Field | Target Field | Description |
---|---|---|
PO Number | createdFrom | Source PO reference |
Vendor | entity | Vendor reference (inherited) |
Currency | currency | Transaction currency (inherited) |
Terms | terms | Payment terms (inherited) |
Subsidiary | subsidiary | Subsidiary (inherited) |
Invoice Number | tranId | New bill transaction ID |
Invoice Date | tranDate | Bill transaction date |
Due Date | dueDate | Payment due date |
Memo | memo | Transaction memo |
Line Processing
Transform Method
The transformation uses NetSuite's transform method:
-
Load Purchase Order
- Retrieve PO by internal ID
- Validate PO status
- Check for existing bills
-
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 Criteria | Description |
---|---|
Same Item | Lines with identical items |
Same Account | Expense lines with same account |
Same Dimensions | Matching location/dept/class |
Same Tax Code | Compatible 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:
-
Quantity Allocation
- Partial receipt support
- Remaining quantity tracking
- Over-receipt prevention
-
Amount Allocation
- Price variance handling
- Currency conversion
- Rounding adjustments
-
Multi-Location Allocation
- Location-specific receipts
- Cross-location transfers
- Inventory impact
Line Amount Calculations
Complex amount processing includes:
Calculation Type | Description |
---|---|
Standard Rate | Quantity × Unit Price |
Variance Adjustment | Actual vs Expected price |
Tax Handling | Inclusive/Exclusive processing |
Currency Conversion | Multi-currency support |
Landed Cost | Additional cost allocation |
Receipt Status Tracking
The transformation considers:
- Fully received POs
- Partially received POs
- Direct bill creation
- Receipt-based billing
Processing Logic
Transformation Flow
-
PO Validation
- Verify PO exists
- Check approval status
- Validate vendor match
-
Transform Execution
- Load PO record
- Execute transform
- Apply customizations
-
Line Processing
- Merge similar lines
- Apply allocations
- Calculate amounts
-
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 Type | Description | Resolution |
---|---|---|
INVALID_TRANSFORM | Cannot transform PO | Check PO status and approvals |
ALREADY_BILLED | PO already billed | Verify bill doesn't exist |
QTY_EXCEEDED | Quantity exceeds PO | Review allocation settings |
CLOSED_PO | PO is closed | Reopen PO or check status |
INVALID_ALLOCATION | Allocation error | Review line allocations |
VARIANCE_EXCEEDED | Price variance too high | Check variance tolerances |
Retry Logic
- Automatic retry for transient errors
- Maximum 3 retry attempts
- Exponential backoff strategy
Troubleshooting
Issue | Possible Cause | Solution |
---|---|---|
Transform fails | PO not approved | Ensure PO is approved |
Lines missing | Merge logic issue | Review consolidation rules |
Amount mismatch | Allocation error | Check calculation settings |
Duplicate bills | Multiple transforms | Implement idempotency checks |
Receipt issues | Receipt not synced | Verify receipt records |