Articles in this section

Sync cancellations between Shopify and NetSuite

If your Customer Service team operates in Shopify, NetSuite, or both, the cancellation flows keep order cancellations in sync between the two systems. Both flows handle fully cancelled orders only - partial cancellations are not supported via the Shopify API and must be processed as refunds.

  • Shopify order cancellation to NetSuite cancellation (add): syncs fully cancelled Shopify orders from Shopify to NetSuite when the Shopify orders are cancelled in Shopify.

  • NetSuite cancellation to Shopify cancellation (add): syncs fully cancelled Shopify orders from NetSuite to Shopify when the Shopify orders are cancelled in NetSuite.

The cancellation flows are delta flows and run as per the schedule. Both flows can be enabled independently based on where your team initiates cancellations.

A10.png

Flow 1: Shopify order cancellation to NetSuite cancellation (add)

This flow exports fully cancelled orders from Shopify to NetSuite, closing the corresponding Sales Order.

How the flow works
  1. Get cancelled orders from Shopify (Export): Uses the GraphQL orders(first, query, after) query filtered for cancelled orders since the last flow run (delta-based). The pre-map script validates each order before processing:

    • Orders already marked as cancelled in NetSuite (cancelledAt or cancelled_at populated) are silently skipped.

    • Orders with financial status PARTIALLY_REFUNDED are skipped with an error: "Record skipped: financialStatus is PARTIALLY_REFUNDED."

    • Orders with fulfillment status FULFILLED are skipped with an error: "Record skipped: fulfillmentStatus is FULFILLED."

  2. Update order status in NetSuite (Import): Closes the Sales Order in NetSuite. Once the order is closed, all line item Closed statuses are set to YES.

Flow 2: NetSuite cancellation to Shopify cancellation (add)

This flow exports fully cancelled orders from NetSuite to Shopify. When a Sales Order is cancelled in NetSuite, this flow cancels the corresponding Shopify order and retrieves the cancellation timestamp.

How the flow works
  1. Get cancelled orders from NetSuite (Export): Uses saved search customsearch_celigo_shopify_ns_cncld_rds (type: once) to find Sales Orders that have been cancelled in NetSuite where the eTail Cancelled Order Exported checkbox is unchecked.

  2. Get order status from Shopify (Lookup): Retrieves the current Shopify order's displayFinancialStatusdisplayFulfillmentStatus, and cancelledAt fields to verify the order can be cancelled and has not already been cancelled in Shopify.

  3. Update order status in Shopify (Import): Cancels the Shopify order using a GraphQL mutation. The Notify Customer and Restock settings determine whether the customer is notified and whether inventory is restocked.

  4. Get cancel timestamp from Shopify (Lookup): Uses the GraphQL order(id) { cancelledAt } query to retrieve the timestamp of the cancellation from Shopify.

  5. Post cancel timestamp to NetSuite (Import): Writes the Shopify cancellation timestamp back to the NetSuite Sales Order and checks the eTail Cancelled Order Exported checkbox to prevent re-processing.

Cancellation settings

A11.png

To configure, navigate to SettingsCancellation.

Setting

Description

Notify Customer

When enabled, Shopify sends a cancellation notification email to the customer. Default: disabled.

Restock

When enabled, inventory committed to the cancelled order is restocked in Shopify.

Note

For unpaid orders fulfilled from deactivated locations, inventory will not be restocked regardless of this setting.

Note

The cancellation flows are delta-based and run on schedule. Only fully cancelled orders are processed. If you need to process a partial cancellation, use the refund flows instead.