Third Party Integrations
Purpose: Connect LegalServer to the other tools that you need to enable your staff to work more efficiently, report more effectively, and improve their day.
Cost: Dependent on the Module.
LegalServer wants you to be able to make the best use of your site. If you have issues enabling any of these integrations or modifying them for your organization, please reach out to LegalServer Support at email@example.com. Some things can be handled quickly by email. Others may require purchasing a block of support hours for 1 on 1 support. If there is something that you want to integrate with that isn’t available, please reach out to let us know. We can look to add it to our feature wishlist or give you a development quote to get it out sooner.
Additionally, there is a separate email list for API Integrations with LegalServer. Email firstname.lastname@example.org to get added to the list.
If you are considering a new integration with LegalServer, please reach out to email@example.com. We really want to support you in using purpose built tools to make everything easier. A couple of things to consider in your project:
We don’t want to be the gatekeepers of authentication for your third-party partners. You’ve got control of that for your Demo and Live sites. While we can help get the framework setup, providing access/logins to the third-party vendors is up to you.
Scope creep can be really difficult to manage. If we’re customizing an API endpoint, we need to know all the relevant fields at the onset to avoid double work. If custom fields are involved, they need to be created before work begins.
Aim for a Minimum Viable Product and then build off of it. Start small like with Henrik Kniberg’s example of how to scale a project:
Who will be maintaining and supporting this long term? LegalServer’s support typically stops at your LegalServer site. While we will look at LegalServer logs and troubleshoot a few example API calls, we’re not going to be building the external pieces of the integration or maintain them over time for security upgrades or refinements.
Please see our documentation for the Sharepoint Module. There is more that can be done by leveraging Power Automate and other Microsoft tools. For example, you can enable automatic RTF to DOC/DOCX conversion to allow convenient editing in Word Online from documents generated by LegalServer. Or you can automatically create subfolders in any Sharepoint Case folder. Some examples are included in our Sharepoint documentation.
Please see our documentation for the Dropbox Module
Google Team Drive
Please see our documentation for the Google Team Drive Module
Please see our documentation for the SMS Module
Please see our documentation for the Calendar Rules
Accounting and Payroll Export Module
Please see our documentation for the Accounting and Payroll Export Module
HotDocs and LawHelp Interactive
Please see our documentation for the Hotdocs and LHI Module
Using an iFrame, you can embed any other existing site. This method has become more disfavored by browsers, so it may not work with everything. Some good examples of this can be embedding videos, Google Documents/Sheets/Calendars, Calendly calendars, or key resources like JustFix.NYC’s Who Owns It.
Instructions with HTML
Instruction elements on a page can also contain HTML and are another way to utilize iFrames or links.
Pro Bono Opportunities API/Pro Bono Matters API
Please see our documentation about Pro Bono Opportunities API.
Getting Data Out of LegalServer
To get data out of LegalServer, consider where the request is coming from. If it is coming from an external site to pull data from LegalServer, look at the Reports API which turns any report into an API endpoint, complete with potential filters. Or you can look at our existing suite of APIs which include a wide number that can return information about cases or clients.
Getting Data Into LegalServer
Here’s where our APIs really help. Please explore them at https://apidocs.legalserver.org. We’ve got APIs that let you create an Online Intake from another platform or create case notes on existing cases. There are a myriad of possibilities and we’re interested in supporting you further.
Working Through LegalServer APIs from Outside LegalServer
Create a Case Note from any Process
If you want to log case notes automatically when a user does something specific, (e.g., “Documents Reviewed” or “Services Requested”) you can put the Generic Outgoing API block on the process using the Create Case Note API
The API authenticates with the API user and so you can easily add a case note in the background to any process or form being completed. The GOAPI block isn't visible on the front end, so you can put it wherever you like. You can pass a data structure for the note instead, but then the note text is a JSON string instead of something more legible. On the other hand, if you use a data structure, you can put various variables into the notes.
Using Docassemble’s New Interview Session API and Set Variables in an Interview API, you can start an interaction with Docassemble to process an interview from Guided Navigation. These two API calls would need to be on successive segments of a Guided Navigation Dialogue, but from the first API call, you can capture the Secret and Session parameters to then pass on for the second API call. Depending on your Docassemble Interview, you could then have it process in the background, send a completed document to LegalServer, or do something else. Utilizing jq to parse the API responses, you can set various fields within LegalServer as a result.
If two API calls is too complex, there's a new Docassemble Github Repository that will merge the two API endpoints into one designed to speed up initiating an interview from LegalServer.
Alternatively, there are a number of Github repositories that can also extend Docassemble to LegalServer. Consider Docassemble-GBLS which transforms an instruction into a list of Docassemble Interviews or Docassemble-LSLettersEmails, which offers a different method of form letter generation. These repositories are offered as examples and will require individuals with experience in configuring Docassemble.
Frontline SMS is designed for Text Message Surveys. Using a combination of the Guided Navigation with an API call to get information to Frontline SMS, and then APIs to get the information returned, Cleveland Legal Aid has an integration described in the following video:
HelloSign can utilize templates that require certain variables before they can get signed. See https://app.hellosign.com/api/templatesAndApiWalkthrough and https://app.hellosign.com/api/signature_request/send_with_template. For example, a Referral Authorization can have both the Client and the Attorney sign the form. You’ll have to pass both their names and email addresses. You can also pass other custom fields that might be necessary for the document.
In the example above, the following fields are passed:
Message: this is the message in the email to the recipients.
Test_mode: this is required for API testing. In live situations, you would exclude this parameter.
Signing_redirect_url: this redirects you when you finish completing the form.
Template_id: this is the UUID from the template itself
Subject: this is the subject of the email.
custom_fields[Forum]: sample custom field on the form. Please note that this is the deprecated version on the HelloSign endpoint since we can’t pass a list within an array.
ccs[CaseFile][email_address]: the case email to receive a copy once it has been completely signed
The template had three roles created -- Client, Attorney, and CaseFile. CaseFile is just for a copy of the completed document, while the other two are required signatures.
You’ll also need to include the Authorization token or header in the HTTP headers section.
To use this feature, you'll need an API license for HelloSign. API licenses limit the number of signature requests and the number of available templates based on the level of the license.
In the example above, an API call is made using the HTTP module. This is configured with basic user credentials and the query strings to call the appropriate Report and parse that data. The Flow Control Iterator is set up to go through all of the values of the Reports API call (configured with an array of "1. data: report: row"). Without the Iterator the CSV module would only work with the first row in the Reports API call instead of all of them. Then the CSV module then parses that iterated data into a CSV file. In setting up the CSV file, you will have to define the specific columns/structure of the destination CSV file. The Router feature is optional. In the example, the CSV file is then set to go to both Gmail (as an attachment) and an SFTP location. Gmail was configured for testing purposes, as the goal was to post the CSV file in an SFTP space, so one option could be turned off in a live setting. Additional details regarding error handling could also be configured.
Using the Reports API as indicated above, you can pull data into the desktop version of PowerAutomate to then automate various forms and processes. PowerAutomate can automate your browser to make it simple to fill out various forms.
Posting in a Microsoft Teams channel is exactly like the Slack integration outlined below with a custom webhook. The only difference is that instead of using Slack's documentation to create a webhook, you should use Microsoft's documentation.
New York City Housing APIs
There are public APIs available in New York City to make housing work easier. This video shows how to use the JQ features of GN API Calls to set both case variables and many to one service records.
Quality Assurance Checks
Using the Reports API, you can automate regular quality checks.
Using the Generic Outgoing API Block, you can kick off various surveys from Qualtrics.
Remote Legal Connect
Using Guided Navigation APIs, you can tie LegalServer into ProBono.net's Remote Legal Connect tool.
Salesforce can be configured to utilize the Online Intake Import to then create a new Electronic Case Transfer pending case.
Through a combination of Reports using the Reports API to update Salesforce, and a variety of our user APIs to update users, organizations can use Salesforce to update and interact with their volunteers. There are quite a number of potential APIs to use with this:
The key endpoints are:
New User API - creates a PBRA user and returns the Unique User ID (UUID) required for any of the other APIs below.
PB Update API now takes UUIDs as the record identifier and can be utilized with a number of additional fields (including any number of custom fields)
These combined with the Reports API (which can now filter reports based on the UUID, name, or email address) should allow you to integrate with any other volunteer/attorney management platforms.
Using the Guided Navigation API or the Generic Outgoing API block you can configure LegalServer to post a specific message into a fixed Slack channel using Slack's webhooks. See Slack's documentation on setting up webhooks to get Slack configured. Once you have an custom webhook, it should look like:
This can then get used as the API url in either the Guided Navigation API or the Generic Outgoing API. In a simple setup, you can only configure one outbound parameter. It could be the case number, a literal string or any custom variable. Since there is no response to a webhook, asking LegalServer to store the response in a note will have no result.
A more advanced integration might use the Guided Navigation API in two segments. The first segment might reach out to an API testing service that you control. One public example is HTTPBin.org which is free but makes no warranties.
N.B.: Reflector sites have no security, so do not send any client Personal Identifiable Information like names, addresses, social security numbers, etc.
Those will respond with the exact parameters that were passed along. Your first API call could be something like this:
Make sure that you're making a JSON api call. For ease of testing, you can specify that the response be stored in a casenote, but the key feature here will be to use JQ to parse the response into a new custom text field. I also strongly recommend checking the option to Perform request synchonously. This will prevent the continue button from showing until the API call has been completed.
For example, the response to the above API call could look something like:
You can then setup a JQ query of something like:
Take advantage of a service like JSON Editor Online to make the JSON response you stored in a case note pretty and readable. Then plug it in to a service like JQPlay to test out your JQ filter. JQ is case sensitive, so if you used HTTPBin.org, it returns the json parameter as lowercase. Then you'd have to use .json.casenum instead of .JSON.casenum in the example above. Once you've got your JQ filter identified, update the API call in the first segment of the Guided Navigation to Update the Case:
Then there will be a second segment of the Guided Navigation that is going to send the custom matter text field `Slack Message` as the `text` parameter to the Slack webhook instead of using a Literal Value like in the initial example. Slack will recognize the URL and automatically convert it to a clickable link.