Add a Salesforce source

When you have the required privileges, you can index any searchable Salesforce object and field.

Source features summary

Features Supported Additional information

Salesforce versions

The Coveo for Salesforce connector is updated on a regular basis to use the latest Salesforce API version. However, when a new API version is released, it may take a few weeks for it to be officially supported. Contact Coveo Support for assistance.

Indexable content

  • Standard/custom objects and fields

  • Chatter feed items and files

  • Multilingual Knowledge base articles and attachments

  • CRM content (binary files such as PDF)

Indexing Salesforce commerce content requires a different approach.

Content update operations

refresh

check

Takes place every 15 minutes by default.

rescan

check

A rescan or a rebuild is required to retrieve:

  • Attached and detached KB articles from cases.

  • Deleted KB articles and related files.

  • Deleted KB articles that have reached the archived status.

  • Non-replicable deleted objects such as deleted ContentVersion (CRM Content and Chatter files) attachments and other items.

  • Changes that occurred more than 30 days ago since the last refresh (a scheduled refresh triggers a rescan).

  • Permission changes for a profile, permission set, object sharing, or object security level.

rebuild

check

Content security options

Users following system permissions

check

Some limitations apply.

Specific identities

check

Everyone

check

Creating a dedicated Salesforce crawling user

To crawl your Salesforce content and index it in a Coveo index, you must create a dedicated Salesforce crawling user.

Notes
  • Although the Modify All Data permission is no longer a requirement for the crawling user, you can continue to use this permission if it’s part of your existing configuration.

  • Keep in mind that the Modify All Data permission only provides the Modify Metadata Through Metadata API Functions, View All Data, and View Setup and Configuration permissions and that the crawling user must comply with all the requirements listed in this section.

Requirements

Your dedicated Salesforce crawling user must comply with the following requirements:

  • Must not be an employee’s account. If the person leaves the company or changes role, the account could be terminated or have its permissions changed. This could break the connectivity to Coveo or affect indexing.

  • Must only be used by a single Coveo Salesforce source. If you have multiple sources, we strongly recommend creating a dedicated Salesforce crawling user for each different source.

  • Must have the API Enabled permission to call Salesforce APIs.

  • Must have the Knowledge User permission to index Classic Knowledge articles.

    Note

    This permission doesn’t apply when Lightning Knowledge is enabled.

  • Must have the Manage Sharing permission to access the object sharing settings that are required to index securities.

  • Must have the Modify Metadata Through Metadata API Functions permission because it’s the minimum permission that’s required to use the Salesforce Metadata API. This API is used to index Salesforce item permissions. It’s also used to retrieve case settings, sharing settings, and other Salesforce setup configuration information.

  • Must have the Query All Files permission to index all the ContentVersion records in your Salesforce organization.

    Notes
    • The crawling user must be a member of each library that contains the ContentVersion records you want to index.

    • Without the Query All Files permission, only the ContentVersion records that have been specifically shared with the crawling user will be indexed.

    • This permission is required even if your crawling user has the Modify All Data or View All Data permissions.

    • This permission isn’t required if the Index related files feature is enabled on applicable objects.

  • Must have access to all the Salesforce objects you want to query in your Salesforce organization. We strongly recommend giving the user View All Data permission.

  • Must have access to all the fields you want to index in each Salesforce object. Make sure to validate the field-level security settings in your Salesforce organization.

  • Must have the View all Users and the View All Profiles permissions to view all users and profiles, regardless of their object sharing settings. These permissions are also used to correctly index document securities.

  • Must have the View Setup and Configuration permission to view the basic security objects (for example, Roles, Profiles, and Permission Sets) and the object sharing configuration. It’s also used to correctly index document securities.

Indexing Salesforce commerce content

When indexing Salesforce commerce content, such as products, variants and availabilities, we recommend using a REST API source and following the specific instructions for this use case.

Permissions quick reference

This table provides a summary of the permissions that must be set for the crawling user depending on the Salesforce objects you want to index.

