Set Up Agentforce Voice for iOS
Agentforce Voice lets you build voice-enabled agents that manage complex conversations in real time. Set up Agentforce Voice for your iOS mobile app with these steps.
Before you set up Agentforce Voice for your mobile app, create and configure a voice-enabled service agent in Agentforce Studio.
Voice settings are configured at the agent level and apply across all supported connections.
The Agentforce Mobile SDK supports two connection paths for voice. Choose based on your requirements. Both paths require enableVoice: true in your SDK feature flags, configured in the next section.
| Agent API (Telephony) | Enhanced Chat v2 (Service Cloud) | |
|---|---|---|
| Setup | Add a Telephony connection in Agentforce Studio | Create an Embedded Service Deployment with an ECv2 channel |
| Human escalation | Not supported | Supported — agent can hand off to a live agent |
| Transcript logging | Not available | Available through Service Cloud |
| Routing | Direct to agent | Omni-Channel routing with queue fallback |
| Voice mode UI | Always available when voice is enabled | Appears after the agent joins the session |
Use this path for a lightweight integration that gets voice running with minimal server-side configuration. In Agentforce Studio, add a Telephony connection to your service agent to unlock voice settings. This “Agent API” refers to the mobile SDK’s internal connection to the agent — it’s not the same as the Agentforce Agent API used for headless server-to-server integrations. This path doesn’t require a full Service Cloud Voice telephony setup. It just activates the agent-level voice configuration for use with the mobile SDK.
- In Agentforce Studio, open your service agent.
- Go to Connections and click Add.
- Select Telephone and save.
- Configure voice settings (voice persona, language) in the agent’s voice settings panel.
This path enables richer capabilities including human escalation and transcript logging. It requires an Embedded Service Deployment with an ECv2 channel that has voice enabled.
- In Agentforce Studio, open your service agent.
- Go to Connections and click Add.
- Select Enhanced Chat V2, then save and activate.
- Go to the ECv2 connection’s Routing section and create a new channel.
- In the channel settings, select Allow Voice in Enhanced Chat and publish.
- Create a Mobile Embedded Service Deployment using that channel.
For the ECv2 path, use the Service API URL and ES Developer Name from your Embedded Service Deployment when configuring the SDK. See Before You Begin for where to find these values.
For more information, see Connect a Service Agent to Enhanced Chat v2.
After configuring your connection path, install the voice module and set up the client below. The SDK configuration is the same regardless of which path you chose.
Starting with SDK version 260.4, Agentforce Voice is a separate optional module. To use Agentforce Voice, add the LiveKit spec source and the AgentforceVoice pod to your project’s Podfile.
Then run pod install from your project’s root directory. For full Podfile setup instructions including other required sources, see Install the iOS SDK.
If you don’t use Agentforce Voice, no changes are needed — voice is no longer bundled with the core SDK by default.
If you encounter a “Voice module not available” error after installing AgentforceVoice, it may be caused by a naming mismatch between the LiveKitClient pod and the module name expected by the voice framework. Add the following pre_install hook to your Podfile to resolve it:
Then run pod install again and rebuild.
To set up Agentforce Voice for iOS, start by enabling the voice feature flag within your configuration object. Then, pass the feature flags into your AgentforceConfiguration object.
To initialize the AgentforceClient, use the configuration object you created.
Then, implement the AgentforceUIDelegate protocol. The userInitiatedVoice method is called when Voice View is opened from Chat View.
To create a chat view, use the createAgentforceChatView method. While the voice feature flag is enabled, creating a chat view makes the voice option available to users.
To create the voice view, use the createAgentforceVoiceView method.