Develop Secure Code
View Components in Setup
CRM Analytics Dashboards
Create Components for Forecasts Pages
Form Factors
Lightning Console Apps
Open Files
Outlook and Gmail
Standalone Apps
Use Mobile Device Features
Utility Bar
Visualforce Pages
Implement custom functionality using Lightning web components and then use them interactively with CRM Analytics dashboard widgets and steps.
The componentName.js-meta.xml file defines the metadata values for the component, including the setting to allow usage in a CRM Analytics dashboard. Add the analytics__Dashboard target to the component’s configuration file. Ensure that the isExposed attribute is set to true so the component is visible to the CRM Analytics designer UI.
1<?xml version="1.0" encoding="UTF-8"?>
2<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3 <isExposed>true</isExposed>
4 <targets>
5 <target>analytics__Dashboard</target>
6 </targets>
7</LightningComponentBundle>In the componentName.js-meta.xml file, add a targetConfig for the analytics__Dashboard target. Set the hasStep tag to true if the component is designed to use CRM Analytics query data from a dashboard step. For each component attribute that is designed to be used by a CRM Analytics dashboard, add property tag.
1<?xml version="1.0" encoding="UTF-8"?>
2<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3 <targetConfig targets="analytics__Dashboard">
4 <hasStep>true</hasStep>
5 <property name="title" type="String" label="Title" description="Component Title" required="true" />
6 </targetConfig>
7</LightningComponentBundle>In addition to the common data types, the analytics__Dashboard target also supports Measure and Dimension data types for components with <hasStep>true</hasStep>. The dashboard editor is able to choose a column of the given data type from the results of the attached step.
1<?xml version="1.0" encoding="UTF-8"?>
2<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3 <targetConfig targets="analytics__Dashboard">
4 <hasStep>true</hasStep>
5 <property name="labelColumn" type="Dimension" label="Label Column" description="Segment Label" required="true" />
6 </targetConfig>
7</LightningComponentBundle>After completing these steps, add your Lightning web component as a component widget in the CRM Analytics Studio dashboard editor. For more information, see the Lightning Web Components in CRM Analytics Dashboards developer guide.