Overview
Structure that encapsulates connection information for Agentforce services, including the service API URL and tenant identifier. This information is used to route requests to the appropriate Agentforce service endpoints.
Declaration
struct AgentforceConnectionInfo: Codable
Properties
| Property | Type | Description |
|---|---|---|
sfapURL |
String |
The Salesforce API Platform (SFAP) URL used for Agentforce service communication. |
tenantId |
String |
The tenant identifier that uniquely identifies the Salesforce organization's Agentforce service instance. |
Methods
| Method | Signature | Description |
|---|---|---|
init |
init(sfapURL:tenantId:) |
Creates a connection info instance with the specified SFAP URL and tenant ID. |
Configuration Patterns
// Provide connection information directly
let connectionInfo = AgentforceConnectionInfo(
sfapURL: "https://api.salesforce.com",
tenantId: "core/prod/00D000000000000AAA"
)
let config = AgentforceConfiguration(
user: currentUser,
forceConfigEndpoint: "https://myorg.salesforce.com",
agentforceFeatureFlagSettings: featureFlags,
agentforceConnectionInfo: connectionInfo,
salesforceNetwork: networkManager
)
When agentforceConnectionInfo is nil in AgentforceConfiguration, the SDK automatically queries connection information from the configured forceConfigEndPoint during initialization.
let config = AgentforceConfiguration(
user: currentUser,
forceConfigEndpoint: "https://myorg.salesforce.com",
agentforceFeatureFlagSettings: featureFlags,
agentforceConnectionInfo: nil, // SDK will discover automatically
salesforceNetwork: networkManager
)