Deprecated.
This event will continue to work until September 4, 2024, but a newer version is available at
wix-ecom-backend.Events.onFulfillmentsUpdated()
.
We recommend you migrate to the new Wix eCommerce APIs as soon as possible.
An event that fires when an order fulfillment is updated.
The onFulfillmentUpdated()
event handler runs when one of the following occurs:
Note: Backend events don't work when previewing your site.
function onFulfillmentUpdated(event: FulfillmentUpdatedEvent): void;
Information about a fulfillment that was updated.
// Place this code in the events.js file
// of your site's Backend section.
export function wixStores_onFulfillmentUpdated(event) {
let orderId = event.orderId;
let fulfillmentId = event.fulfillmentId;
let trackingNumber = event.trackingInfo.trackingNumber;
}
/* Full event object:
*
* {
* "orderId": "2c6ce6e5-8b40-4d2c-882a-edeb30fb3ec2",
* "fulfillmentId": "4afd9175-b3c5-41b9-b3cc-e65b7544e84b",
* "trackingInfo": {
* "trackingNumber": "6789",
* "shippingProvider": "Some other provider",
* "trackingLink": "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=6789"
* }
* }
*
*/
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.