---
schema_version: "1"
id: 58599c3b4e1e424ccd53b0b32897125462d7f5d0e9e34b4d090c019aaf7ed72f
title: Authenticate a Customer with an Enhanced Bot
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/bots_service_enhanced_async_auth.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_async_auth.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a87e87221319fe2274df83b978901c3e79638bc0faff08e873a15cf154b000a6
description: Use the authentication messaging component to verify a customer’s identity using single sign-on in enhanced Apple Messages for Business channels. You can authenticate users with one of Salesforce’s standard authentication providers, such as Google, Salesforce, and Facebook. Or you can create a custom authentication provider.
products:
  - Service Cloud
  - Service Intelligence
release: "264"
---
# Authenticate a Customer with an Enhanced Bot

Use the authentication messaging component to verify a customer’s identity using single sign-on in enhanced Apple Messages for Business channels. You can authenticate users with one of Salesforce’s standard authentication providers, such as Google, Salesforce, and Facebook. Or you can create a custom authentication provider.

### 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> for Einstein Bots.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=service.messaging_editions.htm&amp;language=en_US" target="_blank">View supported editions</a> for Messaging.</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="d63060e64">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d63060e64 ">To build and manage Einstein Bots:</td>

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

This component is asynchronous. When the bot sends the component, the customer can continue the conversation and respond to the component later. Bots that use asynchronous components require careful configuration to ensure a natural conversational experience. Before adding this component to a bot, learn more about [best practices for asynchronous components](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_async_best_practices.htm&release=264.0.0&type=5 "Customers don’t have to respond to asynchronous components right away. When you add an asynchronous component to a bot conversation, carefully consider your conversation design to gracefully handle errors and changes in context.").

This component is available only for enhanced Apple Messages for Business channels.

In enhanced bots, authentication requests time out after five minutes.

1. From the Messaging Component page in Setup, [create an authentication messaging component](https://help.salesforce.com/s/articleView?id=service.messaging_components_auth.htm&type=5&language=en_US).
    
    When you set up an authentication component, you specify a prompt that asks customers to enter their login credentials and a confirmation message. The prompt and confirmation message aren’t visible in the Bot Builder, but you don’t need to add a separate dialog step to send them. In the bot conversation, the prompt is sent to the customer when they reach the dialog step that references your component. After the customer enters their login credentials, the confirmation message appears as a customer from the customer.
2. Go to the Bot Builder. Click **Dialogs**, and then select the dialog that you want to add the authentication request to.
3. From the Dialog Component Library, drag the **Authentication** dialog step onto the canvas.
4. In the Step Properties panel, enter the name of your messaging component to search for and select it. If you don’t see your component, refresh the builder and try again.
5. The authentication messaging component is asynchronous, so tell the bot what to do after sending the form. The bot can wait for customer input or move on to the next dialog step. See [Conversation Design for Asynchronous Components](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_async_conversation.htm&release=264.0.0&type=5 "Because customers don’t have to respond to asynchronous components right away, these components require careful conversation design. Use asynchronous component settings and Rule conditions and actions to ensure a natural conversational experience.").
    
    ![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 When exact matching or intent recognition are enabled, the customer can enter text that redirects the bot conversation to another dialog (for example, “Main Menu”), regardless of the option you select.
6. In the output section, select or create an ID variable to store the ID of the result of the authentication process. When authentication is successful, the variable is set.
7. Tell the bot what to do if the variable already contains a value. The bot can keep the original value and skip the authentication, or the bot can send the authentication and override the original value.
8. Optionally, select or create an object list variable to store the list of error codes if the customer response results in an error. You can use Rule conditions and actions to customize the behavior of the Error Handler dialog based on the error variable. See [Error Handling for Asynchronous Components](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_async_errors.htm&release=264.0.0&type=5 "Asynchronous components include an optional error variable to give you more control over how to handle specific errors. Use an Apex class and Rule actions to customize the behavior of the Error Handler dialog based on the error variable. For example, when a customer attempts to respond to an expired authentication request, you can prompt the user to try again with a new authentication request.").
9. Save your changes.

To specify the bot’s behavior when a customer responds to the component, add a Rule action step after the component. The Rule action step ensures that whenever your customer responds to the component, their response is confirmed and the conversation is redirected appropriately. See [Conversation Design for Asynchronous Components](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_async_conversation.htm&release=264.0.0&type=5 "Because customers don’t have to respond to asynchronous components right away, these components require careful conversation design. Use asynchronous component settings and Rule conditions and actions to ensure a natural conversational experience.").

#### See Also

- [Compare Messaging Channel Capabilities](https://help.salesforce.com/s/articleView?id=service.livemessage_managed_package_lex_differences.htm&language=en_US)
- [Considerations for Messaging Components](https://help.salesforce.com/s/articleView?id=service.messaging_components_considerations.htm&language=en_US)
- [Considerations for Messaging Components in Enhanced Bots](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_considerations.htm&release=264.0.0&type=5 "Carefully review these considerations before setting up Enhanced Bots.")