> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: onFulfillmentsUpdated(event: FulfillmentsUpdated) # Method package: wixEcomBackend # Method menu location: wixEcomBackend --> onFulfillmentsUpdated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/e-commerce/events/on-fulfillments-updated.md # Method Description: An event that triggers when one or more of an order's fulfillments are created, updated, or deleted. The `onFulfillmentsUpdated()` event handler runs when a fulfillment is updated. The received object contains information about the fulfillment that was updated and event metadata. > **Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event fired when an order fulfillment is updated ```javascript // Place this code in the events.js file // of your site's Backend section. // Add the file if it doesn't exist. export function wixEcom_onFulfillmentsUpdated(event) { const orderId = event.entity.orderId; const fulfillmentId = event.entity.fulfillments[0]._id; const eventId = event.metadata.id; console.log('Fulfillment updated', event) } /* Full event object: * * { * "metadata": { * "id": "aa6bf186-a19f-4085-8726-11fde6b629f7", * "entityId": "a6c3a817-579d-4cb5-8521-2fe53b2c4bf1", * "eventTime": "2023-03-08T11:04:15.512044Z", * "triggeredByAnonymizeRequest": false * }, * "entity": { * "orderId": "a6c3a817-579d-4cb5-8521-2fe53b2c4bf1", * "fulfillments": [ * { * "_id": "a838877d-3f13-49f3-ab29-1cde478e0949", * "_createdDate": "2023-03-07T14:30:21.535Z", * "lineItems": [ * { * "_id": "00000000-0000-0000-0000-000000000001", * "quantity": 1 * } * ], * "trackingInfo": { * "trackingNumber": "12345", * "shippingProvider": "usps", * "trackingLink": "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=12345" * } * } * ] * } * } * */ ``` ---