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

How to set up Bot Action in Salesforce

Bot Actions are the operations Einstein Bots perform during conversations — sending a message, asking a question, calling Apex, invoking a Flow, querying Salesforce records, escalating to a human agent. Each Dialog step in Bot Builder picks a Bot Action; chained Actions compose the full bot conversation.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated Apr 20, 2026

Bot Actions are the operations Einstein Bots perform during conversations — sending a message, asking a question, calling Apex, invoking a Flow, querying Salesforce records, escalating to a human agent. Each Dialog step in Bot Builder picks a Bot Action; chained Actions compose the full bot conversation.

  1. Open the bot in Bot Builder

    Setup → Einstein Bots → click into a bot → Open Bot Builder.

  2. Open the Dialog where the action goes

    Each Dialog has a series of steps; each step is a Bot Action.

  3. Click + to add a new step

    Pick the Action Type — Message / Question / Variable / Action / Rule / Subflow / End.

  4. For Apex Bot Action: pick Action → Apex

    Reference an Apex class implementing InvocableAction. Inputs from variables; output written back.

  5. For Flow Bot Action: pick Action → Flow

    Reference an Autolaunched Flow. Inputs from bot variables; output sets bot variables.

  6. For SOQL: pick Get Records

    Query Salesforce data without Apex. Returns a list — bind to a variable.

  7. For escalation: pick Transfer to Agent

    Hands off to a live agent via Omni-Channel routing.

  8. Save and test in the Test Pane

    Trigger the dialog with a sample input → confirm the action fires correctly.

Key options
Action Typeremember

Message / Question / Variable / Apex / Flow / Get Records / Transfer / End.

Inputs / Outputsremember

Bot variables passed into and out of actions.

Apex classremember

Custom logic, full Salesforce API access.

Flowremember

Declarative logic, easier to maintain.

Transfer to Agentremember

Routes via Omni-Channel.

Gotchas
  • Apex Bot Actions must implement specific interfaces. The Apex class needs @InvocableMethod with proper input / output types — common cause of action failures is interface mismatch.
  • Bot Actions run in the bot user's context, not the customer's. Sharing rules and field permissions are evaluated against the bot user — make sure that user has the right access.
  • Transfer to Agent requires Omni-Channel + Service Channel + active agents available. Without one of those, the transfer fails and the bot has to retry or apologize.

See the full Bot Action entry

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