---
schema_version: "1"
id: e4b551ecca78e3f282ed0a24eda12408c3d7969245d9dadc715dbcd628057b31
title: Set Up a Dialog Action Step
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/bots_service_setup_dialog_action.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.bots_service_setup_dialog_action.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 59497072057114e940d445759eb7512811c4644764f1de7797afb9f3357b7286
description: Use Action steps to run autolaunched flows and send emails. Action steps let your bot use Apex to create, read, update, or delete Salesforce objects, retrieve data and display it, and retrieve external data from a third-party API. Add a goal to a dialog to evaluate how well your bot is helping your customers.
products:
  - Service Cloud
  - Service Intelligence
release: "264"
---
# Set Up a Dialog Action Step

Use Action steps to run autolaunched flows and send emails. Action steps let your bot use Apex to create, read, update, or delete Salesforce objects, retrieve data and display it, and retrieve external data from a third-party API. Add a goal to a dialog to evaluate how well your bot is helping your customers.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.einstein_service_intro.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d76552e57">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d76552e57 ">To build and manage Einstein Bots:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d76552e57 ">
              <p>Customize Application</p>
              <p>OR</p>
              <p>Modify Metadata</p>
              <p>OR</p>
              <p style="margin-bottom:0;">Manage Bots</p>
            </td>

          </tr>
        </tbody>
      </table>

When using Apex with an Action step:

- Apex methods must be written with InvocableMethod annotation to be accessible to bots. For more information on the annotation, [visit the Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm).
- To give your bot access to Apex, Salesforce objects, and to Run Flows, update sfdc.chatbot.service.permset. See [Setting Apex Class Access from Permission Sets](https://help.salesforce.com/articleView?id=perm_sets_setting_apex_access.htm&language=en_US) and [Working with Object Settings in Permission Sets](https://help.salesforce.com/articleView?id=perm_sets_objects_and_fields.htm&language=en_US).
- When a custom value is entered as an Apex input, it’s interpreted as a string.
- When logging exceptions in Apex, remove all references to personal identifying information (PII) and customer inputs in the error message.
- When processing object values, we support up to five levels of nested objects in outputs and one level of nested objects in inputs.
- Apex actions have a default timeout of 10 seconds each.
- The overall processing time limit for a bot response is 120 seconds.
- A maximum of 50 apex calls (across any number of dialogs) can be made before sending an outbound message.

1. To add an Action step to the dialog, from the Dialog Component Library, drag a step from the Actions section onto the canvas.
2. In the Step Properties panel, set the action name and any input and output variables.
3. Save the dialog.

You can debug Apex calls from the event logs in the [Performance page](https://help.salesforce.com/s/articleView?id=service.bots_service_analyze_bot.htm&release=264.0.0&type=5 "To improve your bot, learn how to report on bot activity. Build standard reports using the Conversation Definition Sessions, Conversation Definition Dialog Daily Metrics, and Conversation Definition Hourly Dialog Metrics objects. To use CRM Analytics with Einstein Bots, download the Einstein Bots Value dashboard from AppExchange.").

- **[Add an Object Search Action](https://help.salesforce.com/s/articleView?id=service.bots_service_deliver_knowledge_articles.htm&release=264.0.0&type=5)**  
    Deliver records from standard or custom objects to your Einstein Bot to create an integrated bot experience. The Object Search action type can be added to any dialog.
- **[Add an External Service Action](https://help.salesforce.com/s/articleView?id=service.bots_service_external_services.htm&release=264.0.0&type=5)**  
    Add an action from a registered external service in Bot Builder to allow your bot to send and receive data between Salesforce and external API providers. Deliver personalized customer experiences without writing a single line of code.
- **[Add a Standard Action](https://help.salesforce.com/s/articleView?id=service.bots_service_standard_action.htm&release=264.0.0&type=5)**  
    Call a standard invocable action directly from your bot, without referencing it from an Apex class or flow. Use Knowledge actions, custom and standard notification actions, and more.

#### See Also

- [Optimize Bot Performance with Goals](https://help.salesforce.com/s/articleView?id=service.bots_service_completed_goal.htm&release=264.0.0&type=5 "Design bot conversations with a goal in mind and then fine-tune your conversation design based on goal performance. Add a goal to track how often your customers reach a specific point in a dialog, such as when the bot returns a knowledge article, generates an order number, or files a case. Then monitor goal performance to identify areas for improvement and iterate on your bot. The more often your customers reach goals, the better your bot is meeting your customers’ needs.")
- [Set Up a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_setup_dialog.htm&release=264.0.0&type=5 "After you add a dialog, set it up by adding steps (outbound messages, questions, actions, rules) and tell the bot what to do after the dialog finishes. If you’re using intents, train the bot to understand the customer intent associated with the dialog.")