Articles in this section

Sync custom refunds from NetSuite to BigCommerce

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

Transaction_Body_field_custom_refunds.jpg

  1. Sign in to your NetSuite account as an admin
  2. From the main menu, go to Customization > Lists, Records & Fields > Transaction Body Fields > New.
  3. 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.
  4. In the Type drop-down menu, select Check Box.
  5. In the Applies To tab, check the Sale check box.
  6. 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

  1. In the NetSuite global search box, enter Celigo BigCommerce Refund Export Search.
  2. From the results, choose an appropriate saved search.
  3. On the Celigo BigCommerce Refund Export Search: Results page, click Edit this Search.
    Custom_refunds_saved_search.jpg

  4. Go to Results tab > Columns sub-tab.
  5. Add the following rows:

    Field

    Formula

    Custom Label

    Custom_refund (Custom Body)

     

    Custom_refund

    Formula (Currency)

    ABS({amount})

    Custom_amount

  6.  Click Save.

Configure mappings in the integration app

  1. Sign in to your integrator.io account.
  2. Click BigCommerce - NetSuite integration app.
  3. Go to Flows > Refunds.
  4. Click on the NetSuite Refund to BigCommerce Refund Add flow.
  5. On the flow builder page, in the Get refund payment details from BigCommerce import, click Mappings.
  6. On the Edit Mapping: Get refund payments details from Bigcommerce window, add the following mappings:
    Custom_refunds_mapping_1.jpg

    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


  7.  Click Save & close.
  8. On the flow builder page, in the bigcommerce-netsuite-refund-order-import-adaptor import, click Mappings.
  9. On the Edit Mapping: bigcommerce-netsuite-refund-order-import-adaptor window, add the following mappings:
    Custom_refund_mapping_2.jpg

    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

  10.  Next to the “items[*].quantity” mapping, click Settings.
  11. On the Settings window, from the Data type menu, select Number.
    Custom_refund_mapping2_setting.jpg

  12. Click Save & close.
Was this article helpful?
0 out of 0 found this helpful

Comments

2 comments
Date Votes
  • it appears the custom amount mapping yields a string value in some cases and throws an error on the bc api. workaround is to multiply it by 1 to force a numeric value and set data type to number.

    0
  • Hi SteinChu,
    Thanks for your comment.

    When the data type string is returned in the custom amount mappings we are handling it in backend and updating the data type to number. This use case was verified from our end before release. Let us know if you have recently faced this error while performing the suggested steps from your end.

    Regards
    Nilesh

    0

Please sign in to leave a comment.