Hi NetSuite community, I'm working on a BigCommer...
# integrations
r
Hi NetSuite community, I'm working on a BigCommerce → NetSuite integration via Node.js middleware and need help with applying bundle discounts to Sales Order line items. Background: I have two types of discounts from BigCommerce: Coupon code discount - Successfully added as a separate line item (SOLVED) Bundle/product-level discount - STUCK HERE The Issue: In BigCommerce, products show discounted prices (e.g., Product originally $199, now $190). I'm getting this discount amount from the BigCommerce API and need to apply it to individual line items in NetSuite. What I'm trying to do: Set the discount in the "Discount Amount" column for each line item in the Items section of the Sales Order. Here's a partial view of the Sales Order Items columns: Item | Description | Quantity | PriceLevel | Rate | Amount | Tax Code | GST | *Discount Amount | S*O Status........................← THIS are COLUMN......names My Questions: 1. Is this the correct approach for handling bundle/product discounts in NetSuite? 2. What is the correct field ID for the "Discount Amount" column? I've tried: 3.
discount_amount
4.
discountamount
I’ve spent hours testing different field IDs, reviewed the NetSuite Help documentation, and tried setting the discount both before and after the rate. However, all attempts result in the Discount Amount column remaining empty.I realise I may be missing something simple here. If anyone has encountered this before or can point me in the right direction, I’d really appreciate your guidance. cc: @Craig Haggart Thanks in advance for your time and help.
r
Any reason why you’re not leveraging something like Celigo for this? This recording might be have some insights: https://celigo.ondemand.goldcast.io/on-demand/dfacf06c-4016-4189-9dba-a91ad1e2facd
b
m
That "Discount Amount" column may be a custom column in your account, I don't think there is a native column like that as that's not how NetSuite applies discounts to the lines of a sales order. If its a custom column it will start with custcol_. The discount will have to be applied in a similar manner to what you did with the coupon codes, as a separate line item that will discount the preceding line. One trick you can do, to verify the field names you are using from a code perspective is to add &xml=T to the end of the URL for the sales order you are looking at. You'll be able to see all the field names.
r
@Matt Carter, thanks for the tip and the suggestion, that really helps. I’ll try adding the bundle discount as a line item.
p
Can you log in to the NetSuite's instance website, and go to setup > records browser > then view transactions? It will show you all the fields on the invoice, including custom fields, and joins between fields and other tables in NetSuite. The SOAP schema browser says sales order item - the sub record for lines on the sales order, has no discount amount column, so it appears to be a custom field. Use that records browser to get its id. They often have weird names like custbody12, or just ask the client to take screenshots of the custom field, including it's name / label / id / etc. I'm not familiar with sales orders and the correct approach for setting discounts, but logically it would seem like you're on the right track. You could also use the API to load one of these sales orders and their lines to see what the field is actually called if you know of one in the NetSuite account that has the discount amount populated.