Search...
onFulfillmentUpdated( )
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.
Description
An event that fires when an order fulfillment is updated.
The onFulfillmentUpdated()
event handler runs when one of the following occurs:
- The updateFulfillment() function is called.
- A tracking number on an order is edited.
Note: Backend events don't work when previewing your site.
Syntax
function onFulfillmentUpdated(event: FulfillmentUpdatedEvent): void
onFulfillmentUpdated Parameters
NAME
TYPE
DESCRIPTION
event
FulfillmentUpdatedEvent
Information about a fulfillment that was updated.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
An event when a fulfillment is updated
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.34export function wixStores_onFulfillmentUpdated(event) {5 let orderId = event.orderId;6 let fulfillmentId = event.fulfillmentId;7 let trackingNumber = event.trackingInfo.trackingNumber;8}910/* Full event object:11 *12 * {13 * "orderId": "2c6ce6e5-8b40-4d2c-882a-edeb30fb3ec2",14 * "fulfillmentId": "4afd9175-b3c5-41b9-b3cc-e65b7544e84b",15 * "trackingInfo": {16 * "trackingNumber": "6789",17 * "shippingProvider": "Some other provider",18 * "trackingLink": "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=6789"19 * }20 * }21 *22 */