Customizing the Salesforce Source Configuration

You can easily create a Salesforce source using the default selection of standard objects and fields. You can also fully control which Salesforce objects and fields are indexed. This is useful when you have custom objects that need to be searchable.

To modify the configuration of a Salesforce source

  1. Access the Salesforce source advanced configuration dialog box:

    • In the navigation bar on the left, select Search Content > Sources, and then in the list of available sources, click the Salesforce source that you want to customize (you can also click Actions and then Edit).


    • When you’re adding a Salesforce source, in the Add Salesforce Content dialog box, click the Advanced Configuration link.


  2. In the Edit/Add Salesforce Source dialog:

    In the case of a Salesforce source, the Edit Salesforce Source can look like the following capture.


    1 Click the predefined filters to easily display only the desired list items.
    2 List of available and optionally filtered accounts.
    3 Click to close the dialog box and cancel any modification.
    4 Type part of list item names to only show matching items.
    5 For the highlighted object, next to the Type column, select the fields to index, in the Facet column, select the fields that are facetable, and in the Title column, select the field to be displayed as the item title.
    6 Click to customize the body of the selected Salesforce object (i.e., Account).
    7 Click to exclude fields with specific values.
    1. In the panel on the left, select the check box of an object that you want to index in this source.

      You can also select the check box next to the Selected column title to select or deselect all Salesforce objects at once, and then deselecting or selecting the undesired objects.

      Indexing all or almost all objects can impact indexing performance. Try indexing only the objects and fields you need in your search interface.

      In the panel on the right:

      • The content is updated to present the fields of this object.

      • The check boxes of standard fields that are typically useful to index are pre-selected.

        • By default, Chatter feed objects (Collaboration Group, Feed Items, Feed Comments) are indexed.

        • For Salesforce sources created before the April 18th 2015 release, search Chatter, and then select the Collaboration Group (Chatter), Feed Items (Chatter) and Feed Comments (Chatter) objects to index them.

      • The check boxes of required fields are selected and grayed out to prevent you from clearing them.

    2. In the panel on the right, for each selected field:

      1. Review the fields to only select standard and custom fields that you know contain meaningful data.

        Salesforce source configuration guidelines:

        • Don’t index all objects and all fields. Not all Salesforce data is useful to index and indexing large amounts of data can have an impact on the performances in your Coveo organization.

        • Start indexing the key standard objects with pre-selected fields and test search results to identify essential information that’s missing.

        • Later add more standard and custom objects and fields in which you know meaningful data to index is stored.

          A Coveo organization source typically performs the following number of API calls to your Salesforce organization after you create or modify the source configuration, and for source incremental refreshes starting every 15 minutes for changed or new content:

          • One API call per about 1000 objects

          • One API call per attachment

          • One API call per about 1000 users

          • One API call per group/role/profile/permission sets

          With a normal usage, these calls alone won’t reach the Salesforce organization daily limit of API calls (see API Requests Limits).

        When an object contains a large number of fields, use the pre-defined and custom filter above the table to find fields more easily.

      2. When you want the field to be used to create a facet, select the Facet check box.

        • Enable a field as a facet when useful. Creating a large number of facet fields can degrade the search response time, especially when fields can return a large number of individual values.

        • When you add facet fields, the corresponding facet automatically appears in the search interface when the user clicks the corresponding field link in a search result.

      3. When you want the field to be used as the indexed item title, select the Title check box.

        Only one field per object can be displayed as the title.

    3. Repeat the previous sub-steps for other objects that you want to index in this source.

    4. Optionally click Manage Exclusions to exclude fields with specific values using the Edit Exclusions dialog:


      1. In the box on the left, enter a Salesforce field name available in your organization for which you want to define an exclusion.

        You must use the Salesforce field name, not the field label.

        When you want to add an exclusion on the Created Date field, enter CreatedDate in the Field (Salesforce Name) box.

        • In the Edit/Add Salesforce source dialog, hover over a value in the Field name column to know the exact Salesforce field name.



        • You can start writing and select one of the suggested field names as you type.


      2. In the middle drop-down menu, select the exclusion operator.

      3. In the box on the right, enter the field exclusion value.

        • Date time fields (such as CreatedDate) require a value in the YYYY-MM-DDThh:mm:ssTZD format (e.g., 2014-09-20T00:00:00Z) and date field (such as LastActivityDate) values must be in the YYYY-MM-DD format (e.g., 2014-09-20).

        • The Not Like and Like operators are partial match.

          Selecting the Like operator and entering cago value returns Chicago.

        • The Not In, Like, and Not Like operators only work with string (text) value fields, meaning that these operators aren’t supporting numerical values.

        • With the In and Not In operators, you can use one of the following syntaxes to specify the list of values:

          • "value1 ; value2 ; value3"

          • ['value1','value2','value3']

          • ['value1' , 'value2', 'value3']

          • [value1,value2,value3]

          • [value1, value2, value3]

          • ['value1', 'value2 with more than one word', 'value3']

      4. Click Add.

      5. Optionally define other exclusions.

      6. Click Save.

    5. (Optional) Customize the body of Salesforce objects:

      The body is what appears in the search result Quick View. Search result excerpts, typically appearing under a search result title, are also based on the content of the body. Consider customizing the body of a Salesforce object when search result Quick View or excerpts for this object don’t contain the appropriate information.

      1. Click Customize Body.

      2. In the Edit Body window that appears:

        1. Enter string(s) or metadata to be displayed in result excerpt of a Salesforce object in this format:


          • You want to see the object description in the excerpt of Salesforce search results, so you enter:


          • You want the body of a Salesforce Knowledge article to contain the summary field, so you enter:


          In the Edit/Add Salesforce Source dialog, hover over a value in the Field name column to know the exact Salesforce metadata name.


          For now, you need to add the kav_ prefix before Salesforce Knowledge source metadata names.


          • Ensure the selected metadata contains information for all items. When empty for an item, no Quick View would be available for this item.

          • When you encounter difficulties or need help, contact Coveo Support.

        2. Click Save.

    6. In a case of a Salesforce Knowledge source, under Select Publish Statuses to Index, you can select to index knowledge articles with the following publish statuses: Online, Archived, and Draft.

      By default, only Online articles are indexed. More than one status can be selected. However, if you select Draft, one knowledge article can appear several times in many versions in search results (see Salesforce Knowledge Articles).


    7. In the Add/Edit Salesforce Source dialog, click Start Indexing (or Rebuild Source if you’re editing the source) to make changes effective.

      A source rebuild can take a significant amount of time and consume a significant number of API calls.

Recommended Articles