The NetSuite Refund to BigCommerce Refund Add flow refunds BigCommerce orders when you create a cash refund or credit memo in NetSuite. It sends the refund amount and refunded quantities to BigCommerce and updates the order status to Refunded or Partially Refunded. It can refund individual line items, the complete order, only the shipping amount, or a custom amount. This article is for integrator.io users who process refunds in NetSuite.
How the refund flow works
The flow exports the cash refunds and credit memos returned by the saved search in NetSuite Saved Search for syncing order refunds. For each refund, it reads the order ID, item ID, quantity, and item type from the NetSuite record, and gets a refund quote from BigCommerce with the refund amounts and refund tax amount. It then updates the BigCommerce order with:
- The refunded quantity for each line.
- The refunded shipping amount.
- The total refund amount.
- The order status, Refunded or Partially Refunded.
The flow doesn't sync the BigCommerce refund ID back to NetSuite.
BigCommerce limitations
- Refunds split across multiple payment gateways aren't supported.
- Store credit isn't offered as a refund option when an order was paid in a non-default currency.
- Store credit is a refund option only for orders from customers with storefront accounts. Guest orders can't be refunded as store credit. If an order was paid partly by credit card and partly by store credit, BigCommerce refunds the whole amount as store credit.
- Inventory isn't restocked automatically when a refund is processed.
- Refunding items through a return request isn't supported.
Set up and run the refund flow
- In the integration app, go to Settings > Refund.
- For NetSuite Saved Search for syncing order refunds, select the saved search for refunds. This setting is required.
- Select Save.
- Go to Flows > Refund, turn on NetSuite Refund to BigCommerce Refund Add, and select Run.
Sync custom refunds
If you use custom refund amounts in NetSuite, you can sync them, along with line item refunds, by adding a custom field in NetSuite, a column to the refund saved search, and mappings to the refund flow.
Create a custom field in NetSuite
- Sign in to NetSuite as an administrator.
- Go to Customization > Lists, Records & Fields > Transaction Body Fields > New.
- Enter a Label, ID, and Description, such as
Custom_refunds. - For Type, select Check Box.
- On the Applies To subtab, select Sale.
- Select Save.
Before you run the refund flow, select this box on each NetSuite cash refund or credit memo that holds a custom refund.
Configure the refund saved search
The refund saved search needs these two result columns:
| Field | Formula | Custom Label |
|---|---|---|
| Custom_refund (Custom Body) | Custom_refund |
|
| Formula (Currency) | ABS({amount}) |
Custom_amount |
- In the NetSuite global search, enter
Celigo BigCommerce Refund Export Search, and open the saved search you use. - Select Edit this Search.
- On the Results subtab, under Columns, add the rows in the preceding table.
- Select Save.
Map the custom refund in the refund flow
Add these mappings to the Get refund payment details from BigCommerce step:
| 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 |
Add these mappings to the bigcommerce-netsuite-refund-order-import-adaptor import:
| 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 |
- In the integration app, go to Flows > Refund, and open NetSuite Refund to BigCommerce Refund Add.
- Select Mappings for the Get refund payment details from BigCommerce step, add its mappings, and then select Save & close.
- Select Mappings for the bigcommerce-netsuite-refund-order-import-adaptor import, and add its mappings.
- Select Settings for the
items[*].quantitymapping, and for Data type, select Number. - Select Save & close.