Type Alias: AgentProps
AgentProps:
Omit<ComponentProps,"filters"> &object
Defines the properties for creating an AnalyticsAgent component.
The agent supports two operating modes:
- Single-context mode: Provide
contextConfigto track a single analytics asset. - Multi-component mode: Omit
contextConfigto automatically track all embeddedAnalyticsDashboardandAnalyticsMetriccomponents on the page.
Multi-org Note: In multi-org scenarios, always specify the orgUrl property to indicate which org the agent exists in. The orgUrl must be a Lightning URL (e.g., https://yourorg.lightning.force.com).
optionalagentName:string
The custom display name for the agent. The default name is 'Analytics and Visualization'.
optionalcontextConfig:AgentContextConfig
Optional. The context configuration for the agent.
When provided, the agent runs in single-context mode and tracks only the specified component.
When omitted, the agent runs in multi-component mode and automatically tracks all embedded AnalyticsDashboard and AnalyticsMetric components on the page.
idOrApiName:
string
Required. The ID of the Agentforce agent to embed.
optionalshowHeader:boolean
A boolean value indicating whether to display the agent's header section or not. The default value is false.
optionalshowHeaderActions:boolean
A boolean value indicating whether to display the agent's header actions, information and restart session, or not. The default value is false.
optionalstyleTokens:AgentStyleTokens
The style tokens for theming the agent UI. See AgentStyleTokens for available tokens.
optionalwelcomeText:string
The initial welcome message displayed before the user sends a message.