Permissions Objects
Service Cloud Content Knowledge Chatter1
API Enabled check check check check
Knowledge User2 x x check x
Manage Sharing3 check check check check
Modify All Data4 Optional Optional Optional Optional
Modify Metadata Through Metadata API Functions5 check check check check
Query All Files6 x check x x
View All Data Recommended Recommended Recommended Recommended
View All Profiles check check check check
View All Users check check check check
View Setup and Configuration check check check check
1: To view the Chatter feed items created inside a community, a user must also be a member of that community (see Permissions).
2: The Knowledge User permission is required to index Classic Knowledge articles only. It doesn't apply when Lightning Knowledge is enabled.
3: The Manage Sharing permission is required even if your crawling user has the Modify All Data permission.
4: Although the Modify All Data permission is no longer a requirement for the crawling user, you can continue to use this permission if it's part of your existing integration.
5: If necessary, the DisableMetadataAPISecurities parameter can be used to bypass the crawling user's Modify Metadata Through Metadata API Functions and Manage Sharing permission requirements in order to create a secured source. However, we strongly advise against using it. Enabling this parameter may cause some users to experience missing results in their Coveo-powered search interface (see Known impacts).
6: The Query All Files permission is required even if your crawling user has the Modify All Data or the View All Data permissions.
Note

See Objects for more information on the Service Cloud, Content, Knowledge, and Chatter objects.

Procedure

The procedure for creating a dedicated Salesforce crawling user is twofold:

Step 1: Create a Salesforce profile dedicated to the Coveo user

  1. Log in to your Salesforce organization using an Administrator account.

  2. On the Setup page, enter Profiles in the Quick Find box, then select Profiles.

  3. On the Profiles page, click New Profile.

  4. On the Clone Profile page:

    1. In the Existing Profile box, select an existing profile such as Read Only to be used as a template for the new profile according to the permissions you want to grant to the crawler.

      Note

      Take note of the User License (for example, Salesforce). You’ll need it in Step 2: Create a Salesforce user dedicated to Coveo.

    2. In the Profile Name box, enter a name, such as CoveoCrawler.

    3. Click Save.

  5. In the page for your new profile, click Edit and in the Administrative Permissions section, set the following permissions. If you’ve enabled the Enhanced Profile User Interface, click System Permissions, and then click Edit to set the following permissions.

    1. Ensure that the API Enabled permission is selected.

    2. Select the Manage Sharing, Modify Metadata Through Metadata API Functions, View All Data, View All Users, View All Profiles, and View Setup and Configuration permissions.

    3. Select the Query All Files permission if you want to index all the ContentVersion objects in your Salesforce organization. If you’ve enabled the Enhanced Profile User Interface, you must access the App Permissions section to set this permission.

    4. Click Save.

Step 2: Create a Salesforce user dedicated to Coveo

  1. On the Setup page, enter Users in the Quick Find box, and then select Users.

  2. On the All Users page, click New User.

  3. On the New User page:

    1. Fill the required fields.

    2. In the User License box, ensure that the license matches the license of your newly created profile (for example, Salesforce).

      Tip
      Leading practice

      See the name of the User License you wrote down in Step 1: Create a Salesforce profile dedicated to the Coveo user.

    3. In the Profile box, select your newly created profile.

    4. When indexing Classic Knowledge content, ensure that Knowledge User is checked (see Knowledge User Access).

    5. Click Save.

Additional considerations

  • When deploying in several environments (for example, development, staging, production), we strongly recommend that you create and use separate dedicated Salesforce crawling users for each environment, as well as one for each different Salesforce source.

    Otherwise, when Coveo accesses your Salesforce organization with the same user credentials too many times, Salesforce returns an INVALID_QUERY_LOCATOR error message, as follows:

      Error with ID 'SALESFORCE_INVALID_QUERY': invalid query locator (INVALID_QUERY_LOCATOR) - This error can occur if a user is used more than once for sources that run in parallel. To avoid this error, make sure to use only one user per source or alternate the refresh schedule of your sources.
  • Optionally, as an additional security measure, in the Login IP Ranges section, select or create a login IP range to restrict the accessibility for this profile (see IP addresses to allowlist).

  • If your Connected App usage policy is set to Permitted Users: Admin approved users are pre-authorized, you must install the Coveo connected app, and then add it to the Assigned Connected Apps section of the crawling user profile.

Leading practices

When creating a Salesforce source, you should follow certain practices to index all of your required content without overloading the Salesforce API or creating unwanted items in your index. Optimally, choosing what to index improves the search experience and prevents performance issues.

  • Use the Coveo Administration Console source page to view and modify which Salesforce objects and fields are being indexed (see Add a Salesforce source and Advanced configuration of a Salesforce source).

    Note

    For more information about the Salesforce objects and fields, see About Coveo for Salesforce objects and 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. Index only the objects and fields you need in your search interface.

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

  • Only add other standard or custom objects and fields that you want to see in search results or use with the following Coveo features:

  • A Coveo organization source typically performs one API call per about 1000 objects 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.

    Tip
    Leading practice

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

