About Resource Associations (Advanced)

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 resource configurations from one organization to another, Coveo must associate the versions of each resource across your organizations. Coveo therefore maintains a table of associations between a resource ID, which identifies a resource in a given organization, and its resource name, which is a unique identifier across organizations. Two resources in different organizations with an identical resource name are considered to be analogous, i.e., two versions of the same resource.

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.

Association Structure

Associations, on the other hand, consist of four pieces of information:

Association part 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 associations. The author field is identified across organizations thanks to its resource name. Once you export resources from your sandbox organization to your production organization, Coveo forms the following associations.

Resource name Resource description Associations
FIELD_author_123 author field sandboxorg_slug456_FIELD_resourceid789

Association 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 association table 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 has an association 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 remains untouched, unless you delete it via the API1
1. Upcoming releases will improve the management of deleted resources.
Recommended Articles