1. Introduction
This document outlines the installation and configuration requirements for the Legl and SOS Integration. The installation consists of the following components:
IIS setup and configuration
Application configuration
SOS configuration
2. Installation prerequisites
Server-side (Application Server)
Application Server will host the Legl Middleware.
Internet Information Services (IIS) installed in at least a base
configuration. (Internal Network Use only required)Latest version of the .NET 8.0 ASP.Net Core Hosting Bundle (8.0.7 at the time of writing)
External internet access to the Legl API endpoints (These can be
provided should your application server have restricted internet
access).Access to the firm’s SQL Server hosting the SOS database
(Usually Port 1433) from the Application Server if these servers
are different ‘machines’.
Client-side
An SOS user
A Legl user account per user
Supported web browsers: Microsoft Edge, Google Chrome
Configuration prerequisites
A service user account/administrator user & corresponding password to be used for installation.
A SQL username and password to allow the SOS Middleware to connect to
the SOS database. Your consultant can create an account if one is not
provided as long as Administrative access is given during installation.A Legl API key for use with the integration, which will be provided by the
Legl team.
3. Important considerations
A server restart is required if pre-requisites are missing and need to be added.
4. Installation assumptions
The target audience of this document will have a basic knowledge of software installation.
The basic skills required to complete this installation are:
Configuring JSON files
An understanding of IIS configuration
Familiarity with SOS Scripting.
5. Installation
Installation location and package
Download and locate the Integration installation package provided by Legl.
If the installation package has been provided as a zip file ensure that the files are not ‘blocked’. Right-click on the zip folder and select properties. Ensure to check ‘Unblock’.
Unzip all the files (and any subfolders) ready for installation.
IIS Deployment
Extract the contents of the installation package to the local drive of the IIS server e.g.
C:\Websites\Legl
Login to your IIS server and open the IIS Manager.
Create a new website by right-clicking on “Sites” and “Add Website”.
Provide a name for the website and browse to the extracted location for the physical path. (The authentication details may need to be adjusted to a user with the correct read/write access).
Adjust the binding and port/hostname as per the client requirements and untick “Start Website Immediately” and click okay.
Appsettings.json configuration
Navigate to the website location using file explorer.
Open the “appsettings.json” file in a text editor
Adjust the AppDb settings to a fully qualified name (as per the below screenshot) and adjust the connection string to your SOS DSN
Navigate to the section header “AppSettings”
Adjust the polling interval as required (1800 seconds is the default)
"ConnectionStrings": {
"AppDb": "Data Source=.\\..\\leglDb\\LeglIntegration.db",
"SOSDb" : "DSN=xxxxxxxxxx;Uid=xxxxxxxxxx;Pwd=xxxxxxxxxx;DIL=READ UNCOMMITTED"
}Navigate to the section header “APIDetails”
Adjust the baseurl to either https://api.legl.com (live) or https://api.sandbox.legl.com (Sandbox)
Populate the APIValue with your token from Legl e.g. Token ABC1234
"ApiDetails": {
"IsTest": false,
"BaseUrl": "https://api.legl.com/",
"APIKey": "Authorization",
"APIValue": "Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}Navigate to the section header “ClientValidation”
Create a ClientID e.g. FirmName
Create a secret key - recommended 10 characters (We do not recommend using symbols/special characters, numbers and letters only).
Save and close the file.
6. SOS Setup
SQL SOS Scripts
Create a folder within the same folder directory as the IIS website called SOS Scripts .e.g.
C:\Websites\SOS Scripts\
Copy the “PublishToSOS.sql” script to this folder.
Custom Tab
Login to the “Practice Manager“ application for SOS.
Navigate to “Maintenance > Custom Tabs”
Click the “New Icon” (Top Left)
Populate the Tab Code and Description with “Legl Pay”
Click the Plus button beneath the Tab Code.
Within the popup, populate the name and label with “Amount”.
Change the list options to “Number (Decimal)”
Click okay to save the changes.
Repeat steps 5, 6 & 7, changing the Name and Label with “URL”, “InvoiceNumber” and “Bank”, for Invoicenumber use INVNO for the name).
Once all 4 fields are created, click “ok” to save the document.
Custom Tab Groups
Navigate back to Practice Manager > Maintenance.
Open the Custom Tab Groups.
Click the “New” Icon.
Populate the group code with a code e.g. Legl and provide a description (Legl Integration)
Find your previously created Tab within the first scroll box and “add” this to the “Selected Tabs” screen.
Within the second scroll box, find and add “Archive” and “Matter”.
Click “OK” to save changes and close to exist the window.
SOS Scripting
Deploy the scripts folder to the SOS Scripts location (It is recommended to leave this in a sub-folder e.g. Legl)
Once deployed, open Script Designer via SOS.
Settings.sos
Edit the Settings.sos Script
Open the “Settings” card.
Adjust the baseuri replacing the “localhost” and port number with the sever name and port number defined earlier in the deployment.
Adjust the baseurl to point to sandbox or live.
Adjust the clientId and secret values to match that defined in the appsettings.json file.
Create Pay Request.sos
No changes are necessary to the main script however the following properties need to be applied:
Entity Type = MA
Menu = Navigation
Sub Menu = Legl
Icon = Legl.jpg
View Pay Request.sos
No changes are required to the main script however the same properties as 6.3.2 will need to be applied.
Post Pay Request.sos
No changes are required to the main script however the same properties as 6.3.2 will need to be applied.
Legl Pay.sos
No changes are required to the main script however the same properties as 6.3.2 will need to be applied.
Supporting Scripts
The below scripts are used by the existing scripts mentioned above. No changes are required.
AuthLogin.sos
AuthRequest.sos
Get Request.sos
JSONtoObjects.sos
7. Enable the Integration
Navigate to the IIS website
Right Click > Manage Website > Start