> 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: onMessageSentToParticipant(event: MessageSentToParticipantEvent) # Method package: wixInboxV2 # Method menu location: wixInboxV2 --> onMessageSentToParticipant # Method Link: https://dev.wix.com/docs/velo/events-service-plugins/inbox/events/on-message-sent-to-participant.md # Method Description: An event that triggers when a business sends a message to a contact, member, or site visitor. The `onMessageSentToParticipant()` event handler runs when a message is sent from a business to a site's contact, member, or visitor. The received `MessageSentToParticipantEvent` object contains information about the message that was sent. >**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 the business site messages the site user ```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 wixCrmInbox_onMessageSentToParticipant(event) { const eventId = event.metadata.id; const messageId = event.data.message._id; const conversationId = event.data.conversationId; } /* Full event object: * { * "data": { * "conversationId": "6fd2b962-dd8f-382f-8d27-ae63f188c939", * "message": { * "_createdDate": "2023-11-15T16:18:56.558Z", * "_id": "1700065136558061", * "appId": "151e476a-715e-ec33-db9a-a7ff4d51f70a", * "badges": [], * "content": { * "previewText": "Thank You", * "basic": { * "items": [ * { * "text": "Thank you for submitting!" * } * ] * }, * "contentType": "BASIC" * }, * "direction": "BUSINESS_TO_PARTICIPANT", * "sender": { * "wixUserId": "b17c523c-6ec9-4b56-9d9d-123cc6978bdf" * }, * "sequence": "1700065136558061", * "sourceChannel": "UNKNOWN_CHANNEL_TYPE", * "targetChannels": [], * "visibility": "BUSINESS_AND_PARTICIPANT" * }, * } * "metadata": { * "id": "2715920c-e7d4-4bd0-ab00-33cb3fe01a9f", * "entityId": "1700065136558061", * "eventTime": "2023-11-15T16:18:56.681603Z", * "triggeredByAnonymizeRequest": false * } * } */ ``` ---