Including Coveo Resources

Deploying Coveo for Microsoft Dynamics 365 in a Dynamics 365 portal requires you to include some JavaScript code and stylesheets files in your portal (see Deploying Coveo for Microsoft Dynamics 365 in a Portal). This ensures that the Coveo-powered search interface and Usage Analytics work properly.

Add Coveo Site Settings

In Dynamics, create the following portal site settings (see Manage portal site settings):

Name Value Description
Coveo/ApiKey Your Coveo API key for query purposes The API key used to query Coveo Cloud and to push events to Usage Analytics (see Add an API Key. It must have at least the Execute query domain and the Push access level for the Analytics Data domain (see Privilege Management, Execute Queries Domain, and Analytics Data Domain).
Coveo/OrganizationId Your organization ID The ID of your Coveo organization (see Organization ID and Other Information).
Coveo/PlatformUrl The URL of the Coveo Platform.
Coveo/SearchUIVersion 2.4609 The version of the Coveo JavaScript Search Framework (see JavaScript Search Framework V2 Release Notes and JavaScript Search Framework).
Coveo/UsageAnalyticsUrl The URL of the Coveo Usage Analytics (Coveo UA) service.

Adding a Web Template for Coveo Scripts and Stylesheets

In Dynamics, create a new web template (see Store source content by using web templates):

  1. In the Name box, enter Coveo Resources.
  2. In the Website menu, select your portal.
  3. In the Source box, enter the following code:

     {% assign version = settings['Coveo/SearchUIVersion'] | default:'' %}
     <link rel="stylesheet" href="{{version}}/css/CoveoFullSearch.css"/>
     <script src="{{version}}/js/CoveoJsSearch.Lazy.js"></script>
     <script src="{{version}}/js/templates/templates.js"></script>
     <script src=""></script>
  4. In the action bar, click Save and close.

Adding the Coveo Resources to a Portal

This section explains how to include the Coveo search UI resources to the header of your portal.

  1. In Dynamics, open the web template of your site header.

    The header template is named Header by default.

  2. In the Web template page that opens, in the Source box, add the following XML line to include the Coveo Resources web template.

     {% include 'Coveo Resources' %}
  3. At the bottom of the page, click the floppy disk icon to save the template.

What’s Next?

Proceed to the next step of the deployment process (see Adding a Coveo-Powered Search Page and Deploying Coveo for Microsoft Dynamics 365 in a Portal).

Recommended Articles