fmESignature Link (DocuSign Edition) Linking Guide - Part 2

In Part 1 we covered linking the fmESignature Link file to your existing Contacts file and using the fmESignature Link file to send DocuSign requests to your Contacts. In Part 2 we cover how to generate a PDF from your FileMaker Contacts solution and create a new DocuSign request from your Contacts solution - we are assuming you have already implemented the changes covered in.

N.B. there are many ways to achieve the ability the following functionality and this is simply one example. You might prefer to use a different method that better reflects your preferences and conventions for your file. We've tried to make it as simple as possible for less experienced developers to follow.

Linking the fmESignature Link file to your existing FileMaker solution is the quickest way to integrate fmESignature Link and be up and running sending DocuSign requests to Contacts from your solution. You will link fmESignature Link to your existing FileMaker solution and end up with 2 linked files. We’re going to use the FileMaker Pro Contacts Starter Solution as our example solution file we wish to integrate with.

In Part 1 we will cover linking the fmESignature Link file to your existing Contacts file and using the fmESignature Link file to send DocuSign requests to your Contacts.

Step 1: Backup Files

Before proceeding with the integration please backup your existing solution file/s – you want to have a stable version you can revert to in case something goes wrong. We also recommend making a backup of the fmESignature Link file so you can refer to this to see how it was originally (particularly when updating scripts).

Step 2: Create External Data Sources

We need to create a new External Data Source from your solution to the fmESignature Link file. To create a new file reference to the fmESignature Link file select select File>Manage>External Data Sources. Click the New button then click the Add File button and select the fmESignature Link file should be in the same folder (or hosted on the same FileMaker Server):

N.B. you will probably be prompted to to authorise access to the file when creating the new data source for the first time.

Step 3: new Fields, Table Occurrences and Relationships

You will need to create a number of new fields, table occurrences and relationships in your file to allow us to create new records in the Requests table and the RequestsContacts table. Create the following new field in your Contacts table which will be used to create a temporary relationship to the newly created Requests table record:

Field Name Notes
zv_Pivot_gt Text field with global storage

Add the following new table occurrences from the fmESignature Link file to your relationship graph:

New Table Occurrence  Match Field  Table Occurrence  Match Field  Notes 
Requests    Uses the Requests table in the fmESignature Link file 
RequestsContacts    Uses the RequestsContacts table in the fmESignature Link file 
RequestsSelected  _kp_RequestID Contacts  zv_Pivot_gt Uses the RequestsContacts table in the fmESignature Link file 
       

After adding the new table occurrences and relationship your relationship graph should now include the following:

Step 3: create new Layouts

You will need to create a number of new layouts that will be used by a new script that generates the PDF from your file and creates the new request ready for sending from the fmESignature Link file:

New Layout Table Occurrence Notes
DEV Requests   Requests Make sure you add the FileMakerGeneratedPDF field to this layout
DEV RequestsContacts   RequestsContacts Can be left blank

These new layouts can be hidden as they are not required to be visible to end users of your solution.

Step 5: create new Template in fmESignature Link file

You will need to create a new Template in the fmESignature Link file for your PDF you wish to send from your solution and make a note of the Template ID (_kp_TemplateID field value). We will be creating a new Request record and populating the value of the Requests::_kf_TemplateID field with this so it knows which Template to use here.

Step 6: create new script to generate new request to a Contact

A new script will be required in your solution that performs a number of actions:

  1. captures the Contact (Recipient) details (Contact ID and Email Address). If you are using the SMS Delivery Notification feature you will also need to capture the Contact mobile phone number and ensure the Contact Country field is set.
  2. create the PDF to be sent if required from your solution (if you are supplying a standard PDF that is stored in the FileMaker template you can skip this step). You will need to create the PDF and store the path to the newly created PDF (e.g. using the FileMaker Get ( TemporaryPath )  function)
  3. switch to the new DEV Requests layout, create a new record and populate the Requests::_kf_TemplateID   field with your required Template ID you created earlier, as well as populate the FileMakerGeneratedPDF field. You can copy the method that we use in the PDF FileMaker Custom Template Agreement and Store)  script. Capture the value of the in a variable
  4. switch to the new DEV RequestsContacts layout, create a new record and populate the RequestsContacts::_kf_ContactID   field, the RequestsContacts::_kf_RequestID   field, the RequestsContacts::Email   field and the RequestsContacts::Position   field. If you are using the SMS Delivery Notification feature you will also need to populate the RequestsContacts:: PhoneMobile   field.
  5. set the field with the Request ID and use the Go to Related Records step to select the newly created Requests record in the fmESignature Link file for any last minute review before sending the request

Here's an example of what this script might look like which is taken from our demonstration video using the FileMaker Contacts starter solution:

Sample_Contacts_Script.pdf

Step 7: modify the 'Create Envelope and Send to Recipients' script in the fmESignature Link file

If you will be using the Create Envelope and Send to Recipients   script in the fmESignature Link file to send the request you will need to make some changes to accomodate requests that are generated from your external solution file. This script assumes that you need to create the PDF from a FileMaker layout, however this is not applicable for requests created from your external file as you have already created the request record and populated the with the PDF that you wish to send. One option would be to disable the following steps (or bypass them for requests created from your external file):

Step 8: testing

You can now perform this new script on a Contact record in your FileMaker solution and confirm that it creates the Requests and RequestsContacts records successfully and that you can successfully send the Request.

You could further automate this process by calling the Create Envelope and Send to Recipients   script from your solution if required.


The following video that demonstrates this process using the FileMaker Contacts starter solution that you can follow along with ( direct YouTube link):

Still need help? Contact Us Contact Us