Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Einstein Bot entry
How-to guide

How to build an Einstein Bot

Building an Einstein Bot takes deliberate dialog design plus careful intent training. Plan the conversation flows, build the dialog tree, train intents with realistic utterances, configure actions, test thoroughly, then deploy. Bots that work well are iterated through dozens of testing rounds; bots that work poorly were shipped after one design pass.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 16, 2026

Building an Einstein Bot takes deliberate dialog design plus careful intent training. Plan the conversation flows, build the dialog tree, train intents with realistic utterances, configure actions, test thoroughly, then deploy. Bots that work well are iterated through dozens of testing rounds; bots that work poorly were shipped after one design pass.

  1. Define the bot purpose and scope

    What customer interactions should the bot handle? Order status, password reset, FAQ, appointment booking. Define the scope clearly because bots that try to do everything end up doing nothing well. Out-of-scope inputs should route to human agents.

  2. Create the bot in Setup

    Setup > Einstein Bots > New. Provide a name and description. Pick the language. Choose to start from a template (Customer Service, Lead Qualification) or build from scratch.

  3. Design the dialog tree

    Start with the Welcome dialog. Add child dialogs for each capability. Branch based on user input or variable values. Use the visual dialog editor to keep the tree readable. Keep individual dialogs small and focused.

  4. Train intents with realistic utterances

    For each intent, provide 10-20 example utterances that customers might use. The variety matters more than the count; include different phrasings, slang, typos. The NLU model learns from these examples.

  5. Define entities for data extraction

    For each piece of data the bot needs to extract (order number, email, date), define an entity. Salesforce ships standard entities (DateTime, Email, Phone Number) and supports custom entities for org-specific data.

  6. Wire actions for Apex and Flow integration

    Add Action dialog steps that invoke Apex or Flow. Pass bot variables as inputs, capture outputs into bot variables, and use the outputs in subsequent dialogs. This is how bots retrieve data and create records.

  7. Configure hand-off to human agents

    Set the Escalate to Agent dialog. Configure Omni-Channel routing to a specific queue or skill profile. Pass the conversation context so the agent knows what the customer already discussed with the bot.

  8. Test extensively in the Conversation Tester

    Use the built-in tester to run realistic customer conversations. Test the happy path, edge cases, and out-of-scope inputs. Iterate on intent training and dialog design until the bot behaves consistently.

Dialog Treeremember

The conversation structure. Each dialog is a step the bot takes; branches connect dialogs based on input.

Intents and Entitiesremember

Categorize user input and extract data. Intents drive dialog branching; entities fill variables for action inputs.

Hand-off Configurationremember

When the bot escalates to a human agent. Configure routing via Omni-Channel to the right queue or skill.

Gotchas
  • Bots are only as good as their intent training. Insufficient or poor-quality training utterances produce bots that misroute frequently. Plan for ongoing intent tuning, not a one-shot setup.
  • Dialog trees grow unwieldy if not modularized. Use sub-dialogs and reusable utility dialogs to keep the tree manageable as the bot adds capabilities.
  • Hand-off thresholds matter. Too aggressive (the bot escalates everything) defeats the purpose; too restrictive (the bot keeps fighting) frustrates customers. Tune based on real conversation logs.
  • Einstein Bots are dialog-driven; they do not handle free-form conversation well. For LLM-driven flexibility, evaluate Agentforce instead.
  • Action errors disrupt conversations. Wrap Apex and Flow actions in error handling that gracefully degrades to a default response or hand-off, not a raw error message to the customer.

See the full Einstein Bot entry

Einstein Bot includes the definition, worked example, deep dive, related terms, and a quiz.