Purchase Orders
Overview
📥 Direction: NetSuite → Zudello
🔄 Sync Type: Incremental sync
⏱️ Frequency: Every 15 minutes
📋 Entity: Purchase orders with line items and allocations
Purchase order data flows from NetSuite to Zudello to provide reference information for invoice matching, procurement tracking, and purchase order to bill transformation workflows.
✅ Three-way Matching - Reference data for PO-Invoice-Receipt validation
✅ Allocation Tracking - Monitor PO line consumption and remaining amounts
✅ Multi-subsidiary Support - Handle cross-subsidiary transactions
✅ Automatic Relationships - Link suppliers, items, projects, and dimensions
✅ Complex Status Filtering - Only sync approved and active orders
Processing Strategy
The integration uses complex SuiteQL queries that:
- Join transaction and transaction line tables
- Filter for approved purchase orders only
- Exclude closed and cancelled orders
- Calculate line-level pricing from amounts and quantities
- Handle multi-subsidiary and multi-currency scenarios
Field Mappings
Header Fields
NetSuite Field | Zudello Transaction Field | Data Type | Notes |
---|---|---|---|
tranid | document_number | String | Purchase order number |
trandate | date_issued | Date | Order creation date |
duedate | date_due | Date | Expected delivery date |
entity | supplier | Relation | Links to Supplier |
currency | currency | Relation | Links to Currency |
subsidiary | subsidiary | Relation | Links to Subsidiary |
custbody_zu_approval_status | approval_status | String | Custom approval field |
approvalstatus | netsuite_approval_status | String | Native approval status |
status | transaction_status | String | Order status |
exchangerate | exchange_rate | Decimal | Currency exchange rate |
memo | notes | String | Header memo/notes |
Line Item Field Mappings
NetSuite Field | Zudello Line Field | Data Type | Notes |
---|---|---|---|
line | line_number | Integer | Line sequence number |
item | item | Relation | Links to Item |
description | description | String | Line description |
quantity | quantity | Decimal | Ordered quantity |
rate | unit_price | Decimal | Calculated from amount/quantity |
amount | total_exclusive | Decimal | Line amount excluding tax |
taxamount | tax_total | Decimal | Line tax amount |
grossamt | total_inclusive | Decimal | Line amount including tax |
department | department | Relation | Links to Department |
class | classification | Relation | Links to Classification |
location | location | Relation | Links to Location |
isclosed | is_closed | Boolean | Line closure status |
quantityreceived | quantity_received | Decimal | Received quantity |
quantitybilled | quantity_billed | Decimal | Billed quantity |
API Configuration
SuiteQL Query Structure
The integration uses a complex SuiteQL query that joins:
- Transaction table for header data
- TransactionLine table for line item details
- Multiple dimension tables for complete reference data
- Status filtering to exclude inactive records
Query Filters
transaction.type = 'PurchOrd'
- Purchase orders onlytransaction.status NOT IN ('Cancelled', 'Closed')
- Active orderstransactionline.mainline = 'F'
- Exclude header linestransactionline.taxline = 'F'
- Exclude tax summary lineslastmodifieddate >= :last_sync_date
- Incremental sync
Sync Configuration
Incremental Sync Details
- Sync Field:
lastmodifieddate
- Initial Load: All approved, non-closed purchase orders
- Updates: Only modified records since last sync
- Frequency: Every 15 minutes
- Batch Size: 1000 records per sync cycle
Status Requirements
Purchase orders are synced only when:
- Approval status is not "Pending Approval"
- Order status is not "Cancelled" or "Closed"
- At least one line item exists
- Line items are not fully closed
Special Processing Features
Line-Level Price Calculation
When rate
field is null or zero:
- Calculate unit price from
amount / quantity
- Handle zero quantity scenarios
- Preserve original amount for validation
Multi-Currency Handling
- Store original currency code
- Capture exchange rate for reporting
- All amounts in transaction currency
Allocation Tracking
Track PO consumption with:
quantity_received
- Items already receivedquantity_billed
- Items already invoicedquantity - quantity_billed
- Remaining to invoice
Document Type Classification
All purchase orders set with:
- Module: "PURCHASING"
- Submodule: "ORDER"
- Document Type: "PURCHASE_ORDER"
- Status: Mapped from NetSuite status
Processing Logic
Complex Query Processing
The integration performs:
- Complex SuiteQL join across transaction and line tables
- Status filtering at both header and line level
- Exclusion of non-item lines (headers, taxes, shipping)
- Price calculation from totals when rates missing
- Dimension mapping for all supported fields
Line Filtering Logic
Exclude lines where:
mainline = 'T'
(header information line)taxline = 'T'
(tax summary line)item IS NULL
(non-item lines)- No amount or quantity exists
Status Mapping
NetSuite Status | Zudello Status | Description |
---|---|---|
Pending Approval | PENDING | Awaiting approval |
Approved | APPROVED | Ready for processing |
Partially Received | PARTIAL | Some items received |
Pending Receipt | OPEN | Awaiting delivery |
Closed | CLOSED | Fully processed |
Cancelled | CANCELLED | Order cancelled |
Troubleshooting
Issue | Cause | Solution |
---|---|---|
Missing purchase orders | Status filter excluding | Check order approval status |
Incomplete line items | Line type filtering | Verify mainline and taxline flags |
Zero unit prices | Rate field not populated | Price calculation from amount/quantity |
Missing dimensions | Dimension not mapped | Verify department/class/location setup |
Duplicate lines | Tax lines included | Ensure taxline filter active |
Old orders not syncing | Initial sync date limit | Adjust incremental sync start date |
Currency mismatches | Missing currency sync | Run currency master sync first |
Related Documentation
- Suppliers - Vendor master data requirements
- Items - Product catalog for line references
- Projects - Project dimension tracking
- Departments - Department dimension setup
- Locations - Location dimension configuration
- Purchase Invoices - Related invoice processing
- Item Receipts - Goods receipt tracking