What role do Einstein Bots play in automating customer self-service and triage workflows?
Answer
Basics: Many support contacts are repetitive: order status, password reset, store hours. A bot handles these 24/7 and deflects them from agents, or gathers details (account, issue type) before handoff so agents start faster.
How it works:
- Setup > Einstein Bots > create a bot, choose a channel and set the bot user.
- Design dialogs: Welcome, Main Menu, topic dialogs, Confused (fallback), Transfer to Agent, End Chat, Error Handling.
- Within dialogs, add rules, messages, questions (to collect variables), and actions (Flow, Apex invocable, Knowledge, Transfer).
- Add intents (Einstein Intent Sets) so free text maps to the right dialog.
- Activate the bot and connect it to a channel (Embedded/Messaging for In-App and Web, SMS, WhatsApp and others) and route chats to the bot via Omni-Channel/Routing Configuration; escalate using Transfer to Agent with a queue/skill.
Advanced / deep dive: Pass context to the agent: set variables (Contact, Case) and write the transcript to the Messaging Session/ChatTranscript so agents see history. Use Flows for authenticated lookups and DML, and Apex invocable methods for complex logic, remembering governor limits per transaction. Measure containment rate, escalation rate and Confused dialog rate in the Bot Analytics/Einstein Bots dashboards. Branding and roadmap: Salesforce is steering newer builds toward Agentforce Service Agent (LLM-based); rule-based Einstein Bots remain supported but verify current guidance. Legacy Chat is being retired in favor of Messaging; check the retirement timeline in release notes.
Code / config example:
public with sharing class BotOrderStatus {
{ String orderNumber; }
{ String status; }
List<Res> {
Set<String> nums = <String>();
(Req r : reqs) nums.add(r.orderNumber);
Map<String, Order> byNum = <String, Order>();
(Order o : [SELECT OrderNumber, Status FROM Order WHERE OrderNumber IN :nums WITH USER_MODE]) {
byNum.put(o.OrderNumber, o);
}
List<Res> out = <Res>();
(Req r : reqs) {
();
x.status = byNum.containsKey(r.orderNumber) ? byNum.get(r.orderNumber).Status : ;
out.add(x);
}
out;
}
}