In Salesforce, Agentforce conversations are billable per conversation. If a user visits your bot just for basic information, starting the conversation directly with Agentforce can incur costs unnecessarily. To optimize this or cost saving , you can Transfer Chat from Einstein Bot to Agentforce Service Agent ,use Einstein Bot for handling simple tasks and only transfer the chat to Agentforce Service Agent when the user needs advanced support or more perform more complex tasks.
In this guide, we’ll walk through the step-by-step process to set this up.
Table of Contents
TogglePrerequisites to Transfer Chat from Einstein Bot to Agentforce Service Agent
- You have an Einstein Bot created and deployed on your Messaging Channel.
- You have Agentforce Service Agent already set up and configured.
Step 1: Create an Omni-Channel Flow to Route Chat
1. Create a New Flow
- Go to Setup > Flows
- Click New Flow
- Select Type: Autolaunched Flow (No Trigger)
2. Create a Variable
- Resource Type: Variable
- API Name:
recordId
- Data Type: Text
- Availability: Check Available for input
3. Add “Route Work” Element
- Drag the Route Work element onto the canvas.
4. Configure “Route Work” Element
- How Many Work Records to Route?:
Single
- Record ID Variable:
recordId
- Service Channel:
Messaging
- Route To:
Agentforce Service Agent
- Agentforce Service Agent: Select your agent (e.g.,
Cosmo First Service Agent
)
5. Set Fallback Queue (Recommended)
- Fallback Queue Option:
Select Queue
- Fallback Queue: Choose your messaging fallback queue
Troubleshooting Queue Not Appearing
- Go to Setup > Queues
- Open your Queue and ensure:
- A Routing Configuration is assigned
- The Messaging Service Channel is added to that routing configuration
6. Save and Activate the Flow
- Click Save
- Click Activate
Step 2: Configure Einstein Bot to Use the Flow
1. Open the Desired Dialog
- In Einstein Bot Builder, open the dialog where you want to trigger the agent handoff (e.g., “Know More About HCL”).
2. Add a Rule Action
- Click “+” and choose Rules, or edit an existing Rules component.
- In Step Properties > Rule Actions, set the following:
- Set Rule Action:
Set Routing Type
- Route Type:
Omni-Channel Flow
- Route Destination: Select the flow you created (e.g.,
Bot Flow
)
- Set Rule Action:
3. Create a Destination Variable
- Click Create New Variable
- Name:
omnichannel
(or any meaningful name) - Type:
ID
- Name:
This variable will hold the work item ID returned by the routing flow.
4. Add the Transfer Step
- After the Rules component, add a Transfer action.
- Use the variable
omnichannel
as the Work ID.
5. End the Dialog Gracefully
- After the transfer, add a final step like End Chat to close the dialog cleanly.
Benefits and Features
Using an Einstein Bot with Agentforce Service Agent gives you good control over your support process. The bot can handle basic tasks like answering common questions, saving time and money. When tasks or things get more complex, Transfer Chat from Einstein Bot to Agentforce Service Agent, which can give advanced help. This setup makes support faster, reduces costs, and improves the user experience. You can also track the conversations better, use automation smartly, and make sure your agents focus only on important cases. It’s a great way to balance cost-efficiency with high-quality support.
Conclusion
Using an Einstein Bot for basic questions helps save money because chats with Agentforce is billable. With this setup, your bot can handle simple tasks, and only when a user needs more help or want to poerform more complex tasks then the chat is smoothly tranfered to the Agentforce Service Agent. This way, you get the best of both worlds — saving costs and still giving great support when it’s really needed.
You can deepen your understanding of Data Cloud by exploring our comprehensive course on Salesforce Data Cloud and Agentforce – Building Agents and also check out our latest blogs on our websites for additional knowledge about salesforce.