> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

> **Deprecated.** This method is deprecated. Planned removal date: 2025-01-01.

# Method name: onBookingUpdated(event: BookingEvent)

# Method package: wixBookingsBackend

# Method menu location: wixBookingsBackend --> Events --> onBookingUpdated

# Method Link: https://dev.wix.com/docs/velo/apis/wix-bookings-backend/events/on-booking-updated.md

# Method Description:

**Deprecated.**
The onBookingUpdated event has been deprecated and will be removed on June 30, 2026. Use the Bookings V2 [Booking Updated](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings/bookings-writer-v2/booking-updated?apiView=SDK.md) SDK event instead.

The `onBookingUpdated()` event handler runs when a booking's details are updated.

The `event` object includes a `trigger` property that describes the action that triggered the event. The `trigger` value for this event is `"OWNER_UPDATED_ATTENDANCE"` when the business updates the booking's attendance information.

> **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 when a booking is updated

```javascript
// Place this code in the events.js file
// of your site's Backend section.
export function wixBookings_onBookingUpdated(event) {
  const eventTrigger = event.trigger;
  const bookingId = event.booking._id;
}

/* Full event object 
 *  {
 *    "trigger": "OWNER_UPDATED_ATTENDANCE",
 *    "booking": {
 *      "_id": "9f5a05d6-2fb4-4de8-990d-12db585d25c5",
 *      "bookedResources": [{
 *        "_id": "6dd5e48d-9e6d-4e74-bf61-e103e8d52575",
 *        "name": "Jane Doe",
 *        "email": "Doe"
 *      }],
 *      "status": "CONFIRMED",
 *      "_createdDate": "2021-02-28T18:11:56.177Z",
 *      "attendanceInfo": {
 *        "attendanceStatus": true,
 *        "numberOfAttendees": 3
 *      },
 *      "bookingSource": {
 *        "platform": "WEB",
 *        "actor": "BUSINESS",
 *        "appDefId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
 *        "appName": "Wix Bookings"
 *      },
 *      "bookedEntity": {
 *        "serviceId": "2e80e5e0-2385-49c7-9f9f-2e59a3566809",
 *        "scheduleId": "f1945fde-d567-4ebc-85ef-dd1d52327c11",
 *        "singleSession": {
 *          "sessionId": "2mmoW0vwKcSFyxtOfCdMhFC1gAivXqAQVAQP0hHoOUADs242fBtwKRY3sHLMmbVxJ75TQ4G6BkCe6z1E1fVT6gUPWDDNF4WX2S6P",
 *          "start": "2021-03-18T19:00:00.000Z",
 *          "end": "2021-03-18T20:00:00.000Z"
 *        },
 *        "title": "Appointment service",
 *        "rate": {
 *          "labeledPriceOptions": {
 *            "general": {
 *              "amount": "10",
 *              "currency": "USD",
 *              "downPayAmount": "0"
 *            }
 *          }
 *        },
 *        "tags": ["INDIVIDUAL"],
 *        "location": { "locationType": "OWNER_BUSINESS" }
 *      },
 *      "paymentDetails": {
 *        "balance": {
 *          "finalPrice": {
 *            "amount": "10",
 *            "currency": "USD",
 *            "downPayAmount": "0"
 *          },
 *          "amountReceived": "0"
 *        },
 *        "state": "PENDING_MARK_AS_PAID",
 *        "wixPayMultipleDetails": [{
 *          "txId": "c1cef510-e382-4c1c-aeec-4300cfea219a",
 *          "orderId": "179c361c-8a04-4f78-b28f-065b62cf4806",
 *          "orderAmount": "10",
 *          "paymentVendorName": "inPerson",
 *          "orderApprovalTime": null
 *        }]
 *      },
 *      "formInfo": {
 *        "paymentSelection": [{
 *          "rateLabel": "general",
 *          "numberOfParticipants": 1
 *        }],
 *        "additionalFields": [{
 *          "_id": "00000000-0000-0000-0000-000000000008",
 *          "label": "Add Your Message",
 *          "valueType": "LONG_TEXT"
 *        }],
 *        "contactDetails": {
 *          "contactId": "baf3cd37-c32c-4f01-9e1a-c8ab152af490",
 *          "firstName": "Adam Smith ",
 *          "email": "asmith@amail.com",
 *          "phone": "9998765",
 *          "timeZone": "America/New_York",
 *          "countryCode": "US"
 *        }
 *      }
 *    },
 *    "previousBooking": {
 *      "_id": "9f5a05d6-2fb4-4de8-990d-12db585d25c5",
 *      "bookedResources": [{
 *        "_id": "6dd5e48d-9e6d-4e74-bf61-e103e8d52575",
 *        "name": "Jane Doe",
 *        "email": "Doe"
 *      }],
 *      "status": "CONFIRMED",
 *      "_createdDate": "2021-02-28T18:11:56.177Z",
 *      "attendanceInfo": {
 *        "attendanceStatus": true,
 *        "numberOfAttendees": 1
 *      },
 *      "bookingSource": {
 *        "platform": "WEB",
 *        "actor": "BUSINESS",
 *        "appDefId": "13d21c63-b5ec-5912-8397-c3a5ddb27a97",
 *        "appName": "Wix Bookings"
 *      },
 *      "bookedEntity": {
 *        "serviceId": "2e80e5e0-2385-49c7-9f9f-2e59a3566809",
 *        "scheduleId": "f1945fde-d567-4ebc-85ef-dd1d52327c11",
 *        "singleSession": {
 *          "sessionId": "2mmoW0vwKcSFyxtOfCdMhFC1gAivXqAQVAQP0hHoOUADs242fBtwKRY3sHLMmbVxJ75TQ4G6BkCe6z1E1fVT6gUPWDDNF4WX2S6P",
 *          "start": "2021-03-18T19:00:00.000Z",
 *          "end": "2021-03-18T20:00:00.000Z"
 *        },
 *        "title": "Appointment service",
 *        "rate": {
 *          "labeledPriceOptions": {
 *            "general": {
 *              "amount": "10",
 *              "currency": "USD",
 *              "downPayAmount": "0"
 *            }
 *          }
 *        },
 *        "tags": ["INDIVIDUAL"],
 *        "location": { "locationType": "OWNER_BUSINESS" }
 *      },
 *      "paymentDetails": {
 *        "balance": {
 *          "finalPrice": {
 *            "amount": "10",
 *            "currency": "USD",
 *            "downPayAmount": "0"
 *          },
 *          "amountReceived": "0"
 *        },
 *        "state": "PENDING_MARK_AS_PAID",
 *        "wixPayMultipleDetails": [{
 *          "txId": "c1cef510-e382-4c1c-aeec-4300cfea219a",
 *          "orderId": "179c361c-8a04-4f78-b28f-065b62cf4806",
 *          "orderAmount": "10",
 *          "paymentVendorName": "inPerson",
 *          "orderApprovalTime": null
 *        }]
 *      },
 *      "formInfo": {
 *        "paymentSelection": [{
 *          "rateLabel": "general",
 *          "numberOfParticipants": 1
 *        }],
 *        "additionalFields": [{
 *          "_id": "00000000-0000-0000-0000-000000000008",
 *          "label": "Add Your Message",
 *          "valueType": "LONG_TEXT"
 *        }],
 *        "contactDetails": {
 *          "contactId": "baf3cd37-c32c-4f01-9e1a-c8ab152af490",
 *          "firstName": "Adam Smith ",
 *          "email": "asmith@amail.com",
 *          "phone": "9998765",
 *          "timeZone": "America/New_York",
 *          "countryCode": "US"
 *        }
 *      }
 *    }
 *  }
 */
```

---