Matching Analogous Resources (Advanced)

In this article
Note

This article contains advanced information about Coveo resource snapshots. It’s mostly relevant for users who intend to manage snapshots through the API.

In order to copy a resource configuration from one organization to another, Coveo must identify and match the versions of this resource in both organizations.

Two versions of the same resource in different organizations are said to be analogous. Analogous resources share a resource name, which is a unique identifier across organizations. It allows Coveo to recognize analogous resources and ensure that configurations are transferred correctly when you export and apply a snapshot. Coveo maintains a table of the matches between analogous resources it discovered.

A resource name consists of the type of resource, a human-readable display name, and a string of random characters. For instance, the resource name of the author field could be FIELD_author_Y1Ul8A.

To identify analogous resources in its table of matches, Coveo combines four pieces of information:

Information Definition Example

Organization ID

The organization in which the resource is located.

mysandboxorg

Slug

A global identifier that is common to all versions of the resource across your organizations.

mywebsource2j9fkd

Resource type

The type of resource.

EXTENSION

Resource ID

The unique identifier of the resource in this organization.

a9dqg9b5h6r74ow4nuc

The table below is an example of an entry that could appear in Coveo’s table of analogous resources. The author field is identified across organizations thanks to its resource name. As you export resources from your sandbox organization to your production organization for the first time, Coveo matches the following analogous resources.

Resource name Resource description Analogous resources

FIELD_author_123

author field

sandboxorg_slug456_FIELD_resourceid789

productionorg_slug456_FIELD_resourceid000

Table Update

When you create a resource snapshot, Coveo generates a JSON list of the resources to export. Each resource in the snapshot is identified with its platform-wide resource name, which is generated for this purpose if the resource doesn’t already have one. Then, when you apply the snapshot, Coveo matches the resource names in the snapshot with the IDs of the resources in the organization. The table of analogous resources is then updated accordingly.

Specifically, this matching process allows Coveo to determine whether it should create, update, or delete resources to apply your snapshot.

Resource is listed in the snapshot Resource is analogous to a resource with the destination organization ID Snapshot application result

Yes

No

The resource from the snapshot has never been imported in the destination organization. Coveo creates this resource.

Yes

Yes

The resource in the destination organization is updated to match the configuration provided in the snapshot.

No

Yes

The resource in the destination organization remains untouched, unless you delete it via the API.