If you have custom refunds in your NetSuite account and you want to sync them using the integration app, the article is a workaround to sync custom refunds from NetSuite to BigCommerce.
Note: After you configure your NetSuite account and integration app with the below customizations, you can sync custom refunds and line item refunds.
Create a custom field in NetSuite
- Sign in to your NetSuite account as an admin
- From the main menu, go to Customization > Lists, Records & Fields > Transaction Body Fields > New.
- On the Transaction Body Field page, in the Label, ID, and Description fields, enter Custom_refunds.
Note: “Custom_refunds” is an example. You can provide a label as per your business requirements. - In the Type drop-down menu, select Check Box.
- In the Applies To tab, check the Sale check box.
- Click Save.
Note: Before you run the NetSuite Refund to BigCommerce Refund Add flow, on the NetSuite cash refund or credit memo record, check the “Custom_refund” check box.
Configure the refunds saved search
- In the NetSuite global search box, enter Celigo BigCommerce Refund Export Search.
- From the results, choose an appropriate saved search.
- On the Celigo BigCommerce Refund Export Search: Results page, click Edit this Search.
- Go to Results tab > Columns sub-tab.
- Add the following rows:
Field
Formula
Custom Label
Custom_refund (Custom Body)
Custom_refund
Formula (Currency)
ABS({amount})
Custom_amount
- Click Save.
Configure mappings in the integration app
- Sign in to your integrator.io account.
- Click BigCommerce - NetSuite integration app.
- Go to Flows > Refunds.
- Click on the NetSuite Refund to BigCommerce Refund Add flow.
- On the flow builder page, in the Get refund payment details from BigCommerce import, click Mappings.
- On the Edit Mapping: Get refund payments details from Bigcommerce window, add the following mappings:
Source record field (NetSuite)
Destination record field (BigCommerce)
{{#if Custom_refund}}{{#compare Custom_refund '===' "T"}}{{Custom_amount}}{{else}}{{items[*].amount}}{{/compare}}{{else}}{{items[*].amount}}{{/if}}
items[*].amount
{{#if Custom_refund}}{{#compare Custom_refund '===' "T"}}{{bigcommerce_order_id}}{{else}}{{items[*].item_id}}{{/compare}}{{else}}{{items[*].item_id}}{{/if}}
items[*].item_id
{{#if Custom_refund}}{{#compare Custom_refund '===' "T"}}ORDER{{else}}{{items[*].item_type}}{{/compare}}{{else}}{{items[*].item_type}}{{/if}}
items[*].item_type
{{#if Custom_refund}}{{#compare Custom_refund '===' "T"}}{{else}}{{items[*].quantity}}{{/compare}}{{else}}{{items[*].quantity}}{{/if}}
items[*].quantity
- Click Save & close.
- On the flow builder page, in the bigcommerce-netsuite-refund-order-import-adaptor import, click Mappings.
- On the Edit Mapping: bigcommerce-netsuite-refund-order-import-adaptor window, add the following mappings:
Source record field (NetSuite)
Destination record field (BigCommerce)
{{#if refund_quotes.order_level_refund_amount}}{{#compare refund_quotes.order_level_refund_amount "!==" "0"}}{{refund_quotes.order_level_refund_amount}}{{else}}{{toFixed items[*].amount 2}}{{/compare}}{{else}}{{items[*].amount}}{{/if}}
items[*].amount
{{#if refund_quotes.order_level_refund_amount}}{{#compare refund_quotes.order_level_refund_amount "!==" "0"}}{{bigcommerce_order_id}}{{else}}{{items[*].item_id}}{{/compare}}{{else}}{{items[*].item_id}}{{/if}}
items[*].item_id
{{#if refund_quotes.order_level_refund_amount}}{{#compare refund_quotes.order_level_refund_amount "!==" "0"}}ORDER{{else}}{{items[*].item_type}}{{/compare}}{{else}}{{items[*].item_type}}{{/if}}
items[*].item_type
{{#if refund_quotes.order_level_refund_amount}}{{#compare refund_quotes.order_level_refund_amount "!==" "0"}}{{else}}{{items[*].quantity}}{{/compare}}{{else}}{{items[*].quantity}}{{/if}}
items[*].quantity
- Next to the “items[*].quantity” mapping, click Settings.
- On the Settings window, from the Data type menu, select Number.
- Click Save & close.