Automate document assembly based on field values
Generating new documents is often a manual part of the workflow following a contract review project. With Document Assembly, you can automate document creation at scale based on the structured data you've extracted during review.
Assembly templates as building blocks
Assembly templates are the building blocks of document assembly models. An assembly template in Contracts is essentially a Word document with enhanced capabilities. When you add tokens to the Word document, you can later map those tokens to fields in Relativity to fill them in with data.
For example, if your Word document has the phrase "Effective as of {{effective_date}}," you can you can later map this {{effective_date}} token to the Effective Date field in Relativity to fill in the actual date of the contract in place of the {{effective_date}} token in the Word document.
If the effective date is March 3rd, 2017 Contracts will generate a new Word document and the new phrase will read "Effective as of March 3rd, 2017."
Note: Tokens cannot contain spaces. In the example, the token must be {{effective_date}}, not {{effective date}}.
There are more advanced functions you can put in the Word document to, for example, implement "if this, then that" functionality based on what data is filled in place of a token. Reach out to support to explore more options.
Contracts supports the following functions:
Function | Scope |
---|---|
Date functions | All functions supported |
Math | All functions supported |
Strings | All functions supported |
Regex | All functions supported |
Code blocks | Only single line expression statements supported |
Creating an assembly template
To create a new assembly template:
- Go to the Contracts Assembly Templates tab.
- Click New Contracts Assembly Template.
- Name your assembly template.
- Add a description.
- Select a file to upload from your computer and use as a template.
This must be a Word document. - Click Save
Running document assembly
To generate a new Word document for every document in your data source based on your assembly template and field-to-token mapping:
- Go to the Contracts Models tab.
- Click New Contracts Model.
- Name your model.
- For Model Type, select Document Assembly.
- Add a description.
- On the Assembly Template card, select the assembly template you created.
- On the Output Control Number card, add text you'd like to append to the control number Contracts generates for each newly assembled Word document.
- Click Save.
Setting up token mapping:
- On the Token Mapping list, click Edit.
- On the list of tokens to the right, move over the tokens you'd like to map into the middle area.
You can do this by dragging, double clicking, clicking once and then clicking the left arrow, or by clicking the Move All button. You can also type to filter for the tokens you want. -
On the list of fields to the left, move over the fields that you'd like to map into the middle area.
You can do this by dragging, double clicking, clicking once and then clicking the right arrow, or by clicking Move All.
You can type to filter for the fields you want but you can only map fixed-length text, long text, whole number, decimal, date, single choice, and yes/no fields. - Drag to reorder your fields/tokens in the middle area as necessary. Once mapped correctly, click Save.
- The modal will close and your mapping should be accurately reflected in the Token Mapping list.
- With the Use Previous Mapping drop-down, you can select an existing document assembly model and Contracts will auto map the fields to tokens for you.
To set up an analysis profile:
- Go to the Analysis Profile tab.
- Click New Contracts Analysis Profile.
- Name your analysis profile.
- Add a description.
- On the Document Assembly tab, add the model you created.
- Click Save.
To create an analysis set::
- Go to the Analysis Set tab.
- Click New Contracts Analysis Set.
- Name your analysis set.
- Choose the analysis profile you created.
- Select a saved search to run the analysis on.
- Click Analyze.
Outputs generated by Contracts
For every document in the saved search of your analysis set, Contracts will generate a new Word document in Relativity.
Control number of the new Word document
The new Word document will have a control number that includes the control number of the original document in the saved search used to generate it.
For example, if you ran your analysis set on a saved search with a document that had the control number "Enphase Lease," the control number of the newly assembled Word document will have the following control number: Enphase Lease_htk_new_[random 3 character ID].
If you choose to append text to this control number, the new control number will be: Enphase Lease_htk_new_[random 3 character ID] [your custom text].
Fields on the new Word document
The new Word Document will inherit all the field values from the original document in the data source used to generate it.
For example, if there are 10 fields with values populated on Document 1, after running document assembly the new Word document will have the same 10 field values, including Contracts Related Documents. Therefore the Word document will appear in the Related Items Pane in the Contracts Viewer.
Supported field types that can be mapped to tokens
You can map the following field types to tokens on an assembly template:
- Single choice
- Multiple choice
- Single object
- Multiple object
- Long text
- Fixed-length text
- Date
- Currency
- Whole Number
- Decimal
Note: Contracts supports fields that are open to association. Open to Associations is an advanced setting on fields that determines whether an object field can display its information on an associated object field. Fields that are open to association are sometimes referred to as reflected fields.