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] = 3 And Not IsNullOrEmpty([Reference Number]) And [Sale Shipments][[Sale Order] Is Not Null And [Sale Order.Source] = 1 And [Sale Order.Status] = 3] And [Reversal Of Object] Is Null And [Reversed By Object] Is Null

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] = 5 And Not IsNullOrEmpty([Reference Number]) And [Source] = 1

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)

Message would be recorded in Message Log when WebHook triggerred. If WebHook does not trigger, contact Readysell support, modification might require in database record due to DevExpress mis-interpret for Status (Enum)