> 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: onLabelCreated(event: LabelCreated) # Method package: wixCrmV2 # Method menu location: wixCrmV2 --> onLabelCreated # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/crm/events/on-label-created.md # Method Description: Triggered when a label is created. # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## An event fired when a label 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 wixContacts_onLabelCreated(event) { const eventId = event.metadata.id; const entityId = event.entity._id; const displayName = event.entity.displayName; console.log('Label created', event); } /* Full event object: * { * "metadata": { * "id": "fee55184-82f3-47ba-bd53-fdbb5c7faf7a", * "entityId": "custom.customer-group-3", * "eventTime": "2024-01-11T12:36:09.707620304Z", * "triggeredByAnonymizeRequest": false * }, * "entity": { * "namespace": "custom", * "namespaceDisplayName": "Labels", * "key": "custom.customer-group-3", * "displayName": "Customer Group 3", * "labelType": "USER_DEFINED", * "legacyId": "222e7d37-9795-45e2-a6ef-58a40981a43c", * "_createdDate": "2024-01-11T12:36:09.702Z", * "_updatedDate": "2024-01-11T12:36:09.702Z" * } * } */ ``` ---