The Order Cancellation Import flow cancels an order in NetSuite and re-stocks the inventory automatically whenever an unbilled order is cancelled in Magento.
The flow supports partial cancellation of the order. If a portion of the order has been billed and the rest is cancelled in Magento, the remaining unbilled order lines are closed in NetSuite.
The Order Cancellation Import flow runs in real time as soon as the order is cancelled in Magento (from the Order View page in the Admin section or by the Mass Action setting for Order Cancellation in the Order Grid).
Magento allows the following use cases for Order Cancellation:
- If the order is in Pending State, cancelling the Order will cancel the whole order and the inventory is re-stocked.
- If the order has been shipped partially or completely, cancelling the order will cancel the entire order and the inventory is re-stocked.
- If the order has been partially billed, cancelling the order will only cancel the unbilled items and restock these items.
- If the order is completely billed, the order cannot be cancelled.
If the Order Cancellation Import Flow fails for an order, a backup cron will be able to pick the order and mark it cancel in NetSuite. Cron frequency can be managed from Magento Admin Configuration.