Skip to content

Document types and hierarchy

Who can do this: repository admins.

A document type is a kind of item a source has: File, Folder, Email, a SharePoint content type, a Salesforce object such as Account, a database table. The connector describes the types its source offers and their fields; you define the ones you want, so their items get attributes.

Items of an undefined type are still found, by name and text, but have no attributes.

A document type defined for a Salesforce connection: standard fields and mappings

  1. Open the connection and its Document types. Each offered type shows whether it is defined; This type describes people marks types such as contacts or users.
  2. Choose Define…. A type the connector reports the same way everywhere, such as File, can be defined once for every connection of the connector; others for this connection.
  3. Map its fields; see Attributes.

Every item has standard fields: an identity, a name, created and modified dates and users. Files and messages bring them by themselves. For record sources — Salesforce objects and database tables — the definition says which fields supply them, under Standard fields. ContentSurface proposes them: the primary key, a name field, the dates, a change marker (a row version or modification time from which changes are read every few minutes) and fields to exclude — never read, such as large or sensitive columns. The name can join up to three fields. A parent field arranges a table’s rows into a tree, such as categories with their parent category.

Such a type must be defined before a mount point lists it. Changing its identifying fields, its content field or its parent field later gives every item a new identity: the rescan that saving requests replaces the type’s items, and access set on them is lost. Confirm with a Reason, which the audit log keeps. Through the API, the change answers 409 confirmation-required with the impact; repeat it with ?confirm= and the impactToken, and a reason.

A hierarchy shows each record of a type as a folder, with group folders below it holding related records — an account with its Contacts, Opportunities and their files; a customer with its orders and invoices. Each level uses a relation definition within the same connection.

  1. Open the connection’s Hierarchy for the root type, such as Account.
  2. Add level: choose the relation definition (Related by) and the Group folder name, such as Contacts. Add nested level for records below those.
  3. Save. It takes effect within minutes: saving rescans the connection’s mount folders.

An owned level — such as an order’s lines — holds records that exist only below their parent: they take its access, cannot have access of their own, and are found in search as the parent. Where the source says a record belongs to its parent — a Salesforce master–detail field, or standard details such as opportunity products and quote lines — Owned is ticked for you when you choose the relation; save it, or untick it to keep those records on their own too. A lookup, such as an opportunity’s account, is never proposed: an opportunity has its own owner and access.

Structure on the connection shows each type’s role in the hierarchy and explains why a change is refused.

To show records without their hierarchy below one mount folder, switch off Expand hierarchies in its filters.

A level keeps its group folders, and the access set on them, across edits as long as it stays in place. Removing a level — Remove level and Save, or moving it below another level — and Delete of the whole hierarchy remove group folders: the rescans this requests delete them with the related records shown in them, any access set on those group folders included, and the levels nested below them go too. Like anything a scan deletes, they are kept as deleted items for the retention period and then removed for good; a level added back through the API with its old key before then brings its group folders back with their access.

So both ask for confirmation first: the dialog lists the levels that go, their nested levels, and how many of their group folders have access of their own. Confirm with a Reason, which the audit log keeps. Adding levels, renaming group folders or changing a level’s relation needs no confirmation.

Through the API, the call answers 409 confirmation-required with the impact; repeat it with ?confirm= and the impactToken, and a reason.

  • A detail type exists only below its master: an owned level’s records cannot have a mount point of their own.
  • The hierarchy has no levels left: a relation definition it used was deactivated or deleted.
  • Group folders do not appear: they appear with the rescan that saving the hierarchy requests, usually within minutes, and only where there are related records.

In the API

The Portal does this through these calls; an integration can make them directly.

OperationCall
The document types the connection offers, read from its connector, each with its definition if any.GET /v1/admin/connections/{id}/offered-document-types
One offered type's source fields, with the standard source fields and, for a content type, the content properties.GET /v1/admin/connections/{id}/offered-document-types/{name}
Document type definitions: per connection, or shared by a connector type for static types.GET /v1/admin/document-types
A document type with its mappings in position order.GET /v1/admin/document-types/{id}
Defines an offered type for a connection, or once for its connector type when the type is static.POST /v1/admin/document-types
Replaces an assigned type's standard field assignments. A changed sourceId, content or parentId gives every node a new identity: with nodes, answers 409 with the impact; repeat with ?confirm and a reason.PUT /v1/admin/document-types/{id}/standard-fields
Deletes a definition; its nodes return to undefined and lose its mappings' values. With nodes, answers 409 with the impact; repeat with ?confirm.DELETE /v1/admin/document-types/{id}
The connection's hierarchy definitions: per document type, the levels its records are arranged into below mount folders.GET /v1/admin/connections/{id}/hierarchies
A document type's hierarchy definition on the connection.GET /v1/admin/connections/{id}/hierarchies/{documentTypeId}
Creates (without If-Match) or replaces (with it) a hierarchy definition. Each level names a relation definition within the connection, the side the parent occupies and a group folder; the child side maps a field the connector can filter on. Removing levels answers 409 with the impact; repeat with ?confirm and a reason.PUT /v1/admin/connections/{id}/hierarchies/{documentTypeId}
Deletes a hierarchy definition; the next scans delete its group folders and copies. Answers 409 with the impact; repeat with ?confirm and a reason.DELETE /v1/admin/connections/{id}/hierarchies/{documentTypeId}