You are here:
Set Up Voice Replies for WhatsApp
Agentforce turns on voice message replies by default when your agent has a Messaging connection with Adaptive Response Formats turned on. Use this task to verify that setup or turn voice message replies off.
Required Editions
| View supported editions. | |
This article applies to:
|
Enhanced WhatsApp channels |
This article doesn’t apply to:
|
Enhanced In-App Chat, Enhanced Web Chat v1, Enhanced Web Chat v2, Enhanced Facebook Messenger, Standard and Enhanced SMS, Enhanced Apple Messages for Business, Enhanced LINE, and Bring Your Own Channel |
| User Permissions Needed | |
|---|---|
| To set up WhatsApp channels: | Configure Messaging AND View Setup and Configuration |
| To create WhatsApp channels: | System Administrator AND Configure Messaging OR Configure Messaging AND Customize Application AND Manage Auth. Providers AND View Setup and Configuration AND Modify All Data |
Confirm these requirements:
- Set up a WhatsApp messaging channel.
- Connect your WhatsApp Business account.
- Confirm that Messaging and Digital Engagement are turned on.
- Map
MessagingSession.idto the context variable nameRoutableId. - Create your agent in Agentforce Builder. Agents created in the legacy builder aren't supported.
- Confirm that your agent uses the Atlas reasoning engine. Agents created in Agentforce Builder use Atlas by default.
- Test that your agent responds to text messages on WhatsApp. Voice messages require a working text conversation first.
Configure the agent's Messaging connection to control voice message replies.
- From the App Launcher, enter Agent, and select Agentforce Studio, and then click Agents.
- Select the agent you want to configure.
- In the Explorer panel, expand Connections.
- Check whether a Messaging connection is listed under Connections. If a Messaging connection isn't listed, click + Add Connections.
-
Select Messaging as the connection type.
- Click Add to Agent.
- Turn on Adaptive Response Formats.
-
Switch to Script view and find the
connection_messagingblock. Confirm thatmessaging_audiois included in both theresponse_actionsandresponse_formatslists.New Messaging connections include
messaging_audioby default. If your connection was created before voice message support was available, it might be missing. If so, addmessaging_audioto bothresponse_actionsandresponse_formats.response_actions: messaging_audio: @response_formats.messaging_audio response_formats: messaging_audio: label: "Audio Response" description: "A response action that replies to the user with an audio note (voice message). Use this to send the response as spoken audio when the user communicated with an audio note." target: "system://MessagingAudio"After you paste the code in Agent Script, the
connection_messagingblock looks like this.
Tip To turn voice message replies off instead, removemessaging_audiofrom bothresponse_actionsandresponse_formats. Your agent still transcribes and processes incoming voice messages but replies with text.
After messaging_audio is included in both
response_actions and response_formats, your agent
automatically replies with a voice message when a WhatsApp user sends a voice message.


