Discounts & Allowances
How EDI SAC discounts map to NetSuite Discount Items on Sales Orders
The Orderful for NetSuite connector supports EDI discount and allowance/charge processing through SAC (Service/Promotion/Allowance/Charge) loops on inbound 850 Purchase Orders. Discounts from the EDI message are mapped to NetSuite Discount Items on Sales Orders using the Authorized Discount configuration.
This page covers how SAC data flows from EDI into NetSuite, how to configure discount handling, and how discounts appear on outbound transactions (810 Invoice, 856 ASN).
How It Works
When an 850 Purchase Order contains SAC loops (at the header level, line level, or both), the connector:
- Extracts discount data from the SAC segments (dollar amount, percentage, and SAC code)
- Looks up the SAC code against the customer's Authorized Discount records
- Maps matched discounts to NetSuite Discount Items on the Sales Order
- Stores a reference to the Authorized Discount record on the Sales Order for use in outbound transactions
Discounts that don't match any Authorized Discount record are silently skipped — no error is thrown, and the discount is not applied to the Sales Order. Ensure all expected SAC codes are configured before processing orders.
Authorized Discount Configuration
Authorized Discounts are configured per customer (or globally) in NetSuite. They map an EDI SAC code to a NetSuite Discount Item.
Creating an Authorized Discount
- Navigate to Lists > Relationships > Customers and open the customer record
- Go to the EDI tab
- In the Orderful Authorized Discounts table, add a new row:
| Field | Description |
|---|---|
| Discount Item | The NetSuite Discount Item to use when this SAC code is received. Must be an item of type "Discount." |
| Allowance Charge Code | The EDI SAC code (e.g., C310, D240, H850). This must match the servicePromotionAllowanceOrChargeCode value in the 850 SAC segment. |
| Accept EDI Amount | When checked, the connector uses the dollar amount or percentage from the EDI message. When unchecked, the Discount Item's natively configured rate in NetSuite is used instead. |
| Subsidiary | (Optional) Restrict this discount mapping to a specific subsidiary. Leave blank to apply across all subsidiaries. |
Global Discounts: To create a discount mapping that applies to all customers, leave the Customer field blank. Customer-specific mappings take priority over global mappings.
Discount Item Setup
The Discount Item selected in the Authorized Discount record must be configured in NetSuite under Lists > Accounting > Discount Items. Key settings on the Discount Item:
- Rate: If "Accept EDI Amount" is unchecked on the Authorized Discount, the Discount Item's configured rate is used. This can be a fixed dollar amount or a percentage.
- Apply Before Sales Tax: Controls whether the discount reduces the taxable amount.
- Account: The GL account to post the discount against.
SAC Data: What the EDI Provides
Each SAC segment in an 850 Purchase Order can include:
| EDI Field | Description | Example |
|---|---|---|
servicePromotionAllowanceOrChargeCode | The SAC code identifying the type of discount | C310 (Discount) |
amount | Dollar amount in implied two-decimal format | 2500 = $25.00 |
percentDecimalFormat | Percentage as a decimal string | 5.00 = 5% |
allowanceOrChargeIndicatorCode | Whether this is an Allowance (discount) or Charge | A = Allowance, C = Charge |
allowanceOrChargeMethodOfHandlingCode | How to process — discount or credit | 02 = Off Invoice |
SAC loops can appear at two levels:
- Header-level SAC (
transactionSets[0].SAC_loop): Applies to the entire order - Line-level SAC (
PO1_loop[].SAC_loop): Applies to a specific line item
How Discounts Map to Sales Orders
The connector handles discounts differently depending on the number and level of discounts on the order.
Single Header-Level Discount
When there is exactly one transaction-level discount, the connector uses NetSuite's native header discount fields:
discountitem— set to the Authorized Discount's Discount Itemdiscountrate— set to the dollar amount or percentage from the EDI
This applies the discount to the entire order total automatically.
Multiple Header-Level Discounts
When there are two or more transaction-level discounts, the connector:
- Adds all product line items to the Sales Order
- Inserts a Subtotal line item (to establish the order total as the discount base)
- Adds each discount as a separate Discount line item after the Subtotal
Each discount line item applies to the running subtotal, so discounts cascade correctly. The Subtotal item is resolved automatically — the connector searches for an existing Subtotal item in your account, or creates one if needed. You can also configure a specific Subtotal item in the script's Company Preferences.
Line-Level Discounts
When a SAC loop appears on a specific PO1 line, the connector adds a Discount line item immediately after the corresponding product line. NetSuite applies line-level discounts to the preceding line's total.
Mixed Header and Line-Level Discounts
An order can have both line-level and header-level discounts. Line-level discounts are inserted after their respective product lines, and header-level discounts are appended after a Subtotal line at the end.
Dollar Amounts vs. Percentages
EDI SAC segments can provide a dollar amount, a percentage, or both. The connector handles each scenario:
| EDI Provides | Behavior |
|---|---|
| Dollar amount only | The dollar amount is applied directly to the Discount line |
| Both dollar amount and percentage | The dollar amount is used (percentage is ignored) |
| Percentage only | The percentage is applied to the Discount line (e.g., -5.00%). NetSuite calculates the dollar amount based on the preceding line or subtotal. |
| Neither | The discount line is skipped |
Note: When "Accept EDI Amount" is unchecked on the Authorized Discount record, the connector does not set a rate — it lets the Discount Item's natively configured rate in NetSuite take effect.
Discounts on Outbound Transactions
810 Invoice
When generating an outbound 810 Invoice, the connector reads discount lines from the NetSuite Invoice and maps them back to SAC loops in the EDI message. The Authorized Discount record is used to resolve the SAC code:
- If the Invoice line has an Orderful EDI Discount column reference, the connector looks up that Authorized Discount record to get the SAC code
- If no direct reference exists, the connector falls back to looking up the Discount Item against customer-specific or global Authorized Discount records
856 ASN
Discount information from the originating Sales Order can carry through to the 856 ASN SAC loops using the same lookup mechanism.
Troubleshooting
Discount is not applied to the Sales Order
- Verify an Authorized Discount record exists for the customer with the correct SAC code
- Check the Orderful Transaction's raw EDI payload to confirm the SAC loop is present
- SAC codes are case-sensitive — ensure the code matches exactly
Discount amount is $0.00
- If "Accept EDI Amount" is checked, verify the EDI message includes a non-zero
amountorpercentDecimalFormatin the SAC segment - If the EDI only provides a percentage and no dollar amount, ensure you are on connector version 1.20.77 or later (earlier versions did not support percentage-only SAC discounts)
Discount shows wrong amount
- If "Accept EDI Amount" is unchecked, the Discount Item's configured rate is used regardless of what the EDI sends
- If both a dollar amount and percentage are provided in the EDI, the dollar amount takes precedence
- For header-level discounts, verify a Subtotal line is present to ensure discounts apply to the full order total
Multiple discounts only affecting the last line item
- This occurs when no Subtotal line is present before header-level discounts. Upgrade to connector version 1.20.77 or later, which automatically inserts a Subtotal line for multi-discount orders.
Version History
| Version | Change |
|---|---|
| 1.20.28 | Initial SAC discount support — dollar amounts on Authorized Discounts |
| 1.20.46 | Off-invoice discount handling with SAC fallback chain and consolidation |
| 1.20.77 | Percentage-only SAC support, multi-discount Subtotal line insertion, subtotal item auto-resolution |
Updated 1 day ago
