Purpose
E-signature module purpose is to allow electronic signing of the leasing contracts. The module can use OneSpan or DocuSign service to support digital document signing. E-Signature module together with provider service includes:
Signature placeholders’ definition in document templates (takes part in module S4L.DM);
Creating and sending document packages to applicants for signing;
Tracking statuses of packages and signers;
Attaching signed documents to contract documents (takes part in module S4L.DM);
Linking signing process flow to trigger automatic application status updates.
E-signature Setup

E-Signature Provider. Select E-signature provider, either DocuSign or OneSpan.
Packages No. Series. Select number series for E-signature packages.
Set All Individual Applicants as Signers. Every individual, sole trader and partnership applicant automatically flagged as "E-Signature Signer".
Send Package Automatically. If “Create & Include to E-Signature Package” is flagged in “Document Selection” to print documents, the E-Signature Package will be sent automatically.
Status Filter
Status for Signed eSignature. Status of a package in which all documents were signed. The status must be valid at OneSpan and DocuSign services.
Status for Pending eSignature. Status of a package sent to the signers. The status must be valid at OneSpan and DocuSign services.
Status for Declined eSignature. Status of a package rejected by the signers. The status must be valid at OneSpan and DocuSign services.
OneSpan Setup
Use this setup when the selected e-signature provider is OneSpan.
API URL. URL of OneSpan service API.
API Key. Key that was generated by OneSpan to connect to the service.
Default Email Text. Text string that is automatically added to every e-signature email.
File Extension Filter for Allowed Documents in EsignLive. Filter for file extensions supported by OneSpan.
Email. Email address used to send OneSpan e-signature emails.
First Name. Sender first name used for OneSpan e-signature emails.
Last Name. Sender last name used for OneSpan e-signature emails.
DocuSign SOAP Setup
Use this setup when DocuSign is configured through the SOAP integration.
API URL. URL of DocuSign service API.
User Name. DocuSign service user name.
Password. DocuSign service password.
Integration Key. DocuSign service integration key.
Account ID. DocuSign service account ID.
Download Certificate. Toggle switch on to download certificates together with signed documents.
Email Subject. Subject of the DocuSign e-signature email.
Email Text. Text of the DocuSign e-signature email.
Use SMS Authentication. If enabled, SMS authentication is used in the e-signature process.
DocuSign REST API Setup
This setup is used when DocuSign is configured in SOFT4Leasing through REST API v2.1. It is separate from the DocuSign SOAP configuration and requires DocuSign portal setup, REST-specific connection values, and an RSA private key uploaded in SOFT4Leasing.
REST-only functionality. The following functionality is available only when DocuSign is configured through REST API v2.1: Approve and Decline, Initial Here, Default CC Officer, ID Verification.
DocuSign Portal Setup
First, create a DocuSign developer account to access the sandbox environment. After the account is created, DocuSign automatically assigns a User ID and an API Account ID.

To create an integration key, click Add App and Integration Key. Enter the App Name, then click Create App.

Select the required Integration Type.

In the Authentication section, select Yes for Is your application able to securely store a client secret? Make sure the Authentication Method for your App is set to Authorization Code Grant.

In the Service Integration section, click Generate RSA. Save both keys in a secure location, because they will not be shown again.

Copy and convert the RSA private key to XML, then save the result as an XML file. This file is uploaded later in SOFT4Leasing by using the Set RSA Private Key action.

Add the redirect URI https://businesscentral.dynamics.com/OAuthLanding.htm, then click Save to apply the changes.

Use the Set RSA Private Key action to import the XML file that contains the RSA key.

SOFT4Leasing REST Configuration
Open E-signature Setup and complete the REST configuration values.
Set API Mode to Rest API v2.1.
Enter the API URL: https://demo.docusign.net/restapi (or region specific production environment URL).
Enter the Integration Key, Account ID, and User ID from the DocuSign developer portal.
Set Download Certificate if certificates should be downloaded together with signed documents.
Enter the Email Subject that will be used as the subject of the DocuSign e-signature email.
Enter the Email Text that will be used as the body text of the DocuSign e-signature email.
Enable Use SMS Authentication if SMS authentication should be used during the e-signature process. This cannot be used together with ID Verification.
Enter the Auth Base URL: https://account-d.docusign.com/.(or region specific production environment URL)
Enter the REST Base URI: https://demo.docusign.net. (or region specific production environment URL)
Free Signing. When enabled, envelopes are sent without pre-placed signature tabs. Recipients can freely place their signature anywhere on the document. Use when documents do not contain pre-configured anchor text.
If Default CC Officer is assigned, the selected person receives copies of e-signature letters as a Carbon Copy recipient.
Use ID Verification. Flag if you want to use ID Verifications from DocuSign. This cannot be used together with SMS Authentication.
IDV Workflow Name. Displays selected ID Verification workflow name. When workflow is selected, follow the usual e-signature process, before letting user sign the document, they will be prompted to authorize using selected workflow. To select a workflow, use actions Grant Consent and Lookup IDV Workflow.
Oauth Redirect URI. Redirect Uri that is configured in DocuSign integration setup. This will redirect user to specific URL where user will have to grant consent to use ID Verification. Default URL can be https://www.docusign.com

