onGuestUpdated( )


A backend event that fires when a Guest is updated.

The onGuestUpdated() event handler runs when a Guest is updated from your site. The received GuestUpdated object contains information about the updated guest.

Note: Backend events are not fired when previewing your site.

Method Declaration
Copy
function wixEventsGuests_onGuestUpdated(event: GuestUpdated): void;
Method Parameters
eventGuestUpdated

Information about the updated guest and onGuestUpdated event.

A backend event that occurs when a guest 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 wixEventsGuests_onGuestUpdated(event) { const eventId = event.metadata.id; const entityId = event.entity._id; } /* Full guest object { "metadata": { "id": "2224535e-a4dd-476e-ac0e-4adb11cae9c7", "entityId": "afda7995-72d0-4d58-9ba4-3f6c5213c35c", "eventTime": "2023-04-19T12:39:05.640423Z", "triggeredByAnonymizeRequest": false }, "entity": { "_id": "afda7995-72d0-4d58-9ba4-3f6c5213c35c", "eventId": "3d3d5c04-ece0-45a8-85f0-11a58edaa192", "orderNumber": "2TFG-RXPW-00Z", "tickets": [ { "number": "2TFG-RXPW-00Z1P", "definitionId": "9b5b5cc0-b017-49d1-a59c-81c7cff580a6", "name": "Participant Ticket" } ], "contactId": "023b6403-17e6-42dc-b475-a5ae6c2b8df4", "guestDetails": { "email": "john.doe@mail.com", "firstName": "John", "lastName": "Doe", "formResponse": { "inputValues": [ { "inputName": "firstName", "value": "John", "values": [] }, { "inputName": "lastName", "value": "Doe", "values": [] }, { "inputName": "email", "value": "john.doe@mail.com", "values": [] } ] }, "checkedIn": false }, "attendanceStatus": "ATTENDING", "_createdDate": "2023-04-19T12:39:05.561Z", "_updatedDate": "2023-04-19T12:39:05.602Z", "attendanceStatusUpdatedDate": "2023-04-19T12:39:05.424Z", "guestType": "BUYER" } } */
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?