This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Triggered when a visitor, contact, or member sends a message to the business.
function onMessageSentToBusiness(handler: function): void;
handler(event: MessageSentToBusinessEnvelope): void | Promise<void>
import { messages } from "@wix/inbox";
messages.onMessageSentToBusiness((event) => {
// handle your event here
});