---
schema_version: "1"
id: d27d1bc93bc4cd792905584c72764c67d31fa07752432e6bfb5f3aea9efbe7d3
title: Add an Object Search Action
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/service/264-0-0/bots_service_deliver_knowledge_articles.md
canonical_url: https://help.salesforce.com/s/articleView?id=service.bots_service_deliver_knowledge_articles.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 00fec0dcb8a0712fa1439088c2e590c7169473c76ed7d0fc6ac18a2eb28a4d8c
description: 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.
products:
  - Service Cloud
  - Service Intelligence
release: "264"
---
# Add an Object Search Action

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

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

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

Before getting started, [add a Question dialog step](https://help.salesforce.com/s/articleView?id=service.bots_service_using_dialog_question.htm&language=en_US) to your bot.

1. 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.
2. In the Step Properties panel, enter your search criteria.
    1. 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.
    2. 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](https://help.salesforce.com/s/articleView?id=service.bots_service_context_system_variables.htm&release=264.0.0&type=5 "Access important information during bot conversations with context and system variables. Context variables let your bot gather customer information regardless of channel. System variables store back-end information about conversations."). The bot uses the selected variable to search for knowledge articles.
3. 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.
4. 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.
5. 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.
6. 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\].