Contents
- Overview
- Examples of order import with discount in different scenarios
- What happens when the rate/amount associated with the promotion/coupon code differs in NetSuite and Magento 2?
- What happens when the coupon code applied in Magento 2 does not exist in NetSuite?
- Sync product specific (cart-level) discounts at line-level in NetSuite sales order
Overview
The discount for order in Magento 2 is applied in the following ways:
- Catalog price rules (Applying discounts to line-item)
- Cart Price Rules (Applying discounts to the whole cart)
The integration app supports importing both discount types from Magento 2 into NetSuite. The Discount tab in Order > Advanced Setting, allows you to configure the way you want the discount to be imported into NetSuite.
Note:
- Discount and Tax preferences should be the same on both Magento 2 and NS sides
- Setting different discount settings at different website level is not supported. All the websites are required to have the same settings for this feature to generate accurate results.
The advanced setting Bring Magento cart level discounts into NetSuite as a drop-down list enables you to import cart level discount in the following ways:
- Promotion
You must only use this option if you maintain a 1:1 match between the promo codes in NetSuite and Magento 2. Select this option if you want to map the cart level discount code applied in Magento 2 to be applied to the Promotion field at the order header level in NetSuite. -
Coupon Code
You must only use this option if you maintain a 1:1 match between the coupon codes in NetSuite and Magento 2. Select this option if you want to map the cart level discount code applied in Magento to be applied to the Coupon Code field at the order header level in NetSuite. -
Discount item (Recommended)
Select this option if you want to track the cart level discounts against a single default discount item in NetSuite. When you select this option, the NetSuite discount item to track Magento cart discounts field is displayed. This field allows you to select the default NetSuite discount item against which all the cart-level discounts should be added. The item is added at the order header level in NetSuite and the discount code is posted in the "Magento 2 Discount Code" custom field.
Note: When using the default discount item, the integration app uses the same discount item, but updates the rate as per the discount level when the order is imported into NetSuite so the total discounts between Magento 2 and NetSuite always match. - We recommend you to use the Discount Item option to avoid discount variance that may exist when you use the other two options. To know more about the possible reason for a variance, see What happens when the rate/amount attached to the promotion/coupon code differs in NetSuite and Magento 2? andWhat happens when the coupon code applied in Magento 2 does not exist in NetSuite?
The Bring Magento line level discounts into NetSuite as drop-down list enables you to import line (Item) level discount at order line-level in NetSuite in the following ways:
-
New line below the original line (recommended)
Select this option if you want to track the line-level discounts against a single default discount item in NetSuite. When you select this option, the NetSuite discount item to track Magento line discounts field is displayed. This field allows you to select the default NetSuite discount item against which all the line-level discounts are posted. The item-based promotions are reflected in the NetSuite sales transactions right below the original line item as a separate line item.
-
Adjustments to item list price
When you select this option, the integration app adjusts the discount within the line item price and the final price is displayed in NetSuite. For example, consider the item original price was $200. Coupon code was used in Magento to get $20 as a discount. In this scenario, the integration app will update the price of the item as $180 in NetSuite.
Examples of order import with discount in different scenarios
In this section, we will demonstrate how the discount gets imported in NetSuite when you select different options in the Bring Magento cart level discounts into NetSuite as and Bring Magento line level discounts into NetSuite as drop-down lists.
To demonstrate the functionality, let’s consider that the order consists of 3 items:
- Celigo Eraser: $10
- Celigo Notepad: $200 – $20 (Line item discount) = $180
- Celigo Pen: $100
Total order cost: $290
Cart level discount: 10% of total order cost = $29
NetSuite discount item to track Magento line discounts: HolidayDiscounts
Let’s see what happens when this order is imported in NetSuite.
Scenario 1: Impacts of using Promotion/coupon code
When you use the promotion or coupon code, the integration app searches for the same coupon or promotion code in NetSuite and uses the rate or price associated with the coupon/ promotion code in NetSuite to display the net discount.
The following screens demonstrate how the discount associated with an order is imported into NetSuite when you select:
- the Promotion option for the Bring Magento cart level discounts into NetSuite as drop-down list
- the New line below the original line (recommended) option for the Bring Magento line level discounts into NetSuite as drop-down list
in the Advanced Settings of the Order section.
Order in NetSuite:
You can see that the cart level discount of $29 is being displayed in the Summary pane. Also the coupon/promotion code “CartLevelDiscountCode” is being displayed that was used to avail the discount of $29.
In the Magento order, a $20 line item discount was applied for the item Celigo Notepad and in the integration app, the New line below the original line (recommended) option was selected with the NetSuite discount item to track Magento line discounts field set as HolidayDiscount. Hence, in NetSuite, you can see that a line with HolidayDiscount as the item is showing up below the CeligoNotepad with the price of $-20.
Since the entire discount amount in Magento matches with the order in NetSuite, you will see that in the eTail tab > ETAIL DISCOUNT TOTAL VARIANCE field (used for capturing the difference in the discount total between Magento and NetSuite) shows the amount as 0.
Scenario 2: Impacts of using Discount Item
When you use the Discount Item (Recommended) option, the integration app searches for the same discount item in NetSuite and displays the Magento discount total at the cart level in NetSuite.
Note: When using the default discount item, the integration app uses the same discount item, but updates the rate as per cart level discount when the order is imported into NetSuite.
The following screens demonstrate how the discount associated with an order is imported into NetSuite when you select:
- the Discount Item (Recommended) option for the Bring Magento cart level discounts into NetSuite as drop-down list
- the Adjustments to listed price option for the Bring Magento line level discounts into NetSuite as drop-down list
in the Advanced Settings of the Order section.
Order in NetSuite:
You can see that the cart level discount of $29 is being displayed in the Summary pane. Also, the Discount field is displaying the discount item as “DiscountItemTest”, which is the same as the discount item selected in the Integration App in the NetSuite discount item to track Magento cart discounts field.
In the Magento order, a $20 line item discount was applied to the item Celigo Notepad and in the Integration App, the Adjustments to item list price option was selected. Hence, in NetSuite, you can see that the line item “Celigo Notepad” is displaying the adjusted price of $180 instead of the original price of $200.
Since the entire discount amount in Magento matches with the order in NetSuite, you can see that the eTail tab > ETAIL DISCOUNT TOTAL VARIANCE field (used for capturing the difference in the discount total between Magento and NetSuite) shows the amount as 0.
What happens when the rate/amount associated with the promotion/coupon code differs in NetSuite and Magento?
When you use the discount item option for the Bring Magento cart level discounts into NetSuite as a field, the Integration App uses the discount item you specify in the NetSuite discount item to track the Magento cart discounts field but updates the rate/amount as per cart level discount applied in Magento when the order is imported into NetSuite.
When you use the Promotion or Coupon code option for the Bring Magento cart level discounts into NetSuite as field, the Integration App does not override the coupon code of Magento with the coupon code rate in NetSuite. The Integration App simply identifies the same coupon or promotion code in NetSuite and applies the rate/amount associated with the promotion/coupon code in NetSuite. Hence, we recommend you only to use this option if you maintain a 1:1 match between the promo codes in NetSuite and Magento and the discount amounts match exactly between the two systems. This situation results in the variance being recorded in case if there is a difference in the discount offered on Magento and NetSuite using a coupon code or promo code.
The following example demonstrates the impact when the same Magento and NetSuite order has different amount/ rate as a discount:
Let's assume a Magento order with the item "Celigo Notepad" of price $200 on which the promotion/coupon code CartLevelDiscountCode is used to receive a discount of $100.
When the Integration App imports this order in NetSuite, it will match CartLevelDiscountCode with a similar record in NetSuite. The discount associated with CartLevelDiscountCode in NetSuite is 10% of the total order value. So, the Integration App will only apply the $20 discount (10% of $200) on order in NetSuite.
The actual discount associated with CartLevelDiscountCode in NetSuite is $100 and as only $20 has been used, the Integration App reflects the remaining amount of $80 in the eTail tab > ETAIL DISCOUNT TOTAL VARIANCE field.
What happens when the coupon code applied in Magento does not exist in NetSuite?
Another issue when you use the Promotion or Coupon code option for the Bring Magento cart level discounts into NetSuite as the field is the discount variance in order when the promotion/coupon code applied in Magento does not match with the promotion/coupon code in NetSuite. In this case, no coupon code is applied against the order imported in NetSuite and the total discount amount will directly be added to the eTail tab > ETAIL DISCOUNT TOTAL VARIANCE field.
The following example demonstrates the impact when the promotion/coupon code used in Magento does not exist in NetSuite.
Let's assume a Magento order with the item "Celigo Notepad" of price $200 on which the promotion/coupon code TestCodeNotInNetSuite is used to avail a discount of $70. This is the code that is not present in NetSuite.
When the Integration App processes this order, the following image demonstrates the results:
No discount gets applied to the order. The Integration App does not even apply the promotion/coupon code applied in Magento to the order imported in NetSuite. Hence the entire discount amount of $70 is updated in the eTail tab > ETAIL DISCOUNT TOTAL VARIANCE field.
Additional Discount Variation Scenario's with the resolution
Scenario | Issue | Resolution |
Order with body level discount applied, multiple line items, and few line items not taxable E.g., Discount - 6 Line 1 - 10 (Taxable) Line 2 - 5 (non-Taxble) Expected Tax - 10% on Line 1 = 1 Expected Total = 10+5+1-6 = 10 |
In this case, the discount rate gets divided in promotion to respective line level amount. As there is a line item which is not taxable, also since there are some proportionate discount applied on this line, hence the tax varies with the actual tax Line 1 - 10 - 4(Propotionate discount) = 6 Line 2 - 5 - 2(Propotionate discount) = 3 Actual Tax - 10% on the discount item - 10 % on 6 = 0.6 Actual Total = 6+3+0.6 = 9.6 Tax Variance = 0.4 |
1. Discount Item can be modified as Line Level instead of Body Level 2. Instead of Discount Item, the order can be imported with the Promotion code, but the promotion code on both Magento and NetSuite needs to be in sync. |
Order with body level discount applied and Gift Card applied | The body level discount will be divided to the respective gift card. Hence some variance will be displayed |
1. Discount Item can be modified as Line Level instead of Body Level 2. Move the gift card to the Gift Certificates |
Order with shipping as a line item and a body level discount. IO setting is to import body level discounts as "Promotion code"/"Coupon code" | A variance gets recorded as the body level discount will be divided into the Shipping line item | Set the Promotion code/Coupon code to exclude the shipping line item you have selected |
Sync product specific (cart-level) discounts at line-level in NetSuite sales order
You can now sync cart-level discounts at the line-level in NetSuite sales order when the Magento 2 cart price rules are applied for individual products. This integration app is enhanced to be sure that the order values match in Magento 2 and NetSuite without any variances. To sync product-specific discount at the line-level, in a Magento 2 order, at least one item should have zero discount.
If a Magento 2 order has both product-specific discount and line-level discount, the integration app sums both the discounts and syncs to the NetSuite sales order at the line-level.
- Line Item 1: Both product-specific and individual line discount is applied.
- Line Item 2: Only the product-specific discount is applied.
- Line Item 3: None of the discounts are applied.
In your integration app, in the Settings > Order > Discount sub-tab,
- in the “Bring Magento cart level discounts into NetSuite” setting, select Discount item (recommended) and
- in the “Bring Magento line level discounts into NetSuite as” setting, select New line below the original line (recommended).
Note: In this setting, if you select the Adjustments to item list price option, the order flow adjusts the product-specific discounts to the item price.
In NetSuite, the above Magento2 order is synced as follows:
Comments
3 comments
Incredibly unhelpful to have visuals that indicate Shopify instructions on a Magento 2 > Netsuite Integration article.
Hi Shaun Remele,
Thanks so much for letting us know! We'll get this updated asap.
Shaun Remele Thank you for writing to us. Sorry for the inconvenience. Updated the screenshots. Please let us know if you need further help.
Please sign in to leave a comment.