Search...
onGuestUpdated( )
A backend event that fires when a Guest is updated.
Description
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.
Syntax
function wixEventsGuests_onGuestUpdated(event: GuestUpdated): void
onGuestUpdated Parameters
NAME
TYPE
DESCRIPTION
event
Optional
GuestUpdated
Information about the updated guest and onGuestUpdated
event.
Returns
This function does not return anything.
Return Type:
void
Was this helpful?
A backend event that occurs when a guest is updated
Copy Code
1// Place this code in the events.js file2// of your site's Backend section.3// Add the file if it doesn't exist.45 export function wixEventsGuests_onGuestUpdated(event) {6 const eventId = event.metadata.id7 const entityId = event.entity._id;8 }910/* Full guest object11{12 "metadata": {13 "id": "2224535e-a4dd-476e-ac0e-4adb11cae9c7",14 "entityId": "afda7995-72d0-4d58-9ba4-3f6c5213c35c",15 "eventTime": "2023-04-19T12:39:05.640423Z",16 "triggeredByAnonymizeRequest": false17 },18 "entity": {19 "_id": "afda7995-72d0-4d58-9ba4-3f6c5213c35c",20 "eventId": "3d3d5c04-ece0-45a8-85f0-11a58edaa192",21 "orderNumber": "2TFG-RXPW-00Z",22 "tickets": [23 {24 "number": "2TFG-RXPW-00Z1P",25 "definitionId": "9b5b5cc0-b017-49d1-a59c-81c7cff580a6",26 "name": "Participant Ticket"27 }28 ],29 "contactId": "023b6403-17e6-42dc-b475-a5ae6c2b8df4",30 "guestDetails": {31 "email": "john.doe@mail.com",32 "firstName": "John",33 "lastName": "Doe",34 "formResponse": {35 "inputValues": [36 {37 "inputName": "firstName",38 "value": "John",39 "values": []40 },41 {42 "inputName": "lastName",43 "value": "Doe",44 "values": []45 },46 {47 "inputName": "email",48 "value": "john.doe@mail.com",49 "values": []50 }51 ]52 },53 "checkedIn": false54 },55 "attendanceStatus": "ATTENDING",56 "_createdDate": "2023-04-19T12:39:05.561Z",57 "_updatedDate": "2023-04-19T12:39:05.602Z",58 "attendanceStatusUpdatedDate": "2023-04-19T12:39:05.424Z",59 "guestType": "BUYER"60 }61}62*/