When you have the required privileges, you can include many types of Salesforce content to your Coveo organization. Each type covers different Salesforce objects and fields. You can decide who can access the source content.

Tip
Leading practice

The number of items that a source processes per hour (crawling speed) depends on various factors, such as network bandwidth and source configuration. See About crawling speed for information on what can impact crawling speed, as well as possible solutions.

Add a Salesforce source

Follow the instructions below to add a Salesforce source.

  1. On the Sources (platform-ca | platform-eu | platform-au) page, click Add source.

  2. In the Add a source of content panel, click the Salesforce source tile.

  3. Configure your source.

Tip
Leading practice

It’s best to create or edit your source in your sandbox organization first. Once you’ve confirmed that it indexes the desired content, you can copy your source configuration to your production organization, either with a snapshot or manually.

See About non-production organizations for more information and best practices regarding sandbox organizations.

"Add a Salesforce Source" window

When adding a source, you must first authenticate with Salesforce in the Add a Salesforce Source window to allow Coveo to access your content.

Note

Your source authentication access token can potentially expire and become invalid. See Update an Access Token for information on how to update an expired access token.

  1. Select Salesforce Production or Salesforce Sandbox depending on where you created your organization.

    Note

    The option to log in using a custom domain will be provided once the organization type has been selected.

  2. Enter the credentials of your Salesforce crawling user and log in.

"Configuration" tab

In the Add a Salesforce Source window, the Configuration tab is selected by default. It contains your source’s general information.

Add a source | Coveo for Salesforce

General information

Source name

Enter a name for your source.

Tip
Leading practice

A source name can’t be modified once it’s saved, therefore be sure to use a short and descriptive name, using letters, numbers, hyphens (-), and underscores (_). Avoid spaces and other special characters.

Optical character recognition (OCR)

If you want Coveo to extract text from image files or PDF files containing images, enable the appropriate option.

The extracted text is processed as item data, meaning that it’s fully searchable and will appear in the item Quick view. See Enable optical character recognition for details on this feature.

Project

If you have the Enterprise edition, use the Project selector to associate your source with one or multiple Coveo projects.

"Content to index" tab

The Content to index tab lets you select the Salesforce objects and fields you want to index. By default, Service Cloud objects are selected.

For information on how to index other Salesforce objects, see Index Chatter feeds, Index related files, and Index Salesforce Knowledge.

"Content Security" tab

Important
  • Before changing the security of your Salesforce source, ensure that it doesn’t violate any third-party contracts.

  • Changing this setting may expose sensitive content publicly.

Select who will be able to access the source items through a Coveo-powered search interface:

Everyone

Allows all end users to access the content of this source, regardless of whether they’re anonymous or authenticated.

Specific identities

Only the specified identities are allowed to see the source content. This option is similar to the Specific users and groups option in other sources.

Enter the following information:

  1. Click the Add identity dropdown menu, and then add an identity.

  2. In the Security identity provider dropdown menu, select the existing provider used to secure the desired identity.

  3. In the Identity type dropdown menu, select the identity type (User or Group) of the identity you want to be allowed to see the source content.

  4. In the Identity input, enter the account name of the user or group.

  5. Optionally, in the Additional info input, add identity information, written in JSON, about the user or group outside the account name.

  6. Click Add.

  7. Repeat this procedure to add more identities.

Users following system permissions

This is the default and most secure option. It only allows anonymous and authenticated users to see search results for items to which they have access within Salesforce.

This option is the equivalent of the Same users and groups as in your content system option in other sources.

Note

To prevent INVALID_QUERY_LOCATOR errors, which occurs when Coveo accesses your Salesforce organization with the same user credentials too many times, only select the Users following system permissions option when you’ve secured content.

  1. Select an identity provider: Allows you to select the identity provider from an existing source.

    Important

    When you select an existing security identity provider, ensure that the identities extracted by this provider can be matched with the identities retrieved from the source system.

    For example, while you create a second Salesforce source retrieving the content from the same organization, you select the identity provider of the first Salesforce source.

  2. Create a new one: Creates a new identity provider based on your selected Salesforce organization. If this is the first Salesforce source in your organization, we recommend that you select this option.

