Custom Lightning Web Components for Messaging for Web

This release is in preview. Features described here don’t become generally available until Winter ’23.

Build custom components for Messaging for Web using Lightning Web Components (LWC). With LWC, leverage HTML and JavaScript for a modern experience.

To learn more about building LWC and deploying them to your org, see:

A custom pre-chat component enables customization of the user interface for the pre-chat form. When you create your custom pre-chat component, specify the lightningSnapin__MessagingPrechat target in the js-meta.xml configuration file of your LWC. If you don’t add this target to the configuration file, you can't see the LWC in your Messaging for Web experience.

Then add a preChatSubmit event to the dispatchEvent function to the .js file for your LWC. This function takes a CustomEvent object with two fields. The first field is the event name preChatSubmit, and the second one is a JSON payload with the form field values. Here’s an example of the dispatchEvent function.

See Also