If you're looking to give your customers the option to cancel their orders by themselves, the option can be configured right from your WeSupply account.
The order cancellation option can be enabled or disabled at any point, according to your internal rules.
Orders can be canceled while their order status is Pending, prior to being invoiced.
If the Order Cancellation setting is enabled in your WeSupply account, the action can be triggered when:
- customer cancels the order;
- when a customer service rep cancels the order at the customer's request within the WeSupply Admin Panel;
- when the order is canceled from Magento;
- when the order is canceled update is triggered by an external/ERP system in Magento;
- when the order is canceled update is sent via API.
Go to Settings -> Branding -> Configuration:
Scroll down to the Order Cancelation Settings section -> click the toggle button to Enable the setting.
You can deactivate the order cancelation option at any time, by clicking on the toggle button to disable the setting.
Click on Save.
Order Cancelation for orders imported via API
If you're importing orders from external sources through the WeSupply Order Import API, you can allow customers to cancel orders using the WeSupply frontend, by following the extra steps below:
Step 4. Under Settings -> Branding -> Configuration -> Order Cancelation Settings -> Api Cancel Endpoint > paste the API Endpoint where you would like to receive the order cancellation update > click Save.
As soon as a customer cancels an order or an item, WeSupply sends the cancelation notification to the customer and a request to the API Endpoint above.
The request sent at the API Endpoint includes the Order External Order Id, the ItemID along with the product Quantities that were canceled.
In order to make sure sure that those requests are secure and sent by WeSupply, we explain how you can verify this type of request here: https://documenter.getpostman.com/view/11859344/T17AiAYq#1af8845b-1493-4be7-a733-db5576adb276
Using the WeSupply event, you can update your ERP system with the cancellation status.
To update the WeSupply frontend, the ERP must send the cancellation update to WeSupply, for the specific order, products, and quantities received via the WeSupply request. We recommend using the WeSupply Order Import API and modifying the ItemStatusID for canceled products and orders.