"Salesforce Organization" tab

This tab displays the name and type of the Salesforce organization you index. It also shows the email address with which you logged in to connect your Salesforce organization with Coveo.,

"Access" tab

In the Access tab, set whether each group (and API key, if applicable) in your Coveo organization can view or edit the current source.

For example, when creating a new source, you could decide that members of Group A can edit its configuration while Group B can only view it.

See Custom access level for more information.

Completion

  1. Finish adding or editing your source:

    • When you want to save your source configuration changes without starting a build/rebuild, such as when you know you want to do other changes soon, click Add source/Save.

    • When you’re done editing the source and want to make changes effective, click Add and build source/Save and rebuild source.

      Note

      On the Sources (platform-ca | platform-eu | platform-au) page, you must click Launch build or Start required rebuild in the source Status column to add the source content or to make your changes effective, respectively.

      Back on the Sources (platform-ca | platform-eu | platform-au) page, you can follow the progress of your source addition or modification.

      Once the source is built or rebuilt, you can review its content in the Content Browser.

  2. Once your source is done building or rebuilding, review the metadata Coveo is retrieving from your content.

    1. On the Sources (platform-ca | platform-eu | platform-au) page, click your source, and then click More > View and map metadata in the Action bar.

    2. If you want to use a currently not indexed metadata in a facet or result template, map it to a field.

      1. Click the metadata and then, at the top right, click Add to Index.

      2. In the Apply a mapping on all item types of a source panel, select the field you want to map the metadata to, or add a new field if none of the existing fields are appropriate.

        Notes
        • For details on configuring a new field, see Add or edit a field.

        • For advanced mapping configurations, like applying a mapping to a specific item type, see Manage mappings.

      3. Click Apply mapping.

    3. Depending on the source type you use, you may be able to extract additional metadata from your content. You can then map that metadata to a field, just like you did for the default metadata.

      More on custom metadata extraction and indexing

      Some source types let you define rules to extract metadata beyond the default metadata Coveo discovers during the initial source build.

      For example:

      Source type Custom metadata extraction methods

      Push API

      Define metadata key-value pairs in the addOrUpdate section of the PUT request payload used to upload push operations to an Amazon S3 file container.

      In the JSON configuration (REST API | GraphQL API) of the source, define metadata names (REST API | GraphQL API) and specify where to locate the metadata values in the JSON API response Coveo receives.

      Database

      Add <CustomField> elements in the XML configuration. Each element defines a metadata name and the database field to use to populate the metadata with.

      Web

      Sitemap

      Some source types automatically map metadata to default or user created fields, making the mapping process unnecessary. Some source types automatically create mappings and fields for you when you configure metadata extraction.

      See your source type documentation for more details.

    4. When you’re done reviewing and mapping metadata, return to the Sources (platform-ca | platform-eu | platform-au) page.

    5. To reindex your source with your new mappings, click Launch rebuild in the source Status column.

    6. Once the source is rebuilt, you can review its content in the Content Browser.

Salesforce security in your Coveo organization

The security of your Salesforce content is maintained in your Coveo organization. When you create a Salesforce source in your Coveo organization, the Salesforce security model is replicated by indexing not only the content but also the permissions associated with that content. This means that with Coveo for Salesforce, when an end user looks at information pulled from Salesforce, they only see what they’re allowed to see in Salesforce. For more information, see Content security.

Example

Bill is a customer support agent in a company. Like their customer support colleagues, in Salesforce, Bill has access to Accounts, Contacts, and Cases, but not to Campaigns, Leads, Opportunities, and Forecasts.

When Bill accesses a Coveo Insight Panel or the Coveo expanded view, the Salesforce results presented only include content from Accounts, Contacts, and Cases. If he was granted access to private objects in Salesforce, content from these records would also be included.

Limitations

