> 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: onGuestCreated(event: GuestCreated) # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> onGuestCreated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/wix-events/events/on-guest-created.md # Method Description: A backend event that fires when a Guest is created. The `onGuestCreated()` event handler runs when a Guest is created on your site. The received `GuestCreated` object contains information about the new guest. > **Note**: Backend events are not fired when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## A backend event that occurs when a guest is created ```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_onGuestCreated(event) { const eventId = event.metadata.id const entityId = event.entity._id; } /* Full guest object: { "metadata": { "id": "02459af3-da70-4173-a607-65678e99ef30", "entityId": "afda7995-72d0-4d58-9ba4-3f6c5213c35c", "eventTime": "2023-04-19T12:39:05.690213Z", "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" } } */ ``` ---