Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Create Multiple Components on a Web Page with Lightning Out

Lightning Out allows you to create Salesforce components outside of the Salesforce domain.

The legacy chat product is in maintenance-only mode, and we won't continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with Messaging for In-App and Web. Messaging offers many of the chat features that you love plus asynchronous conversations that can be picked back up at any time.

Important

Embedded Service web components aren’t supported on the login page of Experience sites.

Note

To create these components with Lightning Out on the same web page as an Embedded Service component, use "embeddedService:sidebarApp" as your application tag in your call to $Lightning.use.

In this code sample, we create a `HelloWorldComp` component in the body of the HTML document where an Embedded Service component is rendered.

Component Code

1$Lightning.use(
2    "embeddedService:sidebarApp",
3    function () {
4        $Lightning.createComponent(
5            "c:HelloWorldComp",
6            { … },
7            document.body,
8            function (cmp) {
9                console.log("callback");
10            }
11        );
12    },
13    “communityEndpointUrl”,
14    ...
15);