AgentforceClient
The primary entry point and orchestrator for all Agentforce SDK functionality. It serves as the central coordinator that manages agent conversations, UI component creation, and service dependencies. It implements a comprehensive architecture that handles authentication, networking, theming, and extensibility through provider protocols.
Method | Signature | Description |
---|---|---|
init | init(credentialProvider:mode:viewProvider:themeManager:) | Creates an AgentforceClient with full customization capabilities including view provider overrides |
startAgentforceConversation(forAgentId:sessionId:) | func startAgentforceConversation(forAgentId: String?, sessionId: String?) -> AgentConversation | Initiates a new conversation session with an Agentforce agent |
startAgentforceConversation(forESDeveloperName:) | func startAgentforceConversation(forESDeveloperName: String) -> AgentConversation | Initiates a new conversation session with a service agent using Einstein Service developer name |
getExistingAgentforceConversation | func getExistingAgentforceConversation(forAgentId: String, sessionId: String?) -> AgentConversation? | Gets an existing Agentforce conversation that matches the specified criteria |
createAgentforceChatView | func createAgentforceChatView(conversation:delegate:showTopBar:onContainerClose:) throws -> AgentforceChatView | Creates a fully-configured Agentforce chat interface for interactive dialogue |
createAgentforceCard | func createAgentforceCard(chatView:launchChatView:) -> AgentforceCard | Creates a compact conversation summary card with follow-up interaction capabilities |
createAgentforceLauncher | func createAgentforceLauncher(chatView:launchChatView:) -> AgentforceLauncher | Creates an Agentforce Launcher View |
createAgentforceVoiceView | func createAgentforceVoiceView(conversation:auraColors:onContainerClose:) throws -> AgentforceVoiceView | Creates an Agentforce Voice View for real time voice interaction |