Purpose: Link LegalServer Cases to Gavel to generate specific documents from LegalServer data.
Cost: $2500 one time pus $50 per month. This feature is in Beta.
Gavel.io (formerly Documate) serves as a no-code document automation platform. Your organization will need to have a Documate account and workflows configured in Gavel. We suggest telling your sales person you will be integrating with LegalServer. You will need a level of account that includes their APIs.
While Documate has rebranded as Gavel, the references within LegalServer have not yet been updated to reflect the new name.
There is a new block available on a Case Profile. This acts much like the Recommended Documents Listview with the ability to filter based on Legal Problem Code, Special Legal Problem Code, County, and Language.
Clicking on the Document title opens a popup with a link to kick off the workflow in a new tab.
Alternatively, there is a Documate Packet Generation block that is available when you want to trigger a specific Gavel workflow at a given time.
Under Admin -> Documate Settings there is a place to indicate your Gavel subdomain and an API key. Gavel has directions for how to generate an API Key here although we’d recommend naming it something more like “LegalServer Integration Key”.
There also is a listview of all the workflows available in Gavel.
Clicking on the icon in the top right will refetch the latest workflows from Gavel.
Clicking the title of the Workflow brings up a Documate profile.
Note that the last field is a list of all the variables in Gavel followed by the field they are mapped to from LegalServer. If you go to Admin -> Edit this Document, you’ll be able to modify what is available here and map specific fields to Gavel variables. Most of these fields are similar to the Document Template Profile, however the Review Answers field is unique to Gavel. This field is deprecated in their API, so feel free to ignore it in the LegalServer UI.
The mapping of individual fields occurs on a question by question basis. When you select the question (Gavel variable), the source fields will be limited based on the question type. For example, a number field in Documate can be mapped to a number field from LegalServer, but not a text field from LegalServer. You also have the option of selecting Literal values which are typed in specifically. A Multi-Select in LegalServer can only be mapped to a Checkboxes in Gavel. If you are mapping a literal value to Checkboxes in Gavel, LegalServer will interpret commas as an indication of separate items to pass from LegalServer to Gavel. These mappings were recently expanded as of 2022-12-16.
You do not have to map every required variable in your Gavel workflow. If you do not map them all, you will get a validation warning that some required variables were not mapped. If you then scroll below the mapping, there is a checkbox to select to override the validation.
Repeating items can be mapped to subtables within LegalServer. Several subtables have been made available for Gavel. The data is typically fairly raw in the options available and it may call for some additional testing to be sure you are pulling the correct variable.
Existing subtables available include:
Adverse Party
Arrests
Assets
Assignment
Charges
Custodial Status
Events
Expenses
Family
Income
Litigation
Notes
Sentences
Services/Phases
Tasks/Deadlines
Once you've selected a subtable to send, there is no ability to filter that subtable. You can do that in Gavel by filtering for specific data in the repeating item. See Documate's Help site for examples.
If there are multiple fields on the repeating item in Gavel and you don't want them all set by LegalServer, set the other repeating item sub-fields to Literal Values and then leave the field for Literal Values blank so that LegalServer sends "" instead. Otherwise the fields are not asked in the Gavel UI.
This block allows you to select just one given Gavel Workflow to be generated. When this is triggered, you currently get redirected immediately to the Documate Generation static form to trigger the given workflow on the case.
This is a less secure method to get your document back, but will save the documents to Dropbox or SharePoint if those integrations are enabled. To have the documents automatically returned to LegalServer, create an email variable in your Gavel workflow of “legalserver_case_email”. Then when you are configuring the Output Documents in Gavel select “Send finalized documents to email address:” and pick that variable.
On the LegalServer side, when you go to map the “legalserver_case_email” variable, pick the “Case Email” field.
This is in beta as of 2023-01-12. This is a more secure method of getting any documents back from Gavel. To set this up, in your Gavel workflow, create a text variable of "legalserver_matter_uuid". Then when you are configuring your variables in LegalServer, map it to "unique_id" field from LegalServer. This will be used by the webhook to send the documents to the correct LegalServer case. You can also specify a text variable of "legalserver_subfolder" that will be the subfolder in LegalServer where the documents are saved.
In Gavel, you'll configure your workflow and go into Settings and then Integrations. Within the Integrations, select New Webhook and set the following values:
Name - Something memorable for you.
Webhook URL - https://YOURSITEHERE.legalserver.org/api/v1/documents/documate
Include Documents - Say yes.
Configure Headers - Say yes.
Name - "Authorization"
Value - "Bearer TOKEN_GOES_HERE"
Then click the Plus icon next to that row to save that header.
Then click Save.
You can get a token by using the Manage Personal Access Tokens block on an API user.
Gavel returns the files in a files.zip file. LegalServer will save that file to a subfolder on the case called "Documate Zip Files". LegalServer will automatically unzip that file and save the files to the requested subfolder (or the root folder if no subfolder is specified by "legalserver_subfolder"). A case note is then created with those files linked to it and the Note Type of "Generated Documents".
For troubleshooting purposes, there is a Documate API Log where you can review the API calls made to Gavel and the responses. This is available at Admin -> Documate API Log.
There are three user role permissions created for the Documate integration:
Documate - API Log - This exposes the Documate API log for review.
Edit Documate Templates - for any user role that should be able to configure and map the Document Templates.
Generate Documate Templates - for any user role that should be able generate documents from a case.
As of 2022-12-14, Documate currently has a bug where the Review Answers parameter does not affect the API. Review Answers is now deprecated in their API, so LegalServer will remove support for it in the future.
LS-91068 - warnings when the field type is changed in Gavel and the LS field type no longer matches