Inserting Coveo Components
- Integrating a Coveo Full Search Page
- Integrating a Coveo Lightning Insight Panel
- Integrating a Coveo Case Deflection Component
- Integrating Coveo in a Lightning Community
- Integrating a Coveo Classic Insight Panel
- Integrating a Case Creation Page
- Accessing the Coveo for Salesforce Interface Editor
Integrating Coveo Components in a Lightning Community
You should duplicate the Coveo components instead of using the default ones (see Integrating the Coveo Components in a Custom Lightning Component).
This page shows you how to add the default Coveo Lightning components to your community with the Community Builder.
Accessing the Salesforce Community Builder
Ensure Salesforce communities are enabled for your organization (see Enable Salesforce Communities).
When creating a community, the only supported template is Customer Service.
Give the View Global Header permission to internal users who need access to the community to allow them to see the global menu (see Enable the Global Header for Communities).
Access the Community Builder:
In Setup, search for and select All Communities.
With Salesforce Lightning With Salesforce Classic Under Platform Tools, select Feature Settings > Communities > All Communities. Under Build, select Customize > Communities > All Communities.
Next to your community, select Community Workspaces.
In the new tab, under My Workspaces, select Builder.
In the Salesforce Community Builder, you can add multiple components.
Adding a Coveo Community Search Component
- Access the Community Builder.
- Select the Search page.
- In the left sidebar, select the Components icon.
- In the Components tab, under Custom Components, drag the Coveo Community Search component and drop it onto the page region where you want the search interface to appear, typically the Content section.
When you create a Search component for the first time, the Interface Creator (This search page is not configured yet. dialog) appears:
Click the Community Builder Preview button to switch to the preview mode.
When creating a new community in Salesforce Spring ‘19, due to a critical update, you must either publish your community before creating or editing your Coveo Search page in Preview mode, or add the following Content Security Policy Trusted Sites (see Content Security Policy Overview):
After adding these sites, you must refresh the page to use the Interface Creator. You should also set the CSP security to Allow Inline Scripts and Script Access to Any Third-Party Host.
In the Coveo Search component region, click Set Up a Search Page.
Follow the onscreen steps.
You should now have a functional search page connected to the Salesforce search box, returning results from your Coveo Cloud organization index. You can also test your search page.
When you are satisfied with your search page, in the Community Builder top corner, click Publish to make your changes available to your community users (see Publish Your Customizations with Community Builder).
Be aware that publishing Interface Editor changes immediately affects your community page in production.
- Ensure the appropriate users are members of your community so that they can see your search page (see Add Members to Your Community).
Adding a Coveo Case Deflection Component
You can add the Coveo Case Deflection component in your Lightning Community to provide recommended solutions to users before they submit a case to your Support Agents (see Integrating a Coveo Case Deflection Component in a Lightning Community).
Adding the Coveo Standalone Searchbox
You can use the Coveo Community Searchbox component to add a standalone search box in your Salesforce Lightning Community (see Creating a Standalone Searchbox). To include the Coveo Community Searchbox in your Salesforce Lightning community, follow the steps below:
Access the Community Builder of your community; and then, in the menu on the left, select Theme.
- Click Theme Settings.
Under Search Component, in the dropdown menu, select Coveo Community Searchbox.
If you are using a previous version, the component name will be:
- Before 2.51:
- Before 3.25:
- Before 2.51:
- Close the Settings menu.
Your search page now uses the Coveo Standalone Searchbox.
Due to a difference in the Salesforce Winter ‘18, you must ensure that you have the appropriate value for the Search Url option (see Customizing the Standalone Searchbox):
- Before Winter ‘18:
- Winter ‘18 and up:
- Before Winter ‘18:
When you have the out-of-the-box Headline component from Salesforce integrated into your community search page, you will notice that it always shows the query is
@uri. You are encouraged to remove this component, as it is incompatible with the Standalone Searchbox.
With your current configuration, both the standalone searchbox and the search component are injecting their query to the search component. Since the search component query is not changed by the search box, it simply queries
@uri, which returns all results. The results are then further filtered by the query from the standalone searchbox. Leaving both query injections usually does not cause any problems. If you prefer to only inject the relevant query, you can disable the Auto inject basic query setting of your search component.
The Coveo Standalone Searchbox does not support Community Branding (see Brand Your Community). However, using custom CSS to override the template elements should still work as expected (see Override Template Elements with Custom CSS).
- Coveo for Salesforce 2.40 (March 2017)If you created your search page in version 2.40 or before, you need to ensure you add the
CommunityStateManager. In the Interface Editor, add the following code:
<div class="coveo-search-section"> <div class="CoveoCommunityStateManager"></div> </div>
Coveo for Salesforce 2.50 (December 2017) In the Interface Editor settings, you need to enable theme layouts when integrating the standalone searchbox by enabling history on your search page.
Coveo for Salesforce 2.51 (February 2018) Using multiple theme layouts with the Standalone Searchbox is supported.
You can now customize your Standalone Searchbox by using the options panel (see Customizing the Standalone Searchbox).
Inserting the Coveo Page View Tracker Component
The Coveo Page View Tracker component can be inserted in your Lightning community to send usage analytics data to Coveo Cloud. While it does not serve a specific purpose at the moment, the data gathered by the component will later be used to recommend pages to your users.
In Salesforce, access the Community Builder of your community (see Navigate Community Builder).
In the menu on the left, select the Lightning icon to see the list of components.
Under Custom Components, drag the Coveo Page View Tracker component, and drop it in the header of your page.
It is generally recommended to have the Coveo Page View Tracker on every page of your community so all of your page view are recorded. Dropping the component in the header of the page allows you to quickly and easily achieve this.
You can access the in-page component Property Editor by clicking in the component region to make the Property Editor show the Coveo component properties.
When you need to securely add mandatory filters or inject identities, consider defining server-side configuration for your Coveo Lightning component (see Adding Server-Side Coveo Lightning Component Configuration).