DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Enum representing the context type for an AnalyticsAgent component.
The context type determines the analytical view or data scope for the agent to use.
Use these values with AgentContextConfig.contextType when configuring an agent in single-context mode.
1import {AnalyticsAgent, AgentContextType} from '@salesforce/analytics-embedding-sdk';
2
3const agent = new AnalyticsAgent({
4 parentIdOrElement: 'agent-container',
5 idOrApiName: '0Xxfib0000000xxxxx',
6 contextConfig: {
7 contextType: AgentContextType.DASHBOARD,
8 contextTypeIdOrApiName: 'My_Dashboard_1'
9 }
10});DASHBOARD:
"dashboard"
Dashboard context. Configures the agent to use a dashboard as its data scope.
METRIC:
"metric"
Metric context. Configures the agent to use a metric as its data scope.
SDM:
"sdm"
Semantic Model context. Configures the agent to use a Semantic Model as its data scope.