Articles in this section

Sync order refunds between NetSuite and Shopify

If your Customer Service team works in Shopify, NetSuite, or both, the refund flows keep refund records in sync between the two systems. The Refund module includes two flows, one for each direction. Enable the flow that matches where your CSR team initiates refunds, or enable both for full bi-directional sync.

  • Shopify refund to NetSuite refund (add): use this if your CSR team creates refunds in Shopify

  • NetSuite refund to Shopify refund (add): use this if your CSR team creates refunds in NetSuite

A5.png

Flow 1: Shopify refund to NetSuite refund (add)

This flow syncs refund records created in Shopify into NetSuite. The flow determines the correct NetSuite refund record type (Cash Refund, Credit Memo + Customer Refund, or Customer Refund against deposit) based on how the original order was billed.

How the flow works
  • Cash Sale: The original order was billed as a Cash Sale → creates a Cash Refund in NetSuite.

  • Invoice: The original order was billed as an Invoice → creates a Credit Memo in NetSuite, then applies a Customer Refund against it.

  • Deposit: No billing transaction exists, but a Customer Deposit exists for the order; it creates a Customer Refund against the deposit.

  • After the refund record is created, the eTail Refund Exported checkbox is set on the NetSuite Cash Refund or Credit Memo to prevent re-syncing the same refund.

  1. Get refunded orders from Shopify (Export): Uses the GraphQL orders(first, query, after, reverse:true) query to find orders with refund events since the last flow run. The reverse:true parameter processes the most recently updated orders first.

  2. Get refund info from Shopify (Lookup): Retrieves detailed refund data from Shopify using a GraphQL query. It fetches refund details, including monetary amounts, shipping lines, line items, transactions, and returns, treating child records as main records for further processing.

  3. Get billing transactions from NetSuite (Lookup): Retrieves billing transaction data for a specific order via a RESTlet, grouping results by internal ID and processing records in batches for structured lookup

  4. Get customer deposit from NetSuite (Lookup): Uses saved search customsearch_celigo_shopify_rfd_dp_exp to check whether a Customer Deposit exists for this order (used when the Deposit routing branch applies).

  5. Router: Cash Sale, Invoice, or Deposit (Import):

  6. Get credit memo amount from NetSuite (Lookup): Uses saved search customsearch_celigo_shopify_rfnd_cm_amt to retrieve the Credit Memo amount if one exists, for amount validation.

  7. Post customer refunds to NetSuite (Import): Creates Customer Refund records in NetSuite by mapping source data, applying credit memos, and processing valid refunds using distributed, one-to-many processing while ignoring duplicates and missing data.

Store credit refunds: To issue refunds as store credit, enable the Allow store credit as refund option setting and configure the Payment method for store credit. When a Shopify refund uses store credit, the flow creates the corresponding record using the configured payment method. You can also configure the Number of days until store credit expiration to control credit validity.

Flow 2: NetSuite refund to Shopify refund (add)

This flow exports Cash Refunds and Credit Memos created in NetSuite to Shopify. Use this flow when your CSR team processes refunds in NetSuite, and you need those refunds reflected in Shopify.

How the flow works
  • Order Refund: Standard refund against a Shopify order (not linked to an RMA)

  • RMA Refund: Refund associated with a Return Authorization in NetSuite

  • Customer Refund: NetSuite record type is Customer Refund

  • Credit Memo: NetSuite record type is Credit Memo

  • Cash Refund: NetSuite record type is Cash Refund

  • Outer Router - first matching branch

  • Inner Router - first matching branch (within each outer branch)

  1. Get order refunds from NetSuite (Export): Uses saved search customsearch_celigo_shopify_refundexpo to retrieve Cash Refunds and Credit Memos where the eTail Refund Exported checkbox is unchecked.

  2. Get suggested refund from Shopify (Lookup): Retrieves recommended refund data from Shopify using a GraphQL query, including refund amounts, shipping refunds, and transaction details, based on the order and line-item information provided.

  3. Router (nested): Order Refund type and NetSuite record type (Import):

Refund settings

To configure, navigate to SettingsRefunds.

Setting

Description

NetSuite item to track custom refund adjustments

Select the NetSuite item to use as the line item for custom refund adjustments on NetSuite refund transactions. Once configured, manually add this item to the NetSuite refund record whenever a custom adjustment needs to be tracked.

Payment method for store credit

Select the NetSuite payment method to use when a refund is issued as store credit. Required when store credit is enabled.

Number of days until store credit expiration

Number of days after issuance before store credit expires. Enter 0 for store credit that does not expire.

Allow store credit as refund option

When enabled, store credit can be used as the refund method. Configure the payment method and expiration days below.

Add GST/VAT to refund total

When enabled, GST/VAT is added to the refund total before posting to Shopify. Enable for countries where GST/VAT must be included in refund amounts.