Coveo supports several securities, but has some limitations including, but not limited to:

  • Restriction rules

    Coveo for Salesforce doesn’t currently support the Restriction Rules functionality that was introduced in the Salesforce Winter '22 Release.

    Warning
    WARNING

    To avoid data leaks, we strongly advise against applying restriction rules to the content indexed by your Coveo Salesforce sources at this time.

  • Shared personal groups aren’t supported

    A user can share content with a personal group. These sharing permissions can’t be indexed because they’re currently not reported by the Salesforce API. The consequence is that members of the personal group won’t see the shared content in Coveo organization results. This limitation is therefore not a security hole.

  • Field-level security isn’t supported

    For Enterprise, Unlimited, and Developer Salesforce editions, visibility of individual fields can be granted or denied to users or groups to fine-tune the access control in a permission set or a profile. The Coveo organization index doesn’t include this information. The consequence is that a user that’s denied access to a field could see the content of this field in the Coveo organization results. Note however that this is also the case for Salesforce search results (see the Salesforce item Field-Level Security Overview).

  • Login IP address and hours restrictions aren’t supported

    The Coveo organization index doesn’t contain restrictions on login IP address or hours configured in Salesforce. The consequence is that your Salesforce users can access the Coveo organization search interfaces and review Salesforce content from any IP address at any time.

  • Frozen users aren’t supported

    The users that are frozen using the Freeze button aren’t denied access to the search (see Freezing User Accounts).

  • KB record access based on data categories

  • Account relationship data sharing rules

    Coveo for Salesforce doesn’t currently support the Account Relationship Data Sharing Rules functionality that was introduced in the Salesforce Spring '19 Release.

    Note

    Poorly implemented Apex Managed Sharing can generate large amounts of record sharing. In such cases, records may be rejected by the index.

  • When the organization-wide default is set to Controlled by Parent, a maximum master-detail relationship depth of two levels is supported (see Sharing Default Access Settings).

    Example

    When you index a sub-detail object, the detail parents are correctly determined but the master parents are considered public because there are three levels (master-detail-subdetail).

About objects and fields

In Coveo for Salesforce, you often need to reference specific Salesforce objects and fields, either in result templates, in a search interface, or in custom code you want to implement.

This page explains the way Coveo transforms the Salesforce objects and fields, so you can reference them more easily in Coveo.

Note

For more information on how to create queries using objects and fields, see Query syntax.

Salesforce object reference

The Salesforce object names stay the same. You can refer to them by using the following syntax.

@objecttype=="<YOUR_SALESFORCE_OBJECT>"

Where you replace <YOUR_SALESFORCE_OBJECT> by the name of the Salesforce object.

Ensure that you use the Salesforce object API name (see Standard Objects and Custom Objects).

Salesforce field reference

Coveo adapts the Salesforce field names to ease the implementation and avoid potential confusion with other non-Salesforce fields.

The best and most accurate way of knowing the exact Coveo name for a Salesforce field, as well as its value for a given item, is to access the Content Browser in your Coveo organization.

Important

