Sales Orders
Overview
The Sales Orders integration creates sales order records in NetSuite from Zudello sales order data.
Direction: 📤 Zudello → NetSuite
Type: Real-time sync
API: NetSuite SOAP API
Frequency: On-demand processing
Key Benefits
- Real-time sales order creation
- Automatic tax handling with gross amount support
- Custom field mapping capabilities
- Support for item lines with inventory commitment
- Links to customers, projects, and other dimensions
Header Field Mappings
The following fields are mapped from Zudello to NetSuite sales order headers:
Zudello Field | NetSuite Field | Description |
---|---|---|
SalesOrderNumber | tranId | Transaction reference number |
CustomerCode | entity | Customer reference |
OrderDate | tranDate | Transaction date |
DueDate | dueDate | Expected ship date |
Currency | currency | Transaction currency |
Memo | memo | Transaction memo/description |
Location | location | Location reference |
Department | department | Department reference |
Class | class | Class reference |
Subsidiary | subsidiary | Subsidiary reference |
Terms | terms | Payment terms reference |
OrderStatus | orderStatus | Sales order status (e.g., Pending Fulfillment) |
Line Processing
Item Lines
Item-based sales order lines are created with the following mappings:
Zudello Field | NetSuite Field | Description |
---|---|---|
ItemCode | item | Item reference |
Description | description | Line description |
Quantity | quantity | Item quantity |
Rate | rate | Unit price |
Amount | amount/grossAmt | Line amount (based on tax config) |
Location | location | Line-level location |
Department | department | Line-level department |
Class | class | Line-level class |
TaxCode | taxCode | Tax code reference |
CommitInventory | commitInventory | Inventory commitment level |
IsClosed | isClosed | Flag to close the line |
API Configuration
SOAP API Method
The integration uses the add
operation with the following configuration:
- Record Type: SalesOrder
- Operation: add
- Response Handling: Captures internal ID on success
Authentication
Uses token-based authentication with:
- Account ID
- Consumer Key
- Consumer Secret
- Token ID
- Token Secret
Special Processing
Tax Handling
The integration supports two tax handling modes:
- Tax Exclusive (Default): Uses
amount
field for line amounts - Tax Inclusive: Uses
grossAmt
field when tax codes are marked as inclusive
Custom Fields
Custom fields are mapped using the following structure:
- Script ID mapping from Zudello to NetSuite
- Support for all custom field data types
- Array-based field collection
Inventory Commitment
The commitInventory
field controls how inventory is allocated for the order line. Common values include:
AvailableQty
CompleteQty
DoNotCommit
Processing Logic
Sales Order Creation Flow
-
Header Preparation
- Map standard fields
- Add custom fields
- Set order status
-
Line Processing
- Apply tax handling rules
- Set inventory commitment level
- Add custom line fields
-
API Submission
- Submit via SOAP API
- Capture response
- Store internal ID
Amount Calculations
- Tax Exclusive: Line amounts exclude tax
- Tax Inclusive: Line amounts include tax (using grossAmt)
- Multi-currency: Amounts in transaction currency
Error Handling
Common Errors
Error Type | Description | Resolution |
---|---|---|
INVALID_REF | Invalid customer or item reference | Verify customer/item exists in NetSuite |
INVALID_FLD | Invalid field value | Check field mappings and data types |
INSUFFICIENT_PERMISSION | User lacks permission | Review user role permissions |
UNIQUE_TRAN_ID_IN_PERIOD | Duplicate transaction ID | Check for existing sales orders with the same ID |
INSUFFICIENT_INVENTORY | Not enough inventory to commit | Check inventory levels in NetSuite |
INVALID_ACCT | Invalid account | Verify account is active (for non-inventory items) |
Retry Logic
- Automatic retry for transient errors
- Maximum 3 retry attempts
- Exponential backoff strategy
Troubleshooting
Issue | Possible Cause | Solution |
---|---|---|
Order not created | Authentication failure | Verify API credentials |
Missing customer | Customer not synced or invalid | Ensure customer exists in NetSuite |
Tax calculation errors | Incorrect tax setup | Review tax code configuration |
Custom fields not mapping | Script ID mismatch | Verify custom field script IDs |
Inventory not committed | Incorrect commitInventory value | Check inventory commitment settings |