Using Custom Objects With the Coveo for Salesforce Free Edition

When creating a search page with the Coveo for Salesforce Free edition, you can decide to have several tabs created by default, one of which is the All Content tab.

The default Filter expression for the All Content tab would look like this:

@objecttype==(Account, KnowledgeArticleVersion, Case, Contact, FeedItem, ContentDocument, Lead, Opportunity, User) (NOT @sftype==(ContentPost,CollaborationGroupCreated,CreateRecordEvent))

To add your custom objects to the tab, you need to add it to the expression.

To understand the syntax used to build this type of expression, see Coveo Query Syntax Examples in Coveo for Salesforce.

  1. Ensure your custom object is allowed to be searched.
    1. In Salesforce, in Setup, search for and select Objects (Build > Create > Objects).

      In Salesforce Lightning Experience, you can select the Object Manager tab.

    2. Next to the custom object you want to make searchable, select Edit.
    3. Under Search Status, ensure that the Allow Search box is checked.
  2. Access the search page you want to modify.
  3. Open your Component Interface Editor.

    With Coveo for Salesforce v3.25+ With Coveo for Salesforce V3 With Coveo for Salesforce V2
    In the top-right corner of the component, click the Edit button.
    In the top-left corner of the component, click the Edit button.

    In the lower-right corner of the component, click the arrow button to expand the box; then, click Edit.

  4. In the Interface Editor, select the All Content tab, and select the edit icon.

    There is an additional step in Coveo for Salesforce V3. Before entering the new filter expression, you should select the Filtering icon in the All Content tab options.

  5. Under Filter expression, add your custom object.

    You wish to add your custom object MyCustomObject to your All Content tab.

    Under Filter expression, you modify the expression to include your custom object. Because it is a custom object, you add __c at the end.

     @objecttype==(MyCustomObject__c, Account, KnowledgeArticleVersion, Case, Contact, FeedItem, ContentDocument, Lead, Opportunity, User) (NOT @sftype==(ContentPost,CollaborationGroupCreated,CreateRecordEvent))
    
  6. Save the page. Your custom object should now be displayed in the All Content tab.

    If you recently created your custom object, you might not be able to query it right away (see Using Custom Fields With the Coveo for Salesforce Free Edition).