Search.../

onGuestDeleted( )

A backend event that fires when a Guest is deleted.

Description

The onGuestDeleted() event handler runs when a Guest is deleted from your site. The received GuestDeleted object contains information about the deleted guest.

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

Syntax

function wixEventsGuests_onGuestDeleted(event: GuestDeleted): void

onGuestDeleted Parameters

NAME
TYPE
DESCRIPTION
event
Optional
GuestDeleted

Information about the onGuestDeleted event.

Returns

This function does not return anything.

Return Type:

void

Was this helpful?

A backend event that occurs when a guest is deleted

Copy Code
1// Place this code in the events.js file
2// of your site's Backend section.
3// Add the file if it doesn't exist.
4
5export function wixEventsGuests_onGuestDeleted(event) {
6 const eventId = event.metadata.id
7 const entityId = event.entity._id;
8 }
9
10/* Full guest object:
11{
12 "metadata": {
13 "id": "f9325e7a-1875-424f-8fdb-83edb03a4f7a",
14 "entityId": "984476a1-8a92-455a-863c-bf1efc816f7e",
15 "eventTime": "2023-04-19T13:23:04.892039Z",
16 "triggeredByAnonymizeRequest": false
17 }
18}
19*/