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

View supported editions for Einstein Bots.
View supported editions for Messaging.
User Permissions Needed
To build and manage Einstein Bots:

Customize Application

OR

Modify Metadata

OR

Manage Bots

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.

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.
    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.
    Note
    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.
  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.