Add or edit 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.

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.

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

Content update operations

refresh

check

Takes place every hour by default. Auditing must be enabled to take account of deleted items.

rescan

check

rebuild

check

Content security options

Same users and groups as in your content system

check

Coveo, Dynamics 365, and Security

Specific users and groups

check

Everyone

check

Add or edit a Microsoft Dynamics 365 source

When adding a source, select the Microsoft Dynamics 365 option.

To edit a source, on the Sources (platform-ca | platform-eu | platform-au) page, click the desired source, and then click Edit in the Action bar.

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.

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

  1. Enter your Microsoft Dynamics 365 instance URL, and then click Sign In.

  2. Select a user that’s both a Microsoft Dynamics 365 administrator and an Application administrator, and then enter the corresponding password.

  3. Click Accept to allow Coveo to access your Dynamics 365 content.

"Configuration" tab

In the Add/Edit 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.

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.

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:

  1. In the Microsoft Dynamics 365 expandable navigation panel at the top, navigate to Settings > Customization > Customizations.

  2. In the Customization page, click Developer Resources.

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

"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, 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 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 connector 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.

      Click for more information about custom metadata extraction and indexing
      Note

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

      For example:

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

      See your connector 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.

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

UNARY indicates that no values are expected for this condition (for example, with the Null operator).

values (array of string)

The field values to put in relation with the operator.

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 view the View Metadata page

Content

Fields

Edit

Sources

Content

Source metadata

View

Organization

Organization

What’s next?