Add a Microsoft Dynamics 365 source
Add a Microsoft Dynamics 365 source
Microsoft Dynamics 365 is a customer relationship management typically used by support agents. A Microsoft Dynamics 365 source allows you to index any type of Dynamics entities, including support cases and KB articles. It also supports the Dynamics security scheme so that in the search results, users can only see the items they have access to in Dynamics. See Coveo, Dynamics, and Security for details.
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. |
Source key characteristics
Features | Supported | Additional information | |
---|---|---|---|
Microsoft Dynamics 365 Cloud version |
9 |
See Microsoft Dynamics CRM / Dynamics 365 Updates. |
|
Indexable content |
All available system and custom entities, notes and files attached to records of the indexed entity types, and KB articles (body, comments, and attachments). |
||
Takes place every hour by default. Auditing must be enabled to take account of deleted items. |
|||
Content security options |
|||
Add a Microsoft Dynamics 365 source
Follow the instructions below to add a Microsoft Dynamics 365 source.
-
On the Sources (platform-ca | platform-eu | platform-au) page, click Add source.
-
In the Add a source of content panel, click the Microsoft Dynamics 365 source tile.
-
Configure your source.
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. |
"Sign in to Microsoft Dynamics" window
When adding a source, you must first authenticate with Microsoft Dynamics 365 in the Sign in to Microsoft Dynamics 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. |
-
Enter your Microsoft Dynamics 365 instance URL, and then click Sign In.
-
Select a user that’s both a Microsoft Dynamics 365 administrator and an Application administrator, and then enter the corresponding password.
-
Click Accept to allow Coveo to access your Dynamics 365 content.
"Configuration" tab
In the Add a Microsoft Dynamics 365 Source panel, the Configuration tab is selected by default. It contains your source’s general and authentication information, as well as other parameters.
General information
Source name
Enter a name for your source.
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 ( |
Discovery Web App URL
Enter the Discovery Web App URL of your Microsoft Dynamics 365 instance to be used as the endpoint to connect to the web services used to communicate with the Microsoft Dynamics 365 cloud components.
If you don’t know your Discovery Web API URL, follow these steps to access this information:
-
In the Microsoft Dynamics 365 expandable navigation panel at the top, navigate to Settings > Customization > Customizations.
-
In the Customization page, click Developer Resources.
-
Your Discovery Web API endpoint address appears under Connect your apps to the Dynamics 365 Discovery Service.
Organization unique name
Enter the Microsoft Dynamics 365 unique name identifying your organization. This name also appears on the Developer Resources page.
Project
If you have the Enterprise edition, use the Project selector to associate your source with one or multiple Coveo projects.
"Entities to include" section
Enter a JSON configuration defining the Dynamics entities and fields to index. You can also specify conditions and relations between entities. See "Entities to Include" section reference for details on how to structure your configuration.
"Queries to include" section
Enter Microsoft Dynamics 365 FetchXML queries in execution order to index specific content. See "Queries to Include" section reference for details on how to structure your configuration.
"Content security" tab
Select who will be able to access the source items through a Coveo-powered search interface. For details on this parameter, see Content security.
"Access" tab
In the Access tab, specify 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.
For more information, see Custom access level.
Completion
-
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.
NoteOn 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.
-
-
Once your source is done building or rebuilding, review the metadata Coveo is retrieving from your content.
-
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.
-
If you want to use a currently not indexed metadata in a facet or result template, map it to a field.
-
Click the metadata and then, at the top right, click Add to Index.
-
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.
-
-
Click Apply mapping.
-
-
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 Define metadata key-value pairs in the
addOrUpdate
section of thePUT
request payload used to upload push operations to an Amazon S3 file container.REST API
and
GraphQL APIIn 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.
Add
<CustomField>
elements in the XML configuration. Each element defines a metadata name and the database field to use to populate the metadata with.-
Configure web scraping configurations that contain metadata extraction rules using CSS or XPath selectors.
-
Extract metadata from JSON-LD
<script>
tags.
-
Configure web scraping configurations that contain metadata extraction rules using CSS or XPath selectors.
-
Extract JSON-LD
<script>
tag metadata. -
Extract
<meta>
tag content using theIndexHtmlMetadata
JSON parameter.
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.
-
-
When you’re done reviewing and mapping metadata, return to the Sources (platform-ca | platform-eu | platform-au) page.
-
To reindex your source with your new mappings, click Launch rebuild in the source Status column.
-
Once the source is rebuilt, you can review its content in the Content Browser.
-
"Entities to include" section reference
Your JSON configuration should be formatted as follows. Each object in this configuration represents a type of Microsoft Dynamics 365 entity to index.
[
...
{
"name": "entityTypeName",
"conditions": [
{
"field": "fieldName",
"operator": "Equal",
"type": "STRING",
"values": [
"name"
]
}
],
"fields": [
{
"name": "fieldName"
}
],
"relations": [
{
"name": "linkedEntityTypeName",
"fields": [
"fieldName"
],
"fromField": "sourceObjectField",
"toField": "targetObjectField",
"toObject": "linkedObjectName"
}
]
},
...
]
name
(string, required)
The type of the Microsoft Dynamics 365 entity to index.
Example: account
conditions
(array of object)
Each object in this array represents a condition that an entity must meet to be indexed.
Example:
"conditions": [
{
"field": "address1_country",
"operator": "Equal",
"type": "STRING",
"values": [
"canada",
"mexico"
]
},
{
"field": "address1_addresstypecode",
"operator": "Null",
"type": "UNARY"
},
{
"field": "address2_latitude",
"operator": "GreaterThan",
"type": "NUMBER",
"values": [
"42"
]
}
]
field
(string)
The Microsoft Dynamics 365 field on which the condition is based.
operator
(string)
The condition operator.
Available operator options are: Equal
, NotEqual
, GreaterThan
, GreaterEqual
(is greater than or equal to), LessThan
, LessEqual
(is less than or equal to), Contains
, DoesNotContain
, BeginsWith
, DoesNotBeginWith
, EndsWith
, DoesNotEndWith
, Like
(is like), NotLike
(isn’t like), In
(is included in), NotIn
(isn’t included in), Null
(doesn’t contain data), and NotNull
(contains data).
type
(string)
The type of data specified under values.
Available types are: STRING
, NUMBER
, and UNARY
.
fields
(array of object, required)
Each object in this array is the name of a metadata field to index for the desired entity. Specify at least one field.
Example:
"fields": [
{ "name": "accountid" },
{ "name": "name" }
]
relations
(array of object)
Each object in this array represents a Microsoft Dynamics 365 entity related to the indexed entity.
Example:
"relations": [
{
"name": "customeraccount",
"fields": [
"name",
"modifiedon",
"websiteurl"
],
"fromField": "customerid",
"toField": "accountid",
"toObject": "account"
}
]
name
(string)
A string identifying the type of related entity. This doesn’t need to match the Microsoft Dynamics 365 entity name, as it’s only for identification purposes.
Example: customeraccount
fields
(array of string)
The names of the metadata fields to retrieve from the related entity.
Example:
"fields": [
"name",
"modifiedon",
"websiteurl"
]
fromField
(string)
In the entity to retrieve, the foreign key identifying the related entity from which you want to index some metadata.
Example: customerid
toField
(string)
The primary key identifying the related entity from which you want to index some metadata.
Example: accountid
toObject
(string)
The type of entity to retrieve, as displayed in Microsoft Dynamics 365.
Example: account
"Queries to include" section reference
Your FetchXML configuration should be formatted as follows. You can enter more than one query. If you do, queries will be executed in the order they appear in the configuration.
<queries>
<query>
<id>active-cases</id>
<name>Active Cases</name>
<queryXml>
<fetch>
<entity name="incident"></entity>
</fetch>
</queryXml>
</query>
</queries>
id
A unique string identifying your query.
name
A name identifying your query for troubleshooting purposes.
queryXml
The FetchXML query to execute to retrieve the desired content.
Required privileges
You can assign privileges to allow access to specific tools in the Coveo Administration Console. The following table indicates the privileges required to view or edit elements of the Sources (platform-ca | platform-eu | platform-au) page and associated panels. See Manage privileges and Privilege reference for more information.
Note
The Edit all privilege isn’t required to create sources. When granting privileges for the Sources domain, you can grant a group or API key the View all or Custom access level, instead of Edit all, and then select the Can Create checkbox to allow users to create sources. See Can Create ability dependence for more information. |
Actions | Service | Domain | Required access level |
---|---|---|---|
View sources, view source update schedules, and subscribe to source notifications |
Content |
Fields |
View |
Sources |
|||
Organization |
Organization |
||
Edit sources, edit source update schedules, and edit source mappings |
Organization |
Organization |
View |
Content |
Fields |
Edit |
|
Sources |
|||
View and map metadata |
Content |
Source metadata |
View |
Fields |
|||
Organization |
Organization |
||
Content |
Sources |
Edit |