> 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: onPolicyCreated(event: PolicyCreated) # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> onPolicyCreated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/wix-events/events/on-policy-created.md # Method Description: A backend event that fires when a Policy is created. The `onPolicyCreated()` event handler runs when a Policy is created in your site. The received `PolicyCreated` object contains information about the new policy. > **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 policy 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 wixEvents_onPolicyCreated(event) { const eventId = event.metadata.id const entityId = event.entity._id; } /* Full policy object: { "metadata": { "id": "f3d62dd6-db0c-445a-9bd5-aa0e0e06cd44", "entityId": "370ee789-5a2d-4e48-b2cf-adaf8a54c52e", "eventTime": "2023-03-08T11:04:53.171829Z", "triggeredByAnonymizeRequest": false }, "entity": { "_id": "370ee789-5a2d-4e48-b2cf-adaf8a54c52e", "revision": "1", "_createdDate": "2023-03-08T11:04:53.166Z", "_updatedDate": "2023-03-08T11:04:53.166Z", "name": "Terms and Conditions Event 1", "body": "Tickets to this Event are issued on behalf of the Organiser and are subject to the following terms and conditions.", "eventId": "9d720f99-1b5a-4141-9877-d32985391e18" } } */ ``` ---