Skip to main content
Legl & SOS integration guide
Tess avatar
Written by Tess
Updated over 3 months ago

1. Introduction

This document outlines the installation and configuration requirements for the Legl and SOS Integration. The installation consists of the following components:

  1. IIS setup and configuration

  2. Application configuration

  3. SOS configuration


2. Installation prerequisites

  1. 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’.

  2. Client-side

    • An SOS user

    • A Legl user account per user

    • Supported web browsers: Microsoft Edge, Google Chrome

Configuration prerequisites

  1. A service user account/administrator user & corresponding password to be used for installation.

  2. 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.

  3. 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:

  1. Configuring JSON files

  2. An understanding of IIS configuration

  3. 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

  1. Extract the contents of the installation package to the local drive of the IIS server e.g. C:\Websites\Legl

  2. Login to your IIS server and open the IIS Manager.

  3. Create a new website by right-clicking on “Sites” and “Add Website”.

  4. 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).

  5. Adjust the binding and port/hostname as per the client requirements and untick “Start Website Immediately” and click okay.

Appsettings.json configuration

  1. Navigate to the website location using file explorer.

  2. Open the “appsettings.json” file in a text editor

  3. Adjust the AppDb settings to a fully qualified name (as per the below screenshot) and adjust the connection string to your SOS DSN

  4. Navigate to the section header “AppSettings”

  5. 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"
    }

  6. Navigate to the section header “APIDetails”

  7. Adjust the baseurl to either https://api.legl.com (live) or https://api.sandbox.legl.com (Sandbox)

  8. 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"
    }

  9. Navigate to the section header “ClientValidation”

  10. Create a ClientID e.g. FirmName

  11. Create a secret key - recommended 10 characters (We do not recommend using symbols/special characters, numbers and letters only).

  12. Save and close the file.


6. SOS Setup

SQL SOS Scripts

  1. Create a folder within the same folder directory as the IIS website called SOS Scripts .e.g. C:\Websites\SOS Scripts\

  2. Copy the “PublishToSOS.sql” script to this folder.

Custom Tab

  1. Login to the “Practice Manager“ application for SOS.

  2. Navigate to “Maintenance > Custom Tabs”

  3. Click the “New Icon” (Top Left)

  4. Populate the Tab Code and Description with “Legl Pay”

  5. Click the Plus button beneath the Tab Code.

  6. Within the popup, populate the name and label with “Amount”.

  7. Change the list options to “Number (Decimal)”

  8. Click okay to save the changes.

  9. Repeat steps 5, 6 & 7, changing the Name and Label with “URL”, “InvoiceNumber” and “Bank”, for Invoicenumber use INVNO for the name).

  10. Once all 4 fields are created, click “ok” to save the document.

Custom Tab Groups

  1. Navigate back to Practice Manager > Maintenance.

  2. Open the Custom Tab Groups.

  3. Click the “New” Icon.

  4. Populate the group code with a code e.g. Legl and provide a description (Legl Integration)

  5. Find your previously created Tab within the first scroll box and “add” this to the “Selected Tabs” screen.

  6. Within the second scroll box, find and add “Archive” and “Matter”.

  7. Click “OK” to save changes and close to exist the window.

SOS Scripting

  1. Deploy the scripts folder to the SOS Scripts location (It is recommended to leave this in a sub-folder e.g. Legl)

  2. Once deployed, open Script Designer via SOS.

Settings.sos

  1. Edit the Settings.sos Script

  2. Open the “Settings” card.

  3. Adjust the baseuri replacing the “localhost” and port number with the sever name and port number defined earlier in the deployment.

  4. Adjust the baseurl to point to sandbox or live.

  5. 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

  1. Navigate to the IIS website

  2. Right Click > Manage Website > Start

Did this answer your question?