

You can integrate into the Contracts Analysis pipeline through custom connectors. A custom connector is a framework that customers can use to wrap around their existing machine learning (ML) and artificial intelligence (AI) pipelines, applications, or third-party services, allowing seamless integration to the Contracts Analysis pipeline. You can use custom connectors to integrate an internal entity extraction application without having to manually export/import data from Relativity, connect to a third-party contract analytics tool you are currently using, and more.
Contracts custom connectors support the following functionality:
To configure a custom connector:
Field mapping is done after saving the Model first and then going back to edit it.
To set up token mapping:
This section provides an overview of custom connectors for developers.
Custom connectors support the use of one of the following standard authentication methods: API Key.
We provide you with a simple configuration interface to map Relativity fields to the properties in your API's request schema.
Below are examples of API calls.
In the following example, let’s say your API requires two fields to be sent for a request.
Name | Description |
---|---|
id | The document ID |
text | The extracted text of the document |
An example JSON request body would look like the following:
In this example we show how you would send the native document API requires two fields to be sent for a request:
Name | Description |
---|---|
id | The document ID |
fileType | The native file type |
fileData | The base64 encoded native Document data |
An example JSON request body would look like the following:
To take advantage of Contracts’ rich document viewer functionality in Relativity, Custom Connectors accepts the following fields in your API’s JSON response payload.
Name | Type | Use case | Description | Relativity field |
---|---|---|---|---|
documentId | number | ALL | The Relativity ArtifactID of the document used to match the response of your API back to the document. | Artifact ID (read only) |
category | string | Classification | The category of the contract | Contract Type |
probability | decimal | Classification | The confidence score for the categorization of the contract | Contract Type Confidence Score |
title | string | ALL | The title of the contract | Contract Title |
sections | array | Segmentation | An array of sections | Section |
annotations | array | Annotation | An array of Annotations | Annotation |
fields | array | Relativity Field Population | An array of Fields | Field |
The following table provides descriptions and use cases for Section fields.
Name | Type | Use case | Description | Relativity field |
---|---|---|---|---|
text | string | Segmentation (required) | The text of the section | Contracts Extracted Text |
heading | string | Segmentation (optional) | The heading of the section | Section Heading |
start | integer | Segmentation (required) | The start offset of the Section in relation to the original Relativity Document Contracts Extracted Text | Contracts Section Start |
end | integer | Segmentation (required) | The end offset of the Section in relation to the original Relativity Document Contracts Extracted Text | Contracts Section End |
category | string | Segmentation (optional) | The category of the section | Section Type |
probability | decimal | Segmentation (optional) | The confidence score for the categorization of the section | Section Type Confidence Score |
The following table provides descriptions and use cases for Annotation (RDO) fields.
Name | Type | Use case | Description | RDO field |
---|---|---|---|---|
text | string | Annotation (required) | The text of the annotation | Text |
category | string | Annotation (required) | The category or type of the annotation | Category |
offset | integer | Annotation (required) | The start offset of the Annotation in relation to the original Relativity Document Contracts Extracted Text | Length |
length | integer | Annotation (required) | The length of the Annotation string | Offset |
The following table provides descriptions and use cases for fields.
Name | Type | Use case | Description | RDO field |
---|---|---|---|---|
field | string | Relativity Field Population (required) | The unique name of the field | Contracts Internal Field |
value | string | Relativity Field Population (required) | The value of the field | Contracts Internal Field |
locations | array | Relativity Field Population (required) | An array of locations for boundary boxes for the field | Location |
The following table provides descriptions and use cases for Location fields.
Name | Type | Use case | Description | RDO field |
---|---|---|---|---|
page number | integer | Relativity Field Population (required) | The page number of the boundary box of the field in the document | Contracts Internal Field |
left | decimal | Relativity Field Population (required) | The left coordinate of the bounding box as a ratio of the overall document page width | Contracts Internal Field |
top | decimal | Relativity Field Population (required) | The top coordinate of the bounding box as a ratio of the overall document page height | Contracts Internal Field |
height | decimal | Relativity Field Population (required) | The height of the bounding box as a ratio of the overall document page height | Contracts Internal Field |
width | decimal | Relativity Field Population (required) | The width of the bounding box as a ratio of the overall document page width | Contracts Internal Field |
Following are examples of API calls.
The following are example responses your API would return to support the use cases of annotations, segmentation, and classification.
This example will save an Organization annotation on document 12345 with the text of “Acme & Sons Bank”. This annotation will be visible to users when viewing the document with the Contracts Viewer.
This example will create two sections on document 12345. These sections will be visible to users when viewing the document with the Contracts Viewer.
This example will classify document 12345 as a Loan Agreement and save that classification to the Contract Type Relativity field.
The following is an example response your API would return to support the Relativity Field Population use case.
This example identifies in document 12345 the fields Invoice ID and Invoice Amount which can be setup to map to a Relativity Object when running Contracts Analysis.
Why was this not helpful?
Check one that applies.
Thank you for your feedback.
Want to tell us more?
Great!