Remember to add the @ symbol when referring to a field (see Query syntax).

  1. Access the Content Browser (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console.

  2. In the Source facet on the left, select the Salesforce source you want to inspect.

  3. In the Object Type facet, select the Salesforce object associated to the item or field you want to inspect.

  4. To ensure that you can see all available items, click the Preferences button (37555461) at the end of the search bar, and check the View all content box.

  5. Click one of your items in the result list, and then click Properties.

You should now have access to the Coveo field name of each of your items, along with its associated value for the selected item.

Coveo for Salesforce field syntax

As a general rule, all Salesforce fields are transformed the following way:

sf + Relationship + Salesforce API Field Name

  • sf

    Indicates the field is a Salesforce field.

  • Relationship

    Indicates the parent or child object associated to the field.

    When referring to a parent object, the singular form of the object name is used.

    When referring to a child object, the plural form of the object name is used.

    When the object is a top-level field (has no parent or child relationship), this value is skipped.

    Examples
    • Since Account is a parent of Case, the field Name from the Account object associated to a case is sfAccountName

    • The Subject field for all the Case objects on an Account is sfCasesSubject

    • The Status field of the Case object is a top-level field, meaning its field is sfStatus

  • Salesforce API Field Name

    Indicates the Salesforce API field name (see Find the API name of a field).

    Remember that custom fields end with __c.

About object relationship

Since Coveo fields take the object relationship into account in its syntax, you may want to understand that relationship when referring to those fields.

Top-level fields

Top-level fields are fields that are directly associated to an object.

Example

Formula fields are considered top-level fields.

Parent relationship fields

The parent relationship is only available when querying a child object (for example, Case). Parent relationship fields have a many-to-one relationship where multiple child records (for example, Cases) can be associated to the same parent record (for example, Account).

Example

The Account object is a parent of the Case object, as cases belong to an account.

Child relationship fields

The child relationship is only available when querying a parent object (for example, Account). Child relationship fields have a one-to-many relationship where a single parent record (for example, Account) can be associated to multiple child records (for example, Cases).

Example

The Account object has a Cases child relationship that lists all the cases for any particular account.

When referencing a child relationship in a query, they’re expected to return many values.

  1. You can use expressions such as @YourChildRelationshipField==value to match documents for which a multi-value field contains the specified value.

  2. When used in facets, each value will appear on a separate line and can be filtered on independently.

  3. When retrieved in query results, the field value will be a string merging all the values, separated by semicolons.

Advanced configuration of a Salesforce source

With 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. On the Sources (platform-ca | platform-eu | platform-au) page, click your source, and then click Edit in the Action bar.

  2. In the Edit a Salesforce Source panel, select the Content to index tab, and then select the Salesforce objects and fields you want to index.

    Select objects and fields to index | Coveo for Salesforce
    Notes
    • Your custom objects are only displayed when you’ve 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 won’t 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.

      SalesforceBreadCrumb
  3. To edit a source field, access the Fields (platform-ca | platform-eu | platform-au) page.

    Note

    To edit field mappings, you must access the Edit mappings panel.

  4. To manage conditions on the objects to index, click the object, and then click Conditions in the Action bar

  5. To change the body field of your Salesforce objects, see View or edit a Salesforce object body.

  6. To finish adding or editing your source, do one of the following:

    • 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.

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

      Back on the Sources (platform-ca | platform-eu | platform-au) page, you can review the progress of your Salesforce source modification.

  7. Once the source is rebuilt, you can review its content in the Content Browser.

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 don’t meet specific criteria.

Access the panel

  1. On the Sources (platform-ca | platform-eu | platform-au) page, click your Salesforce source, and then click Edit in the Action bar.

  2. Select the Content to index tab.

  3. Select the checkbox next to the Salesforce object you want to apply a condition to.

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

    If condition | Coveo for Salesforce

    The Manage Conditions Applied to an Object panel is displayed.

Add conditions to a Salesforce source

  1. In the Manage Conditions Applied to an Object 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.

      AddKnowledgeCondition
      Note

      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 following comparison operators:

      Note

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

      • Equals

      • Not equals

      • Less than

      • Less than or equal to

      • Greater than

      • Greater than or equal to

      • Like

      • Not like

      • In

      • Not in

      • Includes

      • Excludes

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

      Notes
      • String values must be entered in single quotes and datetime values must respect the ISO 8601^ format (for example, '2017-08-21T20:09:26+00:00').

      • If the In or Not in operator is selected, each field value must be entered as a separate entry.

      • If the Includes or Excludes operator is selected, multiple field values can be entered in a single entry using the following syntax: ('value1','value2').

  2. Once you’re satisfied with your condition, click Add to add it to your source. The condition should be added underneath.

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

    The changes will be effective once you’ve saved and rebuilt your source. Only the objects satisfying all conditions will be indexed.

Manage conditions in a Salesforce source

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

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

    • To remove only one condition, click Remove next to the condition to remove.

    • To remove all conditions, click Remove All Conditions.

  2. When you’re done, click Apply changes.

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

View or edit a Salesforce object body

You can change what’s indexed as the body of your object by defining a mapping rule for the body field.

The body of your object is used both as the excerpt and as the quickview of an item in your search interface. For more detailed information, see Excerpt Component and Quickview Component. The body mapping documentation for non-Salesforce sources also contains details on the mapping process, Quick view, and excerpt.

  1. On the Sources (platform-ca | platform-eu | platform-au) page, click your source, and then click Edit in the Action bar.

  2. In the Edit a Salesforce Source panel, select the Content to index tab.

  3. Select the object you want to edit, and then click Body at the top of the object list.

    Edit the content of an object | Coveo for Salesforce
  4. Under Rule, enter the new body content. Keep in mind:

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

    • You can display Salesforce field values by using the following syntax: %[<SALESFORCE_FIELD_NAME>].

      Where you replace <SALESFORCE_FIELD_NAME> with the Salesforce field API name.

      Example

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

      Under Rule, you enter the following mapping rule:

      <html><div>Description: %[Description]</div><div>Account Number: %[AccountNumber]</div><div>Phone Number: %[Phone]</div></html>

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

  5. Once you’re satisfied with the content of the body, click Apply Changes.

What’s next?

You may manually edit the 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 JSON Salesforce objects.