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.
Required Editions
| View supported editions. |
| User Permissions Needed | |
|---|---|
| To build and manage Einstein Bots: |
Customize Application OR Modify Metadata OR Manage Bots |
Before getting started, add a Question dialog step to your bot.
- From the Dialog Component Library, drag the Object Search action step onto the canvas. Make sure that you add it immediately after a question step. Then, in the Step Properties panel, select the object that you want to search for.
-
In the Step Properties panel, enter your search criteria.
- To search for an Account, Case, Contact, Campaign, Contract, Lead, Opportunity, Order, Task, or custom object: In the Search Criteria section, enter your search criteria. Object Search supports AND searches, where all the criteria are met, and it supports OR searches, where any of the criteria are met.
- To search for a Knowledge object: In the Search Criteria section, select the variable that the Question dialog step uses to store the customer’s response, or select the Last Customer Input system variable. The bot uses the selected variable to search for knowledge articles.
- In the results section, specify which object fields the bot returns and the maximum number of records it returns. The bot can return up to three records and up to three fields for each record.
- To store results, select an object list variable from the Search Results Variable field. You can also specify the order in which results are listed.
- To redirect the bot to the Confused dialog if it doesn't find any results, select Redirect to Dialog for the Rule Action, and then select Confused for the Dialog Name.
-
To deliver the results to the customer, add a Message dialog step after the Object
Search action. Then add the object fields from Step 3 to the bot message with merge
syntax.
To call a standard field on a standard object, use the {!FieldName} format. For custom fields, append __c at the end: {!FieldName__c}. To call a field on a specific record, use {!$RecordName.FieldName}.
To call an item in a list variable, use FieldName[X], with X referring to the location of the item in the list. Einstein Bots uses a zero-based index with list variables, so you can call the first item of the list using FieldName[0].