> 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: onProgramUpdated(event: ProgramUpdated) # Method package: wixLoyaltyV2 # Method menu location: wixLoyaltyV2 --> onProgramUpdated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/loyalty/events/on-program-updated.md # Method Description: An event that triggers when a loyalty program is updated. The `onProgramUpdated()` event handler runs when the name or the point definition of the loyalty program is updated. The received `ProgramUpdated` object contains information about the program that was updated. `onProgramUpdated()` does not trigger when the loyalty program's status changes. >**Note:** Backend events don't work when previewing your site. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event triggered when a loyalty program is updated ```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 wixLoyalty_onProgramUpdated(event) { const eventId = event.metadata.id; const programName = event.entity.name; const updatedDate = event.entity._updatedDate; console.log('Program last updated: ', updatedDate); console.log(event); } /* Full event object: * { * "metadata": { * "id":"bc647d5a-0d2c-46db-b241-8eb82c431e86", * "entityId":"settings", * "eventTime":"2022-11-09T07:58:42.945654Z", * "triggeredByAnonymizeRequest":false * }, * "entity": { * "name":"Frequent Flower Program", * "pointDefinition": { * "customName":"Petals", * "icon":"shapes/8de38e8fe76f4e9f937ae23e9ba1eb04.svg" * }, * "status":"ACTIVE", * "_createdDate":"2022-11-07T15:26:12.798Z", * "_updatedDate":"2022-11-09T07:58:42.936Z" * } * } */ ``` ---