AgentforceConfiguration

Overview

Comprehensive configuration object that encapsulates all dependencies and settings required for Agentforce SDK initialization. It serves as the central configuration hub that brings together all the components needed to create a fully functional Agentforce integration.

Declaration

struct AgentforceConfiguration

Properties

Property Type Required? Description
user User Yes The current user context providing authentication state and user-specific settings
availableAgents [AgentInfo]? No Optional list of available agents that can be used for conversation targeting
agentforceCopier AgentforceCopying? No Optional clipboard integration provider for copy-to-clipboard functionality
enableDebugSettings Bool No Development and debugging flag that enables additional diagnostic tools and settings (default: false)
ignoreWelcomeMessage Bool No Flag whether or not the welcome message should be ignored (default: false)
forceConfigEndPoint String Yes The primary Salesforce org endpoint URL used for service discovery and configuration
dataProvider AgentforceDataProviding? No Optional custom data provider for Salesforce record and metadata access
imageProvider AgentforceImageProviding? No Optional custom image provider for loading and caching visual content
instrumentationHandler AgentforceInstrumentationHandling? No Optional instrumentation handler for analytics, performance monitoring, and event tracking
agentforceFeatureFlagSettings AgentforceFeatureFlagSettings Yes Feature flag configuration controlling SDK behavior and experimental functionality
agentforceConnectionInfo AgentforceConnectionInfo? No Optional pre-configured connection information for Agentforce services
salesforceNetwork SalesforceNetwork.Network? No Network abstraction layer providing HTTP communication capabilities
salesforceNavigation SalesforceNavigation.Navigation? No Optional navigation handler for integrating with your application's navigation system
salesforceLogger SalesforceLogging.Logger? No Optional logging provider for SDK diagnostic and debugging information
ttsVoiceProvider AgentforceReadbackHandler? No Optional text-to-speech provider for voice output capabilities
speechRecognizer AgentforceSpeechTranscriber? No Optional speech recognition provider for voice input capabilities
themeManager AgentforceThemeManager No Optional themeManager provider for comprehensive visual customization (default: AgentforceDefaultThemeManager())
themeOverrides AgentforceThemeOverrides? No Optional sparse bag of color, font, icon, and display-name token overrides layered on top of the theme manager
serviceApiURL String? No The service API URL for service agent configurations

Methods

Method Signature Description
init init(user:availableAgents:agentforceCopier:enableDebugSettings:ignoreWelcomeMessage:forceConfigEndpoint:dataProvider:imageProvider:instrumentationHandler:agentforceFeatureFlagSettings:agentforceConnectionInfo:salesforceNetwork:salesforceNavigation:salesforceLogger:ttsVoiceProvider:speechRecognizer:themeManager:themeOverrides:serviceApiURL:) Creates a comprehensive Agentforce configuration with all available customization options

Configuration Patterns

let config = AgentforceConfiguration(
    user: currentUser,
    forceConfigEndpoint: "https://myorg.salesforce.com",
    agentforceFeatureFlagSettings: defaultFlags,
    salesforceNetwork: networkManager,
    salesforceNavigation: navigationHandler
)
let config = AgentforceConfiguration(
    user: currentUser,
    forceConfigEndpoint: "https://myorg.salesforce.com",
    dataProvider: customDataProvider,
    imageProvider: customImageLoader,
    instrumentationHandler: analyticsHandler,
    agentforceFeatureFlagSettings: productionFlags,
    salesforceNetwork: networkManager,
    salesforceNavigation: navigationHandler,
    themeManager: customThemeManager,
    ttsVoiceProvider: voiceHandler,
    speechRecognizer: speechHandler
)
let voiceFeatureFlags = AgentforceFeatureFlagSettings(
    enableVoice: true,
    shouldBlockMicrophone: false
)

let config = AgentforceConfiguration(
    user: currentUser,
    forceConfigEndpoint: "https://myorg.salesforce.com",
    agentforceFeatureFlagSettings: voiceFeatureFlags,
    salesforceNetwork: networkManager,
    ttsVoiceProvider: textToSpeechProvider,
    speechRecognizer: speechRecognitionProvider
)

See also

  • Theming — how themeManager and themeOverrides combine to customize colors, fonts, icons, and display names