Agent Chat
Overview
The Agent Chat component displays a conversational chat interface connected to an Agentforce agent. Use it on Lightning Pages or Experience Sites to let users interact with an AI agent directly from a Salesforce record or app page.
Quick Start
Scenario: Add an Employee Assistant chat to a Lightning Home Page, powered by an existing Agentforce agent.
Set the Agent API Name
Select the component on the Canvas.
In the Properties Panel, enter the API name of your Agentforce agent in the Agent API Name field.
Example:
Agentforce_Employee_Agent
Why: This connects the chat interface to a specific Agentforce agent. The value must match the agent's API name exactly as configured in Salesforce.
Configuration Reference
Agent
Controls which Agentforce agent powers the chat.
Agent API Name
The API name of the Agentforce agent to connect to. Must match the agent's API name in Salesforce Setup exactly.
Agentforce_Employee_Agent
Content
Controls the welcome screen displayed before the user sends their first message.
Hide Welcome Image
Hides the default robot illustration on the welcome screen. (Default: off)
On / Off
No Results Title
The heading shown on the welcome screen.
Let's chat!, How can I help you today?
No Results Message
A supporting message shown below the title on the welcome screen. Leave blank to show the title only.
Ask me anything about your open cases.
Disabled
Prevents users from typing or sending messages. Use to temporarily lock the component without removing it. (Default: off)
On / Off
Chat Input
Controls the message input area at the bottom of the component.
Placeholder
The hint text shown inside the input field before the user types.
Describe your task or ask a question...
Set Component Visibility
Controls when the Agent Chat component is visible on the page. Use this to show or hide the component based on field values, user profile, or other conditions without configuring a separate rule on the Lightning Page.
Refer to the Component Visibility documentation for the full list of supported conditions.
Common Patterns
Employee Self-Service Assistant
Agent API Name:
Agentforce_Employee_AgentNo Results Title:
How can I help you today?Placeholder:
Ask me anything about HR policies, benefits, or IT requests...Add to the Home Page so employees can access the agent from any context.
Case Resolution Assistant
Agent API Name:
Agentforce_Case_AgentNo Results Title:
Need help resolving this case?Placeholder:
Describe the issue or ask a question...Add to a Case Record Page. The agent has access to the case context through the Agentforce configuration.
Gated Agent (Admin-Controlled)
Use Disabled toggle with a Set Component Visibility rule to enable the chat only for specific profiles or when a record field meets a condition (e.g.,
Status = Active).
Troubleshooting
The chat loads but the agent does not respond
Cause: The Agent API Name does not match the agent's API name in Salesforce Setup, or the agent is inactive.
Fix: Go to Salesforce Setup → Agentforce → confirm the API name and that the agent is active. Copy the exact API name into the component's Agent API Name field.
Last updated
Was this helpful?
