Then, when you embed your components, you must specify the orgUrl in the component constructor. The orgUrl is required when creating components in a multi org scenario, to ensure that your component connects to the correct org.
1// Embed components from different orgs - always specify orgUrl2const dashboard = new AnalyticsDashboard({3 parentIdOrElement: "container1",4 idOrApiName: "Dashboard1",5 orgUrl: "https://org1.lightning.force.com",6});7dashboard.render();89// Embed visualization from another org10const visualization = new AnalyticsVisualization({11 parentIdOrElement: "container2",12 idOrApiName: "Viz2",13 orgUrl: "https://org2.lightning.force.com",14});15visualization.render();
Adding Orgs Dynamically
You can add new orgs or try failed orgs again after the initial SDK initialization by using the retryOrAddOrgs function.
The retryOrAddOrgs function returns the same BootstrapResponse format as the initializeAnalyticsSdk function.
Response
The initializeAnalyticsSdk function returns a BootstrapResponse object, which contains an orgStates object with the overall status and the individual org statuses.