WooCommerce Order Updates

Update to WooCommerce Order when Readysell Invoice Posted using Webhook

image-20240903-033717.png


Enabled : Yes
CustomMode : Yes
Fire on Changed : Yes
Data Type : Sale Invoice
Url : https://[COMPANY WEBSITE]/wp-json/wc/v3/orders/{OBJECT:ReferenceNumber}
Criteria : [Status] = 'Posted' And Not IsNullOrEmpty([Reference Number]) And [Sale Shipments][[Sale Order] Is Not Null And [Sale Order.Source] = '1' And [Sale Order.Status] = '3']
Property Changes : Status
Method : PUT
Content Type : application/json
Headers : -refer to this- (Task : WooCommerce Download : Parameter Auth-Read Only)

image-20240903-034249.png


Contents:
{
"status": "completed"
}

 

Workflows : when Sale Invoice posted AND has Reference Number AND has Sale Order AND Sale Order from Custom Website AND Sale Order status posted : this webhook will trigger to update status Order in WooCommerce with Reference Number (as WooCommerce Order ID) to Completed.


Update to WooCommerce Order when Sale Order Cancelled

 

Enabled : Yes
CustomMode : Yes
Fire on Changed : Yes
Data Type : Sale Order
Url : https://[COMPANY WEBSITE]/wp-json/wc/v3/orders/{OBJECT:ReferenceNumber}
Criteria : [Status] = 'Cancelled' And Not IsNullOrEmpty([Reference Number]) And [Source] = 'Custom web site'
Property Changes : Status
Method : PUT
Content Type : application/json
Headers : -refer to image above- (Task : WooCommerce Download : Parameter Auth-Read Only)

Contents : {FUNCTION:WooCommerceGenerateContentRefund}

Workflows : when Sale Order cancelled AND has Reference Number AND from Custom Website : this webhook will trigger to Request Refund to WooCommerce + (after that refund response succesfull) Update status Order in WooCommerce with Reference Number (as WooCommerce Order ID) to Refunded (if no refund fee in Readysell) / Completed ((if a refund fee applied in Readysell)