> 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: onBadgeAssigned(event: BadgeAssignedEvent) # Method package: wixMembersV2 # Method menu location: wixMembersV2 --> onBadgeAssigned # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/members/events/on-badge-assigned.md # Method Description: Triggered when a member receives a badge. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event that occurs when a badge is assigned ```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 wixBadges_onBadgeAssigned(event) { const memberId = event.data.memberId; console.log(`Badge assgigned to member ${memberId}`); } /* Full event object: * { * "data": { * "memberId": "ff20c02e-3d13-4412-9529-d628aa0abc12" * }, * "metadata": { * "entityId": "348b66e1-fb48-4b2d-8a68-6c69e3ac967b", * "eventTime": "2024-03-22T06:09:09.752905936Z", * "id": "25bf06fe-c6bb-4254-a1d0-a98502a6a041", * "triggeredByAnonymizeRequest": false * } * } */ ``` ---