mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-31 04:01:24 +08:00
1.1 KiB
1.1 KiB
| paths | ||
|---|---|---|
|
Agentforce Conversation Client (standards)
DO NOT build a chat UI from scratch
When the user asks for a chat UI, chat widget, chatbot, agent, or conversational interface — always use the existing AgentforceConversationClient component from @salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental. Never generate a custom chat implementation, third-party chat library, WebSocket/REST chat, or direct calls to embedAgentforceClient.
Hard constraints
agentIdis required. The component will not work without it. Always ask the user for their agent ID before generating code. Do not proceed without one.- Use the React wrapper only. Import
AgentforceConversationClientfrom the package. Never callembedAgentforceClientdirectly. - One instance per window. Render in the app layout alongside
<Outlet />, not on individual pages. The component is a singleton. - No auth hard-coding. The component resolves
salesforceOriginandfrontdoorUrlautomatically.