> 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: onPolicyDeleted(event: PolicyDeleted) # Method package: wixEventsV2 # Method menu location: wixEventsV2 --> onPolicyDeleted # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/wix-events/events/on-policy-deleted.md # Method Description: A backend event that fires when a Policy is deleted. The `onPolicyDeleted()` event handler runs when a Policy is deleted in your site. The received `PolicyDeleted` object contains information about the deleted 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 deleted ```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_onPolicyDeleted(event) { const eventId = event.metadata.id const entityId = event.entity._id; } /* Full policy object: { "metadata": { "id": "4ef5a02f-5263-48d9-9ed6-01e90c2ebeb0", "entityId": "c416e5a2-4518-4765-9cf0-b0d980f45a16", "eventTime": "2023-03-08T11:51:58.371593Z", "triggeredByAnonymizeRequest": false } } */ ``` ---