---
schema_version: "1"
id: 6c8e9e4d85bdde9b36639e0cd449954b117b484fb6f5260bc516169483e581fe
title: Set Up a Dialog Rule 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_rule.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.bots_service_setup_dialog_rule.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6589fdeeedaf3d42b46fd01c038cf4fb657b32cf4cbb8aff8af01b7ccf1eff47
description: "Use rules to specify the conditions that start any of these actions: call a dialog from within the current dialog, redirect to a different dialog, clear a variable value, transfer to a service rep, and set a variable. Use rules to send targeted messages to your customers with Conditional Messaging. Rule conditions are optional."
products:
  - Service Cloud
  - Service Intelligence
release: "264"
---
# Set Up a Dialog Rule Step

Use rules to specify the conditions that start any of these actions: call a dialog from within the current dialog, redirect to a different dialog, clear a variable value, transfer to a service rep, and set a variable. Use rules to send targeted messages to your customers with Conditional Messaging. Rule conditions are optional.

### 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="d53218e57">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d53218e57 ">To build and manage Einstein Bots:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d53218e57 ">
              <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>

1. From the Dialog Component Library, drag a step from the Rules section onto the canvas.
    
    Rule actions are:
    
    - Call Dialog: Retains the context of the conversation and returns the conversation back to the original dialog after the second dialog is completed.
        - If a Redirect to Dialog is used within a call condition, the Call Dialog chain ends and the Redirect to Dialog continues.
        - If an intent is detected, the Call Dialog chain ends and the dialog associated with the intent is started.
        - We recommend no more than five Call Dialogs in a chain.
    - Clear Variable (or Clear Variable Value): Changes the variable that you specify to an unset state.
    - End Chat: Ends the bot conversation.
    - Redirect to Dialog: Interrupts the current dialog and starts another dialog. Unlike Call Dialog, Redirect to Dialog is a one-way transfer to the new dialog.
        - Use the Redirect Type field to specify the destination of the redirect. To identify a specific dialog to use every time, select **Dialog**. To redirect to an object variable set earlier in the conversation, use **Variable**.
            - The variable redirect type supports object variables only. The ConversationDefinitionDialog object and other variables types, including string and object list, aren't supported. To learn more about variables, see [What's a Variable?](https://help.salesforce.com/s/articleView?id=service.bots_service_whats_a_variable.htm&type=5&language=en_US)
        - In cases where a Confused system dialog is used, add Redirect to Dialog as a new dialog step within the Confused Dialog. This step moves the conversation flow forward instead of using an action in the Next Step section.
    - Send Message (or Send a Message): Sends a message to the customer. This rule action is useful for providing directed messaging based on a customer’s input.
        
        ![Use the rule action to create conditional messages](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_intelligence-264-0-0-production-enus/dcd06a7b-b5ab-448b-a767-4e2e90481508/support_intelligence/images/bots/bots_service_rule_conditional_messages.png)
    - Set Language (or Set Conversation Language): Sets the language the bot uses with the end user based on a variable.
    - Set Routing Type: Routes the chat session to a specialized queue that you define as a [context variable](https://help.salesforce.com/s/articleView?id=service.bots_service_whats_a_variable.htm&release=264.0.0&type=5 "A variable is a container that stores a specific piece of data collected from the customer or output from Salesforce. Since variables are containers of information, they can be used within dialog actions as both inputs and outputs and can be inserted as part of the text in messages."). Use this action to transfer to the right service rep or queue by overriding the default queue on chat buttons for Chat (Live Agent) or the channel ID for Messaging.
    - Set Variable: Sets a bot variable to a custom value, [context variable](https://help.salesforce.com/s/articleView?id=service.bots_service_whats_a_variable.htm&release=264.0.0&type=5 "A variable is a container that stores a specific piece of data collected from the customer or output from Salesforce. Since variables are containers of information, they can be used within dialog actions as both inputs and outputs and can be inserted as part of the text in messages."), or another bot variable.
    - Transfer: Escalates the chat session to a queue, service rep, or bot.
2. Optionally, you can create a condition sentence using a variable, an operator, and a value. In the Step Properties panel, click **Add Condition**, and then specify any required parameters. If you create multiple conditions, you can use the Condition Requirements field to add AND/OR functionality. To ensure that rule conditions are respected in bots using multiple languages, on Rule dialog steps, use the OR condition requirements to specify any text value conditions in each bot language.
    
    ![Create a condition to trigger a rule](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_intelligence-264-0-0-production-enus/dcd06a7b-b5ab-448b-a767-4e2e90481508/support_intelligence/images/bots/bots_service_rule_conditional.png)
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_intelligence-264-0-0-production-enus/dcd06a7b-b5ab-448b-a767-4e2e90481508/images/icon_note.png)
    
    Note The Value field works best when you use these data formats:
    
    - Boolean: "true", “false”. These values aren’t case-sensitive and false includes the “is not set” condition.
    - Date: yyyy-MM-dd
    - Date/Time: yyyy-MM-ddTHH:mm:ss+HH:mm
    - Number: non-negative and negative decimal numbers
3. To add multiple rule actions, in the Step Properties panel, click **Add Rule Action**. Select a rule action from the Rule Action field, and then specify any required parameters.
    
    ![Select a rule action](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_intelligence-264-0-0-production-enus/dcd06a7b-b5ab-448b-a767-4e2e90481508/support_intelligence/images/bots/bots_service_rule_actions.png)
4. Save the dialog.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-service-support_intelligence-264-0-0-production-enus/dcd06a7b-b5ab-448b-a767-4e2e90481508/images/icon_note.png)
    
    Note Rule actions fire in the order shown. To change the order, drag the rule actions and save the dialog.

#### See Also

- [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.")
- [What’s an Entity?](https://help.salesforce.com/s/articleView?id=service.bots_service_whats_an_entity.htm&release=264.0.0&type=5 "An entity represents a type of data that you want to collect from a customer. We provide the following system entities: Boolean, Currency, Date, DateTime, Email Address, Number, Object (standard or custom), Phone Number, and Text.")