Richard Andrew
10/12/2025, 4:13 PMdiscounttotal
• altshippingcost
• althandlingcost
Three approaches we're considering:
1. Header-level fields - so.setValue({ fieldId: 'discounttotal', value: amount })
2. Line items - Add discount/shipping/handling as separate line items
3. Shipping method - Use shipmethod field + discount item
Which approach is best practice for integrations? Any gotchas we should know about?Celigo AI
10/12/2025, 4:13 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems that there are different ways to handle the setting of
discounttotal, altshippingcost, and althandlingcost fields on Sales Orders when syncing BigCommerce orders to NetSuite. Here are some insights:
1. Header-level fields - This approach involves directly setting the value of the fields using the so.setValue({ fieldId: 'discounttotal', value: amount }) method. This is a straightforward approach and allows you to directly control the values of the fields. However, it may not reflect the actual breakdown of the costs if they are calculated at the line item level.
2. Line items - This approach involves adding discount, shipping, and handling as separate line items. This can provide a more detailed breakdown of the costs, but it may require more complex logic to calculate and set the values.
3. Shipping method - This approach involves using the shipmethod field and a discount item. This can be useful if you have predefined shipping methods with associated costs. However, it may not be flexible enough if you need to handle a wide variety of shipping scenarios.
As for the gotchas, one thing to note is that the altshippingcost and althandlingcost fields are display summary fields and are read-only according to the Records Browser documentation. Therefore, you may need to use the shippingcost and handlingcost fields if you want to set the values.
Another thing to consider is the calculation of shipping costs. If you are importing Sales Orders using a third-party service, the shipping cost may not be automatically calculated. You may need to manually select the Calculate Shipping option or import the actual shipping cost if it's not an auto-calculation.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/12/2025, 4:13 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841186523
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834533691
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.834411502
Celigo AI
10/12/2025, 4:13 PM