REST Setup Actions
E-Signature setup has a number of actions related to DocuSign REST API integration.

The following setup actions are used when DocuSign is configured through the REST API. They support authentication, private-key management, user consent, and retrieval of available ID Verification workflows.
Set RSA Private Key. To use the DocuSign REST API, upload the RSA private key for the integration. The private key is generated in the DocuSign integration setup. Convert generated key to an XML file, and then upload by using this action.
Clear Cached Token. Use this action to clear the cached DocuSign access token when the configured user changes or when the same user needs to authorize the integration again.
Clear Private Key. This action removes the currently uploaded private key. Use it when the DocuSign integration changes and a new private key must be uploaded.
Grant Consent. When ID Verification is enabled, the user must grant consent before the Lookup IDV Workflow action can be used. This action opens the DocuSign authorization flow and asks the user to approve access to the DocuSign account.
Lookup IDV Workflow. This action calls the DocuSign account and retrieves all active ID Verification workflows. Select the workflow that should be used as the default. The selected workflow name is displayed in the IDV Workflow Name field on the E-signature Setup page.
Document Template Preparation
Signature placeholders (i.e. anchors) must be defined for the document template. Any anchor is defined as a text string and cannot have space characters in the definition:

The same anchors must be found in the document template:

Signature Types and Mapping
It is possible to have different signature types: radio buttons, text fields, checkboxes, date, and standard signature. Approve and Decline and Initial Here are available only when DocuSign is configured through REST API v2.1.

Radio Buttons:
You can include up to three radio buttons per anchor.
Use the Radio Buttons No. field to specify the desired number of radio buttons.
Approve and Decline: REST API only.
Approve and Decline types should be used together on the same document. They can be placed anywhere on the document as anchors for a simple click and sign functionality. If user clicks approve or decline on the document, it leaves no mark on the document, it just changes status for the document and status of the document can be refreshed by using action „Update Status“ in the E-Signature Package Card later on in the process.
Initial Here: REST API only.
The Initial Here type allows the signer to sign with initials instead of using a full signature or selecting the approve/decline actions.
Positioning:
If necessary, utilize offset fields to adjust the placement of radio buttons within the document template.
Each radio button has its own set of offset fields:
- First radio button: Offset X and Offset Y
- Second radio button: Radio Offset 2X and Radio Offset 2Y
- Third radio button: Radio Offset 3X and Radio Offset 3Y
If no offset fields are used, all radio buttons will be stacked directly on top of each other.
Signature Size:
Customize the size of each signature using the Size X and Size Y fields.
Note that each anchor can have different signature sizes.

The Field in Contract feature enables you to map an anchor to a specific field within the contract, this allows recipient to fill in the field during signing process and the value will be reflected in the contract. Here are some guidelines for choosing the appropriate anchor type:
If you decide to map the anchor to, for example, Marketing Consent field, the anchor type should be either Radio or Checkbox. This allows the recipient to indicate whether they give consent or not by marking the corresponding field in the document.
Alternatively, if you want to provide the recipient with a free-text option, use the Text Field type. This allows the recipient to fill in the value themselves, mapping it to any relevant text field in the contract.
Note: The placement of fields within the document is crucial. Here’s how it works when you map an anchor to different field types:
For a Boolean (True/False) type field, the first radio button always corresponds to true, while the second one represents false.
If you map the anchor to an Option type field:
- The first radio button indicates the recipient’s choice of the first available option.
- The second radio button signifies the recipient’s selection of the second available option.
- The third radio button reflects the recipient’s preference for the third available option.
Parsing Signature Values to Contract
Suppose you wish to enable recipients to select their gender and provide marketing consent. To achieve this, map one anchor in the Field in Contract to the Gender field (assign 3 Radio buttons, because gender field has 3 possible values and choose desired offset values for each button) and another anchor to the Marketing Consent field (with the Checkbox anchor type). In the contract, there is no need to pre-fill this information. Instead, allow the recipient to complete it during the signing process. For instance, consider an application where the fields remain unfilled until the recipient interacts with the document:

The document template should look something like this:

Note that the gender selections align with those in the application card. This consistency is essential because the choice made in the document directly impacts the corresponding field in the application.
Document template for the recipient will look something like this:

Then the recipient will make their choices and sign the document. After that is done, go to E-Signature Package Card and use Download Documents action to download signed documents and fill in the fields for the application.

Confirm that the choices made in the document are reflected in the application

E-signature Package Card
E-signature package card contains general information about the package and documents related to the package. 
General
Package No. Package number, assigned automatically at the time the package is created.
Contract No. Number of the application/contract the package is related to.
ID. Package ID number, assigned automatically by E-signature service at the time the package is moved to the service.
Status. Status of the package. The status is updated (manually or automatically) from E-signature service after the package was moved to the service. The available statuses are SENT, DECLINED, COMPLETED, OPTED_OUT, EXPIRED, ARCHIVED.
Documents Downloaded. The flag is marked automatically, when documents are downloaded from E-signature service. The documents are downloaded when packages get status which follows the filter in the E-signature Setup “Status for Signed eSignature”. When a package is marked “Documents Downloaded” it is excluded for pending to be downloaded.
Documents
Type Code. Property of a document entity (refer to S4L.DM documentation)
Template Code. Property of a document entity (refer to S4L.DM documentation).
Signers shows a total number of signers in the document. You can drill down to review or update signer’s details (e.g. email, phone number) before sending the package.
Type. Document status in the package:
Initial – the initial document that was sent for signature (i.e. document without signatures);
Signed – document that was downloaded from E-signature service.
Description. It is a description of a document.
Comment. Free text comment of a document.
Signers
The package is distributed for the responsible persons, called E-Signature Signers in the system. Each anchor in the documents must be assigned to a signer. A signer is allowed to be any individual applicant from the related application.

Anchor. text string which indicates where the signer must put its signature.
No. signer number which is the number of the customer in the system.
Role in Contract. defines role in the contract, is automatically copied from the applicant card.
First Name is a first name of the signer. Is automatically copied from the applicant card. First name is indicated on the document together with anchor.
Last Name is a last name of the signer. Is automatically copied from the applicant card. Last name is indicated on the document together with anchor.
Email that should be used to send document for signing to the signer.
Order No.: define signing orders of different signers in the ascending order.
Custom ID: signer ID in the e-signature service. Is automatically generated from Package No. and Applicant No.
Status: Status of the signer. The status is updated (manually or automatically) from e-signature service after the package was moved to the service. The available statuses are SIGNING_PENDING, COMPLETED, CANCELED, INACTIVE, DECLINED, EXPIRED, OPTED_OUT, ARCHIVED.
Working with E-signature
Creating E-signature Packages
The simplest way to create E-Signature package is to click action Print Documents and select documents you want to include in the package. On page closing system will create a new E-Signature package and include all selected documents.

Also, manually the packages can be created in the Application Card, Documents fasttab.
Documents to be included in the package must be attached in the documents section of an application. The anchors are copied from the template to the generated document at the time the documents are generated from the template.
In the Documents fasttab select the documents you want to include in the package (you can select multiple documents) and click Create Package activity button to create an internal package in the system:

In the opened package you can review or update signers for each document by drilling down Signers field value. If needed, delete the unnecessary anchors, edit email or phone No.


In most cases signers are populated automatically during the package creation. System tries to find suitable signers in Applicant list and apply signing order, if required. Note the Applicant must be flagged as E-Signature Signer to be included in this automated search. Also, Role filter is applied to Applicant depending on the signer role specified for a specific document anchor. If applicants are marked as „Receive E-Signature Copy“ (REST API ONLY) they will be added as CC recipient and receive a copy of the document after everyone has signed.

Click Send Package to email signers the link with a reference to the documents pending for signature. E-signature provider starts the process of signatures collection.
E-signature Periodic Activities
„Update Status“ – retrieves status of packages from EsignLive service. Only those packages that have been created in the service can get status updated.
„Download Documents“ – downloads documents from E-signature service. The documents for download are selected by filtering packages that do not have mark „Documents Downloaded“ and which status meet the „Status for Signed eSignature” value in the E-signature setup. Downloaded documents are attached to the documents of an application and are marked as Signed.
Both functions can be run manually or automatically by setting a job queue to run periodically.
Application Status Automation
Signing lease deals automatically by E-signature also benefits in financing process automation by allowing to validate application statuses as per the E-signing progress. Once the application was approved by credit team, the action of sending the E-signature package changes application status to “Pending eSignature”. At the time the package gets signed, the application is moved to “Signed eSignature” if the package contains leasing contract document. Note automated status update works only if Status Flow setup is completed on Leasing Setup card.
Signed applications can be found as a separate tile in the Originator role center for faster financing process.

To configure automated status update for e-signature process add and setup new application statuses: “Pending eSignature”, “Signed eSignature” and “Declined eSignature”:

Also, setup new statuses in the Leasing Setup, Status Flow section.

Leasing contract document template must be specified in Documents Selections to enable automated Application status update to “Signed eSignature” status.
