Customizing the Free Edition
- Using Custom Objects With the Coveo for Salesforce Free Edition
- Using Custom Fields With the Coveo for Salesforce Free Edition
- Using Multiple Knowledge Article Languages With Coveo for Salesforce Free
- Creating Multi-Value Fields
- Understanding How the Coveo for Salesforce Free Edition Uses the JWT Flow
- Linking the Coveo for Salesforce Free Edition to a Different Organization
- Getting Faster Results With the Coveo for Salesforce Free Edition
- Creating a Guest User Profile for Your Community
- Allowing Guest Users Access to Your Visualforce Community
- Adding Custom Fields to Result Templates
Using Custom Fields With the Coveo for Salesforce Free Edition
When creating a search page using Coveo for Salesforce, it is common to want to include custom Salesforce fields as part of your implementation.
When creating its schema of the available objects and fields from your Salesforce organization, the Coveo Search API takes your custom fields into account. It is this schema that allows Coveo to know which objects and fields can be queried in a search page.
You can use your custom fields in a Coveo search page using the following syntax, where you replace
SalesforceApiName with your field Salesforce API name:
Custom fields usually end with
When adding a custom field to a Knowledge article, you must ensure that the
objecttype that you query is the actual Knowledge object, not
You wish to create a facet from your
CustomField custom field, in your
Knowledge Articles tab that only displays articles from the
In your search interface, the expression you use for your tab is
@objecttype==(Knowledge__kav), while the field used for your facet is
When using Lightning Knowledge, you should always refer to your Knowledge object instead of
However, after creating a new custom field, you might notice that you are unable to use it to query in your Coveo search page. This is because the Salesforce schema has not been updated in the Coveo Search API yet.
There are two ways to make a custom field searchable.
- Wait 24 hours. The schema of your Salesforce objects and fields is updated daily.
- Trigger the Search API to add your custom field to its schema.
- Wait from 15 minutes to 6 hours after the creation of your custom field. During that time, you should not query using Coveo so the old schema can timeout.
In a Coveo search page, search for your field.
You created a new custom field called
MyCustomField. Because it is a custom field, its Salesforce API name is
In a Coveo search page, in the query box, you enter
@sfmycustomfield__c, which is not expected to return any results.
If, at this point, your query returns results that include your new field, then it was already added to the Coveo Search API schema.
Wait up to a minute, giving the Coveo Search API time to update the schema.
- Perform the search again. You should now have results for your field.