mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-08 16:25:58 +08:00
1.6 KiB
1.6 KiB
Troubleshooting
Common issues when using the Agentforce Conversation Client.
Chat widget does not appear
Cause: Missing or invalid agentId. The component will not render anything without a valid agent ID.
Solution:
- Verify
agentIdis passed inagentforceClientConfig— it is required - Confirm the ID is correct (18-character Salesforce record ID, starts with
0Xx) - Check that the agent exists and is Active in Setup → Agents
Chat loads but shows "agent not available"
Cause: The agent exists but is not deployed or is inactive.
Solution:
- In Setup → Agents, ensure the agent status is Active
- Verify the agent is deployed to the correct channel
Authentication error on localhost
Cause: localhost:<PORT> is not in the org's trusted domains for inline frames.
Solution:
- Go to Setup → Session Settings → Trusted Domains for Inline Frames
- Add
localhost:<PORT>(e.g.localhost:3000) - Restart the dev server
Chat fails to authenticate / blank iframe
Cause: "Require first party use of Salesforce cookies" is enabled in the org's session settings. This blocks the embedded client from establishing a session.
Solution:
- Go to Setup → Session Settings
- Find "Require first party use of Salesforce cookies"
- Uncheck / disable this setting
- Save and reload the app
Multiple chat widgets appear
Cause: AgentforceConversationClient is rendered in multiple places.
Solution: Render it once in the app layout, not on individual pages. The component uses a singleton pattern — only one instance should exist per window.