Customizing the Salesforce Source Configuration

When you have the required privileges, 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.

  1. Access your Coveo Cloud organization (see Logging in to Coveo Cloud V2).

  2. Under Content, select Sources.

  3. In the Sources page, select the Salesforce source you wish to customize, and double-click it or select Edit.

  4. In the Configuration tab, select which Salesforce objects and fields you wish to index.

    You can 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.

    Admin-SalesforceRelationships

    • Your custom objects are only displayed when you have enabled its Allow Search field in Salesforce (see Manage Custom Objects).

    • You can browse your fields using a pager instead of scrolling down to the end. If your source is a Legacy source, you will not see the parent and child relationships in your panel.

    • You can also select a field and click Parent relationship or Child relationship to see the associated fields. The breadcrumb at the top of the table helps you to know exactly what you selected.

      Admin-SalesforceBreadcrumb

  5. When you want to edit one of your source fields, in the Map To column, click on the field you want to edit (see Add or Edit Fields).

    Only the fields displayed in blue can be edited.

  6. When you want to manage conditions on the objects to index, click the object, and then in the Action bar, click Conditions (see Managing Conditions Applied to an Object).

  7. When you want to change the body field of your Salesforce objects, see View or Edit a Salesforce Object Body.

  8. When you want to change the field used as the title of your item, see Changing a Salesforce Object Set Title.

  9. Complete your source addition or edition:

    • Click Save when you want to save your source configuration changes without starting a rebuild, such as when you know you want to do other changes soon.

      OR

    • Click Save and Rebuild Source when you are done editing the source and want to make changes effective.

      Back in the Coveo Cloud administration console Sources page, you can review the progress of your Salesforce source modification (see Manage Sources).

  10. Once the source is rebuilt, you can review its content in the content browser (see Inspect Items With the Content Browser).

Changing a Salesforce Object Set Title

You can decide which field an object should use as its title. The field you choose as your object title is used in your result templates as the clickable link. Specifically, it is used for the ResultLink component (see Coveo ResultLink Component).

  1. Open your Salesforce source Configuration tab (see Customizing the Salesforce Source Configuration in Cloud V2).

  2. Select the object of which you want to change the title.

  3. Select the field you want to use as your object title, and click the Set as Title button.

    salesforcesourcev2-setastitle

  4. The field you have chosen as your title should now be mapped to title, as shown in the Map to column in bold.

    salesforcesourcev2-titlefield

Managing Conditions Applied to an Object

You can index items only when they meet specific conditions, which can reduce the size of your index.

This is useful when you have many object records that should be excluded when they do not meet specific criteria.

Access the Panel

  1. If not already done, log in to the Coveo Cloud platform.

  2. If not already in the Add/Edit a Salesforce Source panel, go to the panel:

    • To add a source, in the main menu, under Content, select Sources > Add source button > Salesforce. In the Configuration tab, click the Or Select Specific Objects Manually button.

      OR

    • To edit a source, in the main menu, under Content, select Sources > source row > Edit in the Action bar.

  3. Select the checkbox of a Salesforce object on which you want to add or edit conditional indexing.

  4. At the top of the object list, select Conditions.

    salesforcev2-conditions-nov17

Add Conditions to a Salesforce Source

  1. In the Manage Conditions Applied to an Object: [ObjectName] panel, under Conditions, enter the appropriate information:

    1. (When editing a Knowledge base object only) Select one or more of the following publish statuses of knowledge articles to include: Online (published), Archived, and Draft.

      salesforcesourcev2-addknowledgecondition

      By default, the Salesforce source only indexes Knowledge articles that are Online (published).

      By default, only Online (published) 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).

    2. In the Select a field drop down menu, select the Object field you want to use as part of your condition.

    3. In the Select an operator drop down menu, depending on the selected field, select one of the available operators:

      For more information on the operators, see Comparison Operators.

      The only added operator is NOT LIKE, which acts as the opposite of the LIKE operator.

      • Equals

      • Not equals

      • Less than

      • Less than or equals to

      • Greater than

      • Greater than or equals to

      • Like

      • Not like

      • In

      • Not in

      • Includes

      • Excludes

    4. In the remaining field, enter the field value to respect.

      If you selected the Excludes operator, you can enter multiple values in a single entry using the following syntax ('value1','value2').

      Remember to enter string values in single quotes and to respect the ISO 8601 format for datetime values (e.g., 2017-08-21T20:09:26+00:00 ).

  2. Once you are satisfied with your condition, select the salesforcesourcev2-addcondition icon to add it to your source. The condition should be added underneath.

    salesforcesourcev2-conditionapplied

  3. Once you have entered all the conditions you want on your source, click Apply Changes.

    The changes will be effective once you have saved and rebuilt your source.

Manage Conditions in a Salesforce Source

  1. In the Manage Conditions Applied to an Object: [ObjectName] panel, you can also perform the following actions:

    • To edit an existing condition, simply change the values of your condition.

    • To remove only one condition, select the salesforcesourcev2-removecondition icon next to the condition to remove.

    • To remove all conditions, select the Remove All Conditions button.

  2. When you are done, click Apply changes.

    The changes will be effective once you have saved and rebuilt your source.

View or Edit a Salesforce Object Body

You can change what is indexed as the body of your object.

The body of your object is used both as the excerpt and as the quick view of your item in your search page. For more detailed information, see Coveo Excerpt Component and Coveo Quickview Component.

  1. Open your Salesforce source Configuration tab (see Customizing the Salesforce Source Configuration in Cloud V2).

  2. Select the object of which you want to change the body.

  3. Select the Body button.

    salesforcesourcev2-editbody

  4. Under Content, enter your new body. Keep in mind the following things:

    • You can enter content to be treated as HTML, given you enter it inside an <html> element.

      You wish to change your Account object to display the account description, account number, and account phone number.

      Under Content, you enter the following information:

        <html><div>%[Description]</div><div>Account Number: %[AccountNumber]</div><div>Phone Number: %[Phone]</div></html>
      
    • You can display Salesforce field values by using the following syntax, replacing SalesforceFieldName with the Salesforce field API name: %[SalesforceFieldName]

    • You can find the Salesforce field API name in the Salesforce Field column, in gray italics.

      salesforcesourcev2-greyfieldname

  5. Once you are satisfied with the content for your body, select Apply Changes.

What’s Next?

For those familiar with the Salesforce source on other Coveo platforms, the following board allows you to modify the ObjectsToGet configuration file. In Cloud V2, the ObjectsToGet configuration file is written in JSON, as opposed to XML in CES and Cloud V1. You can manually edit the JSON file if you wish (see Edit a Source JSON Configuration), but be warned that improperly configuring the JSON will make your source fail to build.

For more information on the different JSON configurations you can perform on your Salesforce source, see Understanding the JSON Salesforce Objects Section.