0% found this document useful (0 votes)
29 views63 pages

Implementation Guide 20

Uploaded by

nironirosh2008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views63 pages

Implementation Guide 20

Uploaded by

nironirosh2008
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

IMPLEMENTATION

GUIDE
SIMPLE SIGNATURE FOR SALESFORCE

Implementation Guide

ã 2016-2021 To A Finish LLC


12407 MoPac Expwy N • Suite 250
Austin, TX 78758
www.SimpleSignatureApp.com
Table of Contents
Implementation Guide Introduction __________________________________ 5
Introducing To A Finish__________________________________________________ 6
Introducing Simple Signature_____________________________________________ 7
Free vs. Paid App Comparison __________________________________________________ 7
Before You Begin, Requirements __________________________________________ 8
Continual Development – What it Means ___________________________________ 8
Please Review us! ______________________________________________________ 8
Basic Configuration________________________________________________ 9
Permission Set Setup _________________________________________________________ 9
Adding the Signature Form to Mobile _____________________________________ 10
Modifying the Signature Form ___________________________________________ 11
Adding Fields to the Signature Form ______________________________________ 13
Connecting to a Parent Object ________________________________________________ 13
Launching a Signature Form _____________________________________________ 13
Launching from the Parent Object _____________________________________________ 14
Adding the Signature Button to a Layout ________________________________________ 15
Advanced Parameters (Paid) __________________________________________________ 16
Creating a Custom Signature Page for Lightning_____________________________ 19
Creating a Signature Experience _________________________________________ 19
Creating a Lightning Signature Form ______________________________________ 21
Creating a Lightning Fullscreen Form _____________________________________ 22
Adding the Signature Form to a Lightning Page _____________________________ 22
Automatic Lead Creation _______________________________________________ 24
Advanced Options (Paid) __________________________________________ 25
eSignature Agreement _________________________________________________ 25
Advanced Visual Changes_______________________________________________ 26
Flow Plugin __________________________________________________________ 27
Signature Report______________________________________________________ 29
Multiple Salesforce Orgs _______________________________________________ 29
Sandbox Configuration _________________________________________________ 29
Production Deployments _______________________________________________ 31
Signature Requests (Paid) _________________________________________ 33
PDF Document Creation ________________________________________________ 34
Site Setup ___________________________________________________________ 34
App Configuration ____________________________________________________ 37
Signature Requests Custom Pages ________________________________________ 42
Launching the Signature Request ________________________________________ 43
Actions ___________________________________________________________________ 43
Lightning Components _______________________________________________________ 44
Email Template Setup _________________________________________________ 45
Testing ______________________________________________________________ 46
Advanced Features ____________________________________________________ 47
Send From Emails___________________________________________________________ 47
Email SPAM and Other Problems ______________________________________________ 48
Multiple Step Signatures _____________________________________________________ 48
Signature Security __________________________________________________________ 51
User Counter-Signature ______________________________________________________ 52

Document Generation (Paid) _______________________________________ 54


Google Docs PDF Document Creation _____________________________________ 55
Example Merge Codes _______________________________________________________ 57
Visualforce PDF Document Creation ______________________________________ 59
Integration with other Document Generators ______________________________ 61
Feedback and Support Access ___________________________________________ 63
Rating Simple Signature ________________________________________________ 63

Version 2021.07.20
1
Chapter
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Implementation Guide Introduction


Introducing all the key components of the Simple Signature App for Salesforce.com

T
his manual will help you through the implementation of the Simple Signature
app for your Salesforce.com Org. You can read this chapter if you desire to do
so, but most users can probably start at the next chapter, where the installation
and configuration instructions begin.
Thank you for considering our app in your organization.

To succeed in the installation process you will need to pay


I C O N K E Y close attention to all of the information contained in this
$ Details You Can Skip manual. We recommend reading through this first chapter
before you begin, and then reading through each section as you
O Don’t Miss This!
work on it.
: Sample Code
M Danger! The Icon Key to the left shows the icons you will be seeing as
you go through this manual. The more advanced readers can
skip some of the details as indicated by the appropriate icon.
This manual is a work in progress, so please do take notes and let us know if you run into
any issues with the text or if you believe there is a better way to accomplish the tasks we
describe.

5
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Introducing To A Finish

$
To A Finish™ is a concept company that has grown out of a desire to
improve the Salesforce CRM consulting industry. Too often we have
found the priorities of consulting companies skewed towards speed and
profitability, rather than excellence and long-term success. This is not a
blanket statement about all consulting companies, rather a general
statement of the industry at large.
We believe there is a different way of consulting that will bring ultimate success to any
CRM venture. The biggest difference is time. We give special attention to steps that are
often rushed or even overlooked entirely in a typical project. Things like in-depth analysis,
getting to really know a business, documentation and end-user involvement in the process
help us set up a project for success. Ultimately, we must spend the time to do the work
until it is absolutely complete; To A Finish™.
We are not guaranteeing our clients will never see a bug or have to rethink initial strategies.
Reworking is actually part of the process of achieving success. What we are saying is that
our strategies and focus will minimize unforeseen problems and achieve for us an
ultimately successful project completion. We put our name on our work and stake our
reputation on quality service.
Test us. Allow us to show you the difference of doing work To A Finish™.
You can find more about To A Finish at www.toafinish.com

When you finish a thing you ought to be able to say to yourself: "There, I am willing to stand for that
piece of work. It is not pretty well done; it is done as well as I can do it; done to a complete finish. I will
stand for that. I am willing to be judged by it."
- O. S. Marden

6
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Introducing Simple Signature

$
Introducing a simple solution to capture signatures on the Salesforce
platform. With Simple Signature you can acquire signatures on release
forms, petitions, waivers, and other simple forms that need a few key
data elements and a signature. Simple.

With a little implementation work, Simple Signature can be used to


effectively replace other document generation apps for Salesforce at a
much lesser cost. However, primarily it is a tool to quickly gather signatures,
unencumbered by multiple-step processes or expensive, custom solutions. No need to
create a Lead or Contact record in advance; just read, enter your name and maybe a couple
other things, and sign. Keep it simple. Get it done.

Free vs. Paid App Comparison


The Paid version of Simple Signature includes many advantages. See a chart comparing
the versions below:

Feature Free Paid


Unlimited, In-Person Signatures ✔ ✔
Technical Support ✔
Field changes on the Signature Form Limited ✔
Custom/Multiple Signature Forms ✔
Link to Parent Object Limited ✔
Document Generation using Google Docs ✔
Signature Requests via Email & QR Code ✔
Final PDF Generation, saved to Files & Emailed ✔
Automated Lead (or other record) Creation ✔
Additional Signature Options (Typed, Paper, Topaz, None) ✔
rd
Integration with 3 Party Apps * ✔

* Apps include s-Docs, CoolDox, Nintex Drawloop, CongaComposer, etc.

Keep it Simple. Get it done.

7
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Before You Begin, Requirements

O
Before you begin working with our app, you must have several
components already in place and configured. We will not cover these
components in detail, but will at least point you to where you can get
the information you need.

A production system Salesforce.com Org will be needed in order to Salesforce.com


set up the integration. A sandbox will be very helpful in this process
as well. Any edition, Professional and above, of Salesforce.com
should work.

F Sales Cloud
F Service Cloud
F Custom Cloud (Force.com)

Continual Development – What it Means


Simple Signature is a … simple app, so not much can go wrong, but still, we know that
somebody is going to find something that is broken. We are constantly adding features,
and likely just made some pretty huge updates recently. So, please be gracious, and tell us
about anything you run into. Email at [email protected] and we’ll gladly take a
look at what you find, even if you are on the free version (bugs only).

Please Review us!


We greatly enjoy being able to provide users with and app they will find useful. And a
few of those users sometimes need us to build other things for them, so having a free
version is one of the ways we showcase our work for potential clients.
So, if you like the app, please leave us a positive review on the AppExchange:
https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000DqCoUUAV

But if you run into issues, please don't leave them there for the world to see (unless we
can’t get it resolved). Rather, contact us at [email protected] and we'll work together
to make this app To A FinishTM.

8
2
Chapter
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Basic Configuration
The steps necessary to set up the app for full use

T
he initial steps in the configuration are completed by first installing the package
from the AppExchange.com app store. Make sure to Install for All Users. Even
though only an Admin will configure it, you need to install for All Users so that
they can access the pages correctly.

Permission Set Setup


In order to have access to Simple Signature, users will need to be granted the Simple
Signature User permission set. In the Setup area go to Users à Permission Sets and then
click on the Simple Signature permission set.

Now, click the “Manage Assignments” button and add all Administrative users who will
be accessing Simple Signature to this permission set. Do the same for regular users who
need access with the Simple Signature (NonAdmin) permission set.

9
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Adding the Signature Form to Mobile


The first thing you may want to do is configure the Simple Signature form to show up
on your Salesforce Mobile app.
1) Make sure you are in the Lightning experience on the web version of Salesforce,
with Admin permissions.

2) Go to Setup à Apps à Mobile Apps à Salesforce à Salesforce Navigation.

3) Select “Sign” from the pages on the left, and use the arrow key to move it to the
items on the right. Position it near the top so that it isn’t lost.

4) Press the Save button.

5) Now log into Salesforce and verify that you can, in fact, see the “Sign” tab. (You
might need to close the app and open it
again in order to see it.)
6) Test the process as instructed in the next
chapter.
7) Next, go back to the Lightning desktop
version of Salesforce to continue
configuring.

10
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Modifying the Signature Form


Now, before beginning to use Simple Signature, you will want to change what the form
says in order to configure it to work like you need it to.
1) Make sure you are in the Lightning experience desktop version of Salesforce, with
Admin permissions.

2) At the top-right of the page click on Setup à User Interface à Custom Labels.

3) Find and then click on the Name of the Page_Title custom label.

4) You will then be presented with a page where you can create a “Translation” for
this particular item. To do so, press the New Local Translations / Overrides
button.

O
* Note: If you do not see the Translations area shown in the
screenshot above, go to Setup à User Interface à Translation
Workbench à Translation Language Settings, and turn it on. You
should choose “English” or the native language of the users who will be
using the form.

11
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

5) Select a Language, typically “English” or the default language your users will be
using, and then type in the Title you want at the top of the form. Press the Save
button, then click on the “Master Label” link, and you will see that this title is
now a part of the form.
6) If you have users with Salesforce set to a different language, you will need to
repeat steps 4-5 for each of those languages. If you do not, then they will default
to seeing the title “Salesforce.com, Inc. Release Form”.

7) Now, go back to Step 3 and this time click on the Long Legal Text 1 item. This
is the text that will go under the title of the form, and before the fields and
signature. If you can fit it all in, then go ahead and do so. You will also need to
add text in the Long Legal Text 2 item, even if it is only one character. Repeat
Steps 4-6.
8) Now do the same Steps 3-6 for any other elements you wish to change on the
form.

9) To remove fields from the form, go to Setup à Object Manager and then find
and click on the Signature object.

10) Scroll down to the “Field Set” section and click “Edit” on the SignatureFields
field set. You can now remove fields, reorder them, or add new fields to the form
by dragging them down into the field set (see the next section for more).

11) Once you are done, go back to Salesforce Lightning and test the “Sign” tab,
making sure that your entire wording is now as you wish it to be.
* Note: It is important to get this right before you start using the app, especially
if you are using it for legal purposes. When somebody signs and saves the record,
the wording they agreed to is copied onto the record, so it is important that the
wording be right before you start taking signatures.

12
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Adding Fields to the Signature Form


Using the steps above, you can add the fields that come with the form into the page.
However, you can add as many custom fields to the form as you desire.

1) Go to Setup à Object Manager à Signature and the click the New button to
add fields. Repeat as necessary.
2) Once you’ve added all the fields you want, scroll down to the “Field Set” section
and click “Edit” on the SignatureFields field set. You can now remove fields,
reorder them, or add new fields to the form by dragging them down into the field
set.

* Note: you can create a new Field Set if you prefer, but you will only be able to use it in the Paid version.

3) Once you are done, go back to Salesforce Lightning and test the “Sign” tab,
making sure that your entire wording is now as you wish it to be.

Connecting to a Parent Object


Signatures can be stand-alone, but you can also connect them to any object like Contracts,
Orders, Cases or a custom object. If you do this, that object is considered the parent of
the signature. You can either add a button on the parent object itself, or a button on the
Signatures related list for the parent object, and the signature created will be a child of
the parent object you selected.

Launching a Signature Form


In Salesforce we currently have several different technologies at play, all of which are
supported in most cases in Simple Signature:
1) Lightning Web (which works with Lightning and Mobile), and
2) Lightning (which also works with Lightning and Mobile but a little slower),
3) Visualforce (which works with Lightning, Classic, Mobile and Mobile SDK). And
is covered in a separate document.
Lightning Web Components (LWC) is still being deployed by Salesforce, but
development is moving in that direction, so we are committed to it as well. You should
try to use LWC if you can, or if not Lightning if at all possible.
In the meantime, the only reasons to go with the older Visualforce offerings are in
situations where your organization is still using Classic or if you have mobile users using
the Mobile SDK. Virtually everything else is available in Lightning, and most is being
released now in the new Lightning Web technology.

13
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Launching from the Parent Object


Instructions to set up a “Sign” button on the Contact record as an example, are below.
This button can be used in Lightning and in Mobile.
1) Make sure you are in the “Lightning” desktop version of Salesforce, with Admin
permissions.

2) At the top of the page click on Setup à Object Manager and click on Signature.

3) In the menu on the left, click on the Fields & Relationship section and then
press the New button to create a Lookup field to the object you want to have as
the Signature parent. Contact, Lead and Opportunity are already done for you.

* Note: Do not duplicate lookup fields in the Signature object.

4) Now, if you are in the Free mode, skip this step. If paid, follow the instructions
in the Creating a Signature Experience section on page 19. Then, follow the
instructions in the Creating a Lightning Signature Form on page 21.

5) Once done with those tasks, go back to Setup à Object Manager and then click
on the Parent Object you want to have the signature on, in this case Contact.

6) Click the Buttons, Links and Actions section, and then the New Action
button. Choose to create an action to run a Lightning Component.
7) Select the Lightning Component that you just created in step #4 (or the
signature:SignatureFormFree component if in Free mode), and enter a height
at least 500px or 600px. Next give the Action a name such as “Sign”. The screen
should look similar to below. Now Save.

8) The next page explains adding the button to the layout.

14
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Adding the Signature Button to a Layout


Instructions to set up a “New Signature” button on the Signatures related list for the
parent object, as described on the prior page. In this case, we will use Contacts as the
example:
ADDING A BUTTON ON THE PARENT LAYOUT

1) Go back to Setup à Object Manager and click on Contacts and then Page
Layouts from the left menu. (Note: if you selected a different object as the parent,
then go to the page layouts for that object instead.)
2) Select “Mobile & Lightning Actions” and drag the action into the “Mobile &
Lightning Actions” area.

You are done! Happy Signing!

15
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Advanced Parameters (Paid)


The Paid Version of Simple Signature supports many parameters that can be passed via
the Signature Experience. A list of supported parameters is shown below:

Parameter Description Type


allowrequest Checked to include a "Signature Request" button on the Signature Form, which Requests
when used, creates the Signature record with a "Requested" status,
unchecked/False (default) to do nothing.
attachpdf Checked to attach the PDF generated to the Signature record, Unchecked Universal
(default) to do nothing.
attachpdftoparent Checked to attach the PDF generated to the Parent record, Unchecked (default) Universal
to do nothing.
backtoparent Checked to go back to the parent record when done signing , Unchecked Universal
(default) will send you to the Signature record created.
communityname Name of the Community, to be used in URL handling. Use only when the Advanced
Signature experience is to be used in a Salesforce Community.
compact Checked to shrink the fields on the signature form so that each label is on the Universal
same line as the field, Unchecked (default) the labels will be above the field,
allowing more room for data entry.
country Used with advanced code. Please contact technical support to use. Advanced
contactField If your parent object is not the Contact record, but you still want to attach a Universal
Contact to the Signature record (you must to this if you want any of the
PDF/email automation), then you need to tell Simple Signature where the
Contact field is supposed to come from. For this, simply put the API name
(not the label) of the Contact lookup field in the parent object.
defaultfilterfield_ Select a Lookup field from the Signature object in the “Signature Field” Advanced
column, and then enter API Name of the field in the Lookup object that said
lookup field will be filtered on. (Use with the defaultfiltervalue_ parameter.)
defaultfiltervalue_ Select a Lookup field from the Signature object in the “Signature Field” Advanced
column, and then enter value which the lookup field will be filtered on using
the Lookup object field indicated in the defaultfilterfield_ parameter.
defaultfilterlookupvalue_ Please contact technical support to use this advanced feature. Currently works Advanced
only with Visualforce.
defaultvalue_ The “defaultvalue_” parameter is dynamic, next you must pick the name of a Universal
field in the Signature object. This selected field will be populated with the
value you provide for the parameter.
deletesigantureafter Checked to delete the PNG image of the signature after the final PDF is Advanced
generated, Unchecked (default) to do nothing.
emailpdf Checked to email the PDF generated to the contact attached, Unchecked Universal
(default) to do nothing.
embedpdf Checked to show the PDF to be signed in an iFrame above the signature form Universal
at the time of signing , Unchecked (default) to show the form by itself.
fieldheader API name of the field(s) to show as Headers on the signature form. Separate Universal
multiple fields with commas.
fieldhidelabel API name of the field(s) to show with no label on the signature form. Separate Universal
multiple fields with commas.
fieldreadonly API name of the field(s) to make read-only on the signature form. Separate Universal
multiple fields with commas.

16
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Parameter Description Type


fieldset FieldSet to use on the Signature Form. Uses SignatureFields as the default if Universal
not included.
generateqrcode Checked to generate a QR Code image and save it in the QR Code Image field, Requests
and ALSO to show the QR Code image after a signature request, Unchecked
(default) to do nothing.
hideblanks Checked to hide the input fields if they are blank, Unchecked (default) to show Universal
all fields on the signature form.
hideblankfields Similar to hideblanks, but only hides blank fields entered in the “Hardcoded Advanced
Value” column. Enter one or more API field names, separated by a comma.
hidecancel Checked to hide the Cancel button on the Signature Form, Unchecked Universal
(default) to do nothing.
language Language of the form. Only works with the Visualforce components. Universal
lookupdisplayfields_ Select a Lookup field from the Signature object in the “Signature Field” Advanced
column, and then enter List of fields (API names), separated by commas to
include in the lookup when used on the form.
lookupreturnfield_ Select a Lookup field from the Signature object in the “Signature Field” Advanced
column, and then enter List of fields (API names), separated by commas to pull
in the query when processing the form. These fields will not be visible
(contrary to the lookupdisplayfields option above), but will be available in
code, for advanced processing.
multistep Checked to create a Step record when the Signature request is created, Requests
Unchecked (default) to remain a single Signature request.
nosignature Checked to allow submitting the form without signing, Unchecked (default) to Requests
require signature.
parentid The Id of the record to be considered the parent of the Signature. Note that Universal
this is not needed if you are launching the Signature from the Parent record.
pdftemplate The name of the Visualforce page to be used as the PDF template that is Universal
populated and then emailed to the contact attached to the Signature record
once the submit button is pressed. Note: The name must be pre-pended with
"c__".
preauthorized Checked to hide the eSignature Agreement prompt, if this is turned on. Universal
Unchecked, it will show the eSignature Agreement popup if it is configured to
do so.
requestedform The name of the form that is being requested; used for differentiating Universal
Signature requests.
requestedpdfname The name that you want the eventual PDF attachment to have. You can hard- Universal
code as well as include fields from the value. For example, for Contact parent
object, where the Last Name was “Smith”, if you used the parameter this way:
“requestedPDFName={!Contact.Name}_Sign2020”, then the resulting PDF
would be called: “Smith_Sign2020.pdf”.
returl URL signer is to be sent to upon completing the Signature Form. Universal
rurl URL signer is to be sent to upon completing the Signature Form. Universal
sdocstype This is useful for s-Docs integration only. Do not use this, if you do not have Advanced
s-Docs installed. The value of this parameter should be the API name of the
parent object. For example: Contact. With this parameter, after the signature
process, you will be re-directed to select an s-Docs template.
showattachmentid Checked to show the PDF in the signature form if the AttachmentID field has Advanced
an ID populated, Unchecked (default) to do nothing.

17
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Parameter Description Type


signaturebox Not yet used. Advanced
submissiontype Special parameter, allowing a user to select one or more ways that signees can Advanced
sign the form. Allowed types are:

Option How the User would Sign…


Regular (Default) User can sign with a mouse or their finger
Typed User can type their name and select a font to use as a signature
None User only checks a box and does not need to sign
Paper User prints out the PDF or Signature Form and physically signs
(a “wet” signature), then scans, and uploads the document –
please note that with this option, the final Status of the
Signature record will be “Uploaded” and needs a Flow or Process
to change it to “Signed” after whatever vetting is deemed
necessary by the business (there is no way to verify that the
document uploaded is actually the required document signed.)
Topaz User signs on a Topaz Signature Pad only (requires device)
templates ID(s) of the Template record to generate for signature, and at the end of the Universal
signature process. Separate multiple IDs with a comma.
twosignatures Checked to display two separate signature pads on the same signature form, Universal
Unchecked (default) to show only 1 signature pad.

* Note: some of the parameters are complicated, and may need some help from our support team. Feel
free to reach out to [email protected] with questions.

18
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Creating a Custom Signature Page for Lightning


Most companies will be able to use the default signature action that comes with the app,
but if you find yourself in need to changing more than just a couple fields, or having
advanced functionality on this signature popup, you can create your own version of the
action that starts right where the standard one ends, and allows you to build onto it as
needed.

O
* Note: A fairly advanced user will be able to follow these instructions
to replicate the standard functionality using a custom action and
Lightning components, but adding new functionality will require a
user with development experience. Contact [email protected] if
you need help in this task. We can answer questions, and if you need
us to develop the page, we offer those services as well. Let us know.

Creating a Signature Experience


Lightning components need parameters to determine how the signature form will behave.
This is done via setting up an Experience. This experience can contain as many
parameters as needed and will generate a unique Experience Id, which you can plug into
a Lightning component in order to specify how that Lightning component should work:

1) In Lightning, go to the Simple Signature app and click on the Configure tab.

2) Click on the Experiences tab and then click the Add an Experience button:

19
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

3) Fill in the Name of the experience, and optionally a Description, and then click
on the Add Parameter button to start with the configuration.

* The Add Advanced Parameter button does the same thing, but only brings
up the advanced parameters, which are rarely used.

4) Continue to add parameters listed on page 16 until you are done. Remember to
press the Save button at the bottom when you have added all necessary parameters:

5) Now copy the “Experience ID” value to be used in a Lightning Component by


pressing the Copy icon.

20
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Creating a Lightning Signature Form


In order to use Simple Signature in Lightning and Mobile, a Lightning component must
be used. This is only available in the Paid version. A generic component can be created
to be used in multiple objects, or a more specific one can be built using an Experience
ID (see the next section) to specify how it should act.

1) To create a new Lightning Component for the signature form, click on at


the top-right of the page and choose Developer Console.

2) In the Developer Console, click File à New à Lightning Component and then
enter a name similar to “Sign_Custom_Object” and create the component.
3) This should take you to a blank, new component, in the “Component” tab. You
want to add the code below, which is called “StandaloneSignatureComponent”
in the “Lightning” tab in our GitHub repository.

GitHub.com Simple Signature Sample Code Repository


https://github.com/ToAFinish/simplesignature

<aura:component implements="force:appHostable,
force:hasRecordId, force:lightningQuickAction" >

… MORE CONTENT HERE …

<signature:SignatureJunction recordId="{!v.recordId}"
ExperienceID="XXXXXXXXXXXXXXX"/>

… MORE CONTENT HERE …

</aura:component>

4) In the sample code above (the real code is in GitHub) you will see a spot to put
the Experience Id from the prior section. Copy the value and paste it into the
code, making sure there are not blank spaces between the quote marks.

5) Now press Ctrl+S to save the component, and close it out if desired.

The Launching from the Parent Object section and the Adding the Signature Button to
a Layout section starting on page 15, explain how to create an Action that will launch this component.

Good luck!

21
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Creating a Lightning Fullscreen Form


The Lightning Component above will work as a popup in Lightning, or as a full-screen
page in Mobile. If you want to have full-screen experience in Lightning, please use the
sample code in the same folder to build the component: Fullscreen_Component.html
and Fullscreen_controller.js will get you started.

Do not hesitate to contact technical support at [email protected] for help with


setting up a full screen signature form if you run into any issues.

Adding the Signature Form to a Lightning Page


In addition to running the Lightning component through an Action, the form can be
embedded into a Lightning page so that it is available for anyone with access to the record
and access to Simple Signature to run. Here are the instructions to do so:

* Note: Before you can add a Signature Form to a Lightning Page, a lookup from the Signature object
must be created, pointing to the current object. See page 14 for instructions on how to set this up.

1) In the “Salesforce Lightning” web version of Salesforce, with Admin permissions.


2) Navigate to any record page of the object where you want a signature. Click on
the icon at the top right corner. Click on Edit Page to go into the Lightning
page editor.

3) You will now be in Lightning App Builder. Determine where you want to put
the signature form. Typically, you would want to add a new tab and give it a
custom name such as “Sign” or “Signature Form.”

4) Drag the SignatureJunction component from the left panel into the new tab.

22
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

5) Now, click on the Lightning Component you just dragged in. You will see a
blank parameter titled Experience ID. Please paste in the value from the
Experience ID that you created starting on page 19.

6) Now Save the page and, if necessary, release it to the users.

7) Click the ß Back button to return to the record where you started. Now you
should see the Signature form on the new tab you created.

23
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Automatic Lead Creation


By default, Signatures are created and then exist in Salesforce independently of other
records. However, in the Paid Version of Simple Signature, it is possible to have a Lead
Created immediately each time somebody signs via the Signature page that was set up in
the previous steps.

O
* Please Note that this same functionality can be achieved, likely a bit better, with
a Flow or a Process Builder entry. This “Create Lead on Save” was
initially created before it was these tools were generally available.

Here are the necessary steps.

1) First, the Lead creation functionality must be turned on. Go to Setup à Apps
à Installed Packages and click on the "Configure" link next to the Simple
Signature app. If the paid version is enabled, you will see the "Configuration
Steps: Options" panel.

2) Turn on the "Create Lead on Save" option, and then press the Save Settings
button.
3) This might be all that is required as long as the only fields you need to be
populated on the Lead are the First and Last name fields, and you have these
fields on the Signature page.
4) However, many companies require other values to be populated for a Lead to be
created. If this is the case, you will need to add those values into the custom
metadata area. Go to Setup à Custom code à Custom MetaData Types and
then click "Manage Records" next to the "Record_Creation" entry.
5) Add or modify the records in this area in order to either set default values for
Lead fields or else copy the values from fields on the Signature page.
6) Test by creating a signature, and then check to see that the Lead was created with
all of the values you set up in step #4.

24
3
Chapter
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Advanced Options (Paid)


Optional setup steps for changing the signature experience

S
imple gathering of signatures is available in the free version, but it must always
include the Simple Signature branding when doing so. Once you upgrade to the
paid offering, you are able to brand the signature form to meet your desired user
experience. Things you can do include:
1) Changing the logo to your own logo.
2) Removing the “Simple Signature” branding (if desired).
3) Advanced coloring and HTML formatting on the page to match company
guidelines.
These things are discussed in various areas when custom Visualforce pages, or Lightning
components are offered. Doing them is fairly easy, once the paid version is in place.
Keep reading for a few more areas that you can change.

eSignature Agreement
Some companies desire the user to agree to using eSignatures before actually signing. If
you want to set that up, go to Setup à Installed Packages à Simple Signature à
Configure and on the “Configuration” tab, you will see the “Form Options.” Turn on
the “Require eSignature Agreement” option.

25
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Advanced Visual Changes


The Lightning signature forms have a blue and green color scheme that is customizable.
This can be changed by going to Setup à Installed Packages à Simple Signature à
Configure and on the “Configuration” tab, you will see the “Form Options”.
You can see the default CSS for each element, and make any changes you want. However,
please keep in mind that this is standard CSS and if you are not careful, it could break
something. So, make small changes, test, and then repeat until you get it just right.

Don’t forget to press the green Save Settings button towards the bottom of the page!

26
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Flow Plugin
A plugin can be used for collecting signatures in a Screen element from within a Screen
Flow. The signature screen can be put anywhere along the line in the process. Use these
steps to set it up:
1) First, you will need to create a few components
in Lightning in order to bring Signatures into Salesforce.
Click on the Gears icon and choose Developer Console.

2) Once in the Dev Console, you need to create


several items by clicking on the File à New à menu item
and selecting a type of element based on the list below.

GitHub.com Simple Signature Sample Code Repository


https://github.com/ToAFinish/simplesignature

3) Go to the GitHub repository above and go into the "flows" folder and for each
item listed below, copy all of the text in the file (without the line numbers). Paste
all of this text into the item you create, and then Save it.

a. Click File à New à Lightning Event, and call it NavigateFlow. Paste


the text in from the NavigateFlow_custom.evt file in GitHub,
overriding anything else in the text area, and then go to File à Save and
wait for it to save.

b. Click File à New à Lightning Component, and call it “FlowFooter”.


Use the FlowFooter_Custom.cmp file to populate the Component
(you will likely need to change the name of the NavigateFlow, depending
on what you called it), and the FlowFooter_CustomController.js file
to populate the Controller. Save.

c. Now, create another component called something like “FlowSignature”


and use the FlowSignature_Custom.cmp file to populate the
Component tab (you will likely need to change the name of the
FlowFooter, depending on what you called it), the
FlowSignature_CustomController.js file for the Controller, and the
FlowSignature_Custom.design file for the Design section. Save.

4) Close out of the Developers Console, and go to Setup à Process Automation à


Flows and click on the Screen Flow where you want to add the Signature process.
If you are making a new flow, make sure to select “Screen Flow” as the flow type,
and we recommend “Freeform” instead of the (currently BETA) Auto-Layout.
5) Once in the Flow, determine where you want to add the Signature. Now, from
the Interaction items in the Elements Toolbox, drag over a Screen element and
position it where you want it in the flow.

27
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

a. Give the new Screen element a Label and API Name like “Sign” and
uncheck the “Show Footer” option, and possibly the “Show Header”
option as well.
b. Now, from the “Custom” group of Components on the left, drag in (or
simply click on) the FlowSignature component you created earlier, right
below the screen header.
c. Click on the new component on the Screen and give it a few things:

i. API Name – this can be whatever you want

ii. Experience ID – this should be a hard-coded Signature


Experience ID that you created back on page 19 in the last
chapter.

iii. Parent ID – this should be a variable from earlier in the flow


that holds the actual Salesforce ID of the record that will be the
parent of the signature.

iv. Style – (optional) you can input CSS code into this area. We
recommend something like this:
width:100%;margin:auto-width:50%;margin:auto

d. Save the Screen component.


6) Test the Flow by saving and then running it. Good luck!

28
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Signature Report
In Lightning, click on the Search Apps and Items icon on the top-left of the page,
and type in Signature Report in the search box. This report allows you to run a
PDF of each signature on a different page. It includes filters to specify the dates and types
of Signatures that should be included in the PDF.

* Please note that this Report PDF is somewhat basic and intended only for backup of
signatures. It is not intended for distribution or client-facing applications.

Multiple Salesforce Orgs


As a general rule, Simple Signature must be configured in each org where you want to
use it. Once you have fully configured a Production Org, any Sandboxes you refresh or
create from Production will be mostly configured, with a few exceptions, defined below.

Sandbox Configuration
If you install Simple Signature into a Sandbox, it must be configured from the beginning,
just like a Production Org. However, if you are working in a new sandbox that has been
refreshed or created from Production, there are only a limited number of things that
must be done, especially if you are using Signature Requests:

1) First, the Site URL for the new sandbox needs to be set. Go to Setup à User
Interface à Sites and Domains à Sites and click on the “Site URL” of the Site
that is used for Signatures. Once this site opens in a new tab, copy the URL to
the clipboard.

2) Now, go to Setup à Installed Packages à Simple Signature à Configure and


click on the Configuration tab, and paste the URL from step #1 into the “Site
URL for Signature Requests” box (make sure to include a slash “/” at the end).
Now press the green Save Settings button.

3) Next, still in the Configure page, click on the Site Access Authorize tab. You
will likely see a notice about remote settings, and also a “Re-Authorize” button.
(You might have to be in Classic mode to do this.) It will prompt you to accept
the rights for the Site access, and also likely require you to re-log into the sandbox
again. Once you do this, you will see the same tab again, with a different access
URL, similar to the screenshot below:

29
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

4) Copy the URL from the “To Enable Site Access” message, and then click on the
link to go to the Remote Site Settings list. Once there, add a new Remote Site
with the URL provided. The “Remote Site Name” can be anything you like, but
the “Remote Site URL” should be exactly the URL provided in the previous
screen. Make it “Active” and Save.

5) If you are using Google Docs, you will also need to re-authorize the Google Docs
integration. Go back to the Configure page (Setup à Installed Packages à
Simple Signature à Configure) and click the Revoke button on the “Google
Account Authorize” tab. When you do, it should open up a popup window,
asking you to log into your Google account again:
a. Select the Google Account you want to log into for Google Docs.

b. Grant the rights it asks for on the next screen.


c. Copy the Authorization Code from the final popup screen and then
paste it into the “Authorization Code” field and press the Submit button.
6) If you are NOT in a Partial or Full Sandbox, and are using Google Docs, you will
also need to create a Template record for each of the documents that you want
to test, unfortunately. It is fairly easy to do so, but you need to go to the “ß
Templates” object in both Production (or wherever your templates are already set
up) and the Sandbox. You can view “All” in Production, and for each one, you
need to do these steps:
a. Click on the Template in production.
b. Copy the “Google Doc ID” value.

c. Go to the Sandbox, and click “New” to create a new Template. Select


“Google Docs” and press Next. Then choose “Create New Template”
and press Next again.

d. On the New Template page, paste in the Google Doc ID and then enter
all the other fields to match what is in Production.

e. Do NOT check the “Copy Template” option. Save.

30
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

f. When the record is created, copy the Salesforce ID for the template.
You can find this in the browser’s URL. It will be an alphanumeric value
either 15 or 18 characters long.

g. Now you need to paste this Template’s Salesforce ID in any place where
you are calling this Signature Request from. Typically, this would either
be an Action, or in a Salesforce Experience.

7) Finally, you will likely need to turn on outgoing email. Go to Setup à Email
à Deliverability, and set the Access Level to “All Email” and Save.

a. Note that this might be dangerous if your sandbox contains data (if it is a Full or Partial
sandbox) because automated processes or user mistakes could send emails to unsuspecting
Contacts or Leads in your sandbox. If this is a likely risk, then we recommend only
turning on this option when you are testing, and only if you know that no automated
processes are going to run and send emails to customers.

Production Deployments
If you install Simple Signature into a Sandbox, and after testing, want to deploy to your
Production Org, there are a few things to consider.
1) You cannot deploy most of the basic settings to Production. These items must
be manually re-configured in Production to match what you have in the Sandbox:

a. App Installation of the Simple Signature app must be done manually in


Production. You can install it from the AppExchange listing (search for
“Simple Signature”) or you can ask the To A Finish support team for a
direct install link.
b. App version. Often you will be on a different app version in a Sandbox
than you are in Production. You can see the version by going to Setup
à Installed Packages and looking for the Simple Signature listing. If the
versions are different, ask the To A Finish support team to push out the
new version to Production, or ask for a link to do it yourself.
c. If using Signature Requests, the Salesforce Site must also be set up in
Production as described beginning on page 34. The “Site Access
Authorize” steps on page 37 must be completed in Production.
d. If using Google Docs integration the “Google Account Authorize” on
page 55 must also be completed in Production.

e. Any settings on the Configuration tab of the Configure page (Setup à


Installed Packages à Simple Signature à Configure) will need to be re-
entered and saved. The only one that must be different is the Site URL
for Signature Requests, if using Signature Requests.

31
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

f. On the Experiences tab in the same Configure page, you can actually use
the “Export” button in a Sandbox, and then the “Import” button in
Production, to bring over the Experiences. However, please note a few
things:

i. The Experience IDs will be different in Production than they


were in the source Sandbox. This means that if you hard-coded
an Experience ID anywhere, you will need to modify it.
ii. Some of the parameters in an Experience use commas, and the
Import does not support this feature. For example:
fieldreadonly, hideblankfields, templates, or the new
submissiontype parameter, all can have a list of field API names,
separated by commas. This means that after an import, careful
review should be made in order to modify any of these
parameters to the correct specifications.
iii. When using the Import feature, you want to select the Fields and
Field Type as shown in the picture below.

g. Finally, you will need to either re-create or deploy via a change set, any
custom fields, pages, Lightning components, actions, or other
customizations that you have created in the Sandbox. To A Finish
technical support can help with this deployment if necessary.
Good luck!

32
4
Chapter
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Signature Requests (Paid)


Steps necessary to set up Salesforce for requesting Signatures

T
he first two usages of Simple Signature, where you sign forms independently in
the free version, and where you can set up Signatures to be tied to a parent object,
are both fairly easy to set up and use. Requesting Signatures from a Contact or
Lead in your Salesforce org is a bit more complicated, and requires several steps
in order to work correctly:
1) Create a Google Doc or Visualforce page to be used in the Signature process. This
will be the PDF that you will want to be the final result of the signature process.
(Covered in the next chapter.)
2) Configure the Salesforce Site to allow external people to sign your forms.
3) Optionally configure a Signature Experience to customize the signature process.
4) Create a way to trigger the request: button, process, etc.
The end result of setting all of this up will be a full-cycle signature request process that
can be used in one or more places at your organization.

33
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

PDF Document Creation


Unless you wish to use the standard PDF that comes with our app, you will need to create
a PDF document either using Visualforce or Google Docs. Please see the next chapter for
this very important, and likely the most complicated step.

Site Setup
This part of the configuration will be complicated if you do not know Salesforce Sites
well. Ask a Salesforce Administrator to help you set it up, if you haven't done it before.
If you need us to help, we can do that. Email us at [email protected]

1) Go to the Setup à User Interface à Sites and Domains à Sites and create a
new Site. If you have not set up your Domain Name it will ask you to do this
before you can create a site.

2) The site you set up can be called anything you like, and the critical items to
consider are as follows:
a. You will need to know the Site URL. You will need this in the next step,
so copy this to a text file for later use.
b. You will need to add these pages (at least) into the Site Visualforce Pages:
i. signature.SiteSignature
ii. signature.TrackEmail
c. In the Public Access Settings, you will need to give this Site user Access
to the following objects:

34
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

i. Read and Create access to the Signature object, as well as all of


the fields that you are using. It is a good idea to initially give it
access to ALL of the fields, and then remove the ones that you
think are not necessary, testing as you go so that you will know
for sure when one of them is needed.
ii. Read access to the Parent object (if you are using one).

iii. Read and Create access to the Step object if you are using multi
step signature requests, along with all the fields you may need.

d. Before you leave the Public Access Settings area where you are updating
the Profile for the Guest user, you want to go to Apex Class Access.
But before you do, you need to make sure you are using the Enhanced
Profile User Interface. If you are not (see below), click on the Setup à
Users à User Management Settings, and make the change:

e. Select the following Apex Classes at a minimum:

i. signature.SignatureController
ii. signature.SignatureControllerMulti
iii. signature.SignatureExt
iv. signature.SignatureHandler
v. signature.SignatureHandlerLwc
vi. signature.SignatureHandlerMultiStep
vii. signature.SignaturePublisher
viii. signature.SignatureTriggerHelper
ix. signature.SignatureTriggerService
x. signature.SiteController
xi. signature.SiteServices
xii. signature.SiteServicesHelper
xiii. signature.SiteSignatureController
xiv. signature.SiteSignFormHandler
xv. signature.SiteSignFormHandlerMultiStep
xvi. signature.TrackEmailController
3) Next, we need to give access to all Signature records, as well as access to the parent
of the Signature, and any other objects we link to in the Signature Form (as in a
formula field, or a lookup field). Go to Setup à Security à Sharing Settings.

35
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

For any object that your signees will access in the Signature process, please do the
following steps:

The reason we need to


do this is because the
Site Guest User should
no longer own records
and they also cannot see
any records that they do
not own, effectively
shutting them out of
seeing any records at all.

a. Scroll down to the object’s Sharing Rules, for example the Signature
object. Note that some objects will not appear on this list if they are child
objects, so you would need to go to the Parent of that object.

b. Click on the New button on the related list (for example on the
“Signature Sharing Rules” list).
c. Give it any rule name and label that you want.

d. Select “Guest user access, based on criteria” for the Select your rule type.

e. For Select which records to be shared set up some criteria that will give
you access to either ALL records, or the records that will be signature
requests.
f. Select the user for the Site you will be using for signature requests under
the Select the users to share with.

g. The Access Level is always going to be Read Only, so simply click the
Save button and wait for a bit until the sharing rules finish running.
Then, go back and repeat these steps for the Parent object, and any other
object that you link to in the Signature Form.

4) Now, with your Site URL in hand, proceed to the next step. Keep in mind that you
might have to come back to this one in order to adjust the security of the site after you test following
the next section.

36
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

App Configuration
Once you have the Google Doc or Visualforce page that you want to use as the default
for PDFs to be generated for signatures, and you have configured a Site to use it on, you
will need to configure the app to use all of this together.

Switch to CLASSIC mode. You will need to be in Classic mode to do these next steps.
Go to Setup à Installed Packages à Simple Signature and click on Configure. If the
paid version is enabled, you will see these sections in the Configuration tab:

1) Click the “Configuration” tab and paste the Site URL into the “Site URL for
Signature Requests” field.

2) Turn on the Process Signature in Batch Mode option.

3) Turn on the Email Requested Signature with PDF Attachment option.

4) We recommend to turn OFF the Process Signatures In Page option.

5) Save Settings at the bottom of the page.

6) Click the “Site Access Authorize” tab and IF you see a message telling you to set
up a Remote Site, then please do so.

7) Click the Authorize button. (For this you must be in CLASSIC or it will give
you an error here.) Accept the permissions and log into Salesforce using the login
of yourself or another user that is specifically given all rights to the Signature and
other objects that are needed for the Signature process. This user must also have
one of the Simple Signature permission sets. Once you log in, it should show
you a “Re-Authorize” button, signifying that you completed it correctly.
On the following page are listed all of the other options related to Signature Requests on
the Configuration tab. Read over them to see if there is anything you need to configure
in order to meet your requirements.

37
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Option Description
Create Lead on Save Creates a Lead linked to the Signatured when the form is signed. See
page 24 for a description.
Run PDF Automation on Save Generates the PDF when the form is signed.
Attach PDF After Signature Attaches the PDF generated to the Signature record.
Attach PDF on Parent Record Attaches the PDF to the parent of the Signature record.
After signature
Attach PDF on Contact If a Contact is linked to the Signature record, but it is not the parent
Record If Not Parent object, this will also put the PDF on the Contact.
Email PDF to Contact After Emails the generated PDF to the Signee.
Signature

* Please note that the three Attach options and the Email option can be overwritten for
any particular Signature.

Option Description
Template Visualforce Page for This is the Visualforce Page to be used by default (if no Google Docs
PDF page or other Visualforce Page are set for the particular signature.)

Please note that if you use a custom Visualforce page, you must prepend “c__” to
the name. So a VF page called HelloPDF would be: c__HelloPDF.
Maximum width (in pixels) for This will set the width of the Signature in the “Signature” field (a
signature field rich-text field) on the Signature record. Only Width OR Height
should be used.

38
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Option Description
Maximum height This will set the height of the Signature in the “Signature” field (a
rich-text field) on the Signature record. Only Width OR Height
should be used.
Site URL for Signature This is the URL for the Site that is created for Signature Requests.
Requests
Use Files instead of Will put the Signature images and the PDF documents in the Files
Attachments (on by Default) related list instead of the Notes & Attachments list.

Please note that if this is checked Salesforce will also copy the files to the
Attachments, so it will appear to be in both lists.

Option Description
Process Signatures in Batch This option is strongly recommended. It turns on the processing of
Mode (On by Default) Signatures in “batch” or asynchronous mode. This means that no
matter how the Signature record is created, it will still be processed.
Email Requested Signature If you are setting up signature requests, this option is recommended
with PDF Attachment (On by as it will attach the PDF generated to the email. If you do not turn
Default) this on, then you should turn on the “Send Email” workflow rules
included in the installation.
Default Signature Request This field can be used to enter one email address that should be used
Send Email as the “From” email when sending a signature request and when
sending the final, signed PDF. Please note:
1) This email must be in the Organization-Wide Email
Addresses and must be validated.
2) If this is not used, then the currently logged in user will send
the Signature Requests and the default Site authorization user
(see page 37) will be the sender of the final PDF.
CC Record Owner When Will copy the Salesforce user who created the Signature Request when
Emailing Signed PDF the final, signed PDF is sent to the Signee.

39
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Option Description
CC Record Owner’s Role Will copy the manager (and manager’s manager, etc.) of the Salesforce
Hierarchy When Emailing user who created the Signature Request when the final, signed PDF is
Signed PDF sent to the Signee.
CC Other Email Address Will copy a hard-coded email address when the final, signed PDF is
When Emailing Signed PDF sent to the Signee.
BCC Record Owner’s Email to If Email to Salesforce is turned on for the user who initiates the
Salesforce When Emailing Signature Request, then this unique email to Salesforce address will be
Signed PDF blind copied on the email that goes to the Signee after they sign.
This will have the effect of logging the email into History.

Option Description
Delete Signatures X Days Old If the SignatureCleanupScheduler Apex class is scheduled to run in
Salesforce, then whatever number is in this field will be used to
calculate the Signature records that should be deleted. The purpose
of these three fields is to clean out signature records that may no
longer be needed, assuming the PDF was attached to the parent
record.
Signature Status to Delete This field should be populated to filter on the Status field. Typically
this field would have “Signed” so that only Signature records that
have been signed would be deleted. But it could also be used to say
“Emailed” so that if signatures are older than X number of days and
have not been processed, then they should be deleted.
Signature Form to Delete This is used to restrict the deletion process to only delete Signature
records where the Requested Form field is equal to this value.

* Please be careful when scheduling this class, as it will delete records that might not be
recoverable. Make sure you know what you are doing before you do this.

To schedule the deletion, first populate these values on the Configure page and save.
Then, go to Setup à Custom Code à Apex Classes and press the “Schedule Apex”
button and for the Apex Class select SignatureCleanupScheduler.

40
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Option Description
Send Email to Partner This should be turned on only if you are working with To A Finish
technical support to enable the Partner option, where the signature requests
are hosted in our Org. This is used in particular with Profession edition.
Partner Email Address This email address will be given to you by To A Finish technical support.

Turn on or off the options according to what is defined below, and fill out any fields that
are necessary. Then click the Save Settings button.

41
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Signature Requests Custom Pages


Some companies will be able to use the default signature page that comes with the app,
but if you find yourself in need to changing more than just a couple fields, or having
advanced functionality on this page, you can create your own version of the page that
starts right where the standard one ends, and allows you to build onto it as needed.

O
* Note: A fairly advanced user will be able to follow these instructions
to replicate the standard functionality using a custom page, but adding
new functionality will require a user with development experience.
Contact [email protected] if you need help in this task. We can
answer questions, and if you need us to develop the page, we offer those
services at our hourly rates.

1) First, you will need to create a new Visualforce page. Go to Setup à Custom
Code à Visualforce Pages and click the "New" button. If the "New" button is
not available, you will need to speak with your Administrator to get additional
rights.
2) Once you see a new bank Visualforce page, fill out the Label and Name fields and
then delete all of the default content that is in the main Visualforce Markup area.
Now you are ready to put the actual code in.

GitHub.com Simple Signature Sample Code Repository


https://github.com/ToAFinish/simplesignature

3) Go to the GitHub repository above and go into the "pages" folder and click on
the "Custom_SiteSignature" entry. Copy all of the text in this page (without the
line numbers), starting with <apex:page and ending with </apex:page>. Paste all
of this text into the Visualforce Markup area in Salesforce and then Save the page.

Congratulations. You've done the hardest part!

4) Next, go back to Setup à Custom Code à Visualforce Pages and find your new
page on the list. Click on the "Security" link next to the name of the new page.
A list of the profiles that can view this page will show up, you want to select all
of them, or at least all of the ones who will use Simple Signature, and give them
access. Save.
5) Finally, you need to set this page as the one to be used by your site. Go to Setup
à User Interface à Sites and Domains à Sites and then Edit your signature
site. In the Active Site Home Page field, type the name of your new Visualforce
page, or use the search feature to find it. Now Save the site and you are done.

Let us know if you need help: [email protected].

42
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Launching the Signature Request


The next thing to do is to set up a button on the parent object of the needed signature,
that will allow you to request it. For example, if you need a signature on a Case, or an
Opportunity or on your own custom object, you would set up the button on this object.
We will use Leads as the parent object in the examples below.
You can create Signature Requests via any other method which can create a Signature
record. Here are a few standard options we recommend:

Actions
For Lightning and Mobile use, the best way to create Signature Requests is via an Action.
Actions are fast and they can be used in offline mode, if configured correctly.

1) Make sure you are in the “Lightning” web version of Salesforce, with Admin
permissions.

2) At the top-right of the page click on Setup à Object Manager à Lead à


Buttons, Links and Actions, and click the New Action button.

3) Select “Create a Record” as the Action Type, select “ß Signature” as the Target
Object, Give it a Name and Label like "Request Signature", and finally set
Success Message to something like “Signature Request Created”.

4) Save the Action, and then you will see a list of “Predefined Field Values.” Press
the New button to add default values for fields. These are the minimum
recommended fields, and they use the Lead object as the example:

Field Name API Name Field Type Value


Attach PDF to Parent? signature__AttachPDFtoParent__c Checkbox TRUE
Attach PDF? signature__AttachPDF__c Checkbox TRUE
Email signature__Email__c Email Lead.Email
Email PDF? signature__EmailPDF__c Checkbox FALSE
First Name signature__Name__c Text Lead.FirstName
Last Name signature__Name_2__c Text Lead.LastName
Status signature__Status__c Picklist Requested

* Other recommended fields are Embed PDF?, Requested Form, Requested PDF Form, Lead
or Contact (if neither of these are the Parent object) and either Templates or PDF Template. For
multi-step signature processes, you would also use the MultiStep field.

5) Go to Setup à Object Manager à Lead à Page Layouts and add it into the
page layouts to allow a user to click on it to request a signature.

43
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Lightning Components
Another option for creating Signature Requests in Lightning and Mobile use is to create
a Lightning component the same way that is described in the Creating a Signature
Experience section on page 19 and in the Launching from the Parent Object on Page
14. A few things to note:
1) Lightning Components do not support offline mode, so this method will not
always work in Salesforce Mobile.
2) The following parameters are used exclusively for signature requests, please review
them on Page 16:

a. Allowrequest turned on enables the requesting of signatures,

b. embedpdf will embed the PDF to be signed immediately above the


signature form - enabling the signee to review it,

c. generateqrcode will generate a QR Code image that will be generated at


the time of the signature request and will display the image of the QR
Code in the popup window, rather than closing the window. This allows
the person requesting the signature to ask a signee to scan the QR Code
in order to be sent to the signature page, and

d. multistep will generate a Step record in addition to the Signature record,


and relies on the admin to set up additional Step records triggered off of
the first one.

44
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Email Template Setup


The final step you will need to take is to configure the two Email Templates that go out
as a part of the Signature Request process. The confirmation email is straight forward
and will not be covered in this implementation guide, but the request email is a bit more
complicated and needs to be discussed.

1) For this step you will need to start in Classic mode.

2) Go to Setup à Communication Templates à Email Templates and open the


Simple Signature folder.
3) Click on the one called "EmailSignature". This is the email that you need to edit.
Once in the email, click on the "Edit HTML Version" button.
4) Update the Subject Line to say what you want it to say, and then update the text
of the email, taking care not to change the button.

Steps 5-9 should be done only if you need to change the URL in the
“Sign Online” button.

5) In Lightning, click on the Search Apps and Items icon on the top-left of the
page, and type in Email Template in the search box. Click “New Email
Template” in order to start a new email template (used only for the step below).

6) Now click on the “Source” button for the HTML Value field. Remove all the
text in this field in preparation for new code.

GitHub.com Simple Signature Sample Code Repository


https://github.com/ToAFinish/simplesignature

7) Go to the GitHub repository above and go into the "email" folder and click on
the "standard.html" entry. Copy all of the text in this page (without the line
numbers), starting with <html… and ending with …</html>. Paste this text into
the HTML Value field in Salesforce and then press the Source button again.

45
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

8) Now select ALL content in that window. Copy or Cut it to the clipboard.

9) Switch back to Classic (you can discard the Email Template in Lightning) and
Go to Setup à Communication Templates à Email Templates and open the
Simple Signature folder.
10) Click on the one called "EmailSignature". This is the email that you need to edit.
Once in the email, click on the "Edit HTML Version" button.
11) Clear out all content from the HTML email, and paste the content from the
previous step, so that you will see the email template now in the Classic Email
Template.

12) Make any other changes you want to the email. This will be what the custom
sees when the signature request button is pressed, so you want them to understand
what you are asking for, and respond accordingly. Please note that an unsigned
version of the PDF you are requesting them to sign will be attached to the email,
so you might want to say something about it.
13) Save the email.

Testing
You are now ready to test the full-cycle functionality. Go to a record of the type you
determined to be the parent of the Signature object, and press the "Request Signature"
button. After a few seconds, the contact connected to that parent object should receive
an email request. When they fill it out, they should then receive the completed PDF, with
the embedded signature.
If you run into any issues, please shoot us an email at [email protected]. We will
be happy to help.

46
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Advanced Features
Following are a few more advanced features which can be used in the Signature Request
process. They are not given step by step instructions as they should be performed by a
Salesforce Administrator with experience in this area. If you run into issues, please reach
out to us and we will be able to help.

Send From Emails


By default, signature Requests will be sent out from the user who creates the request. This
is usually the desired result.
However, when the signer completes the signature request, the signature is processed by
the Authorized user that has been set up, so the email will be sent to the signer from this
user account. This is not necessarily the best experience. There are two ways to get around
this:
1) In the Configure page, you can enter an email address in the “Default
Signature Request Send Email” field. If you do, both the Signature Request,
and the Signature Confirmation (with the final PDF) will come from this
email address. However, you MUST create and verify an Organization-Wide
Email Address that matches the email you enter in this field in order for this
to work.
2) Alternately, you can create Organization-Wide Email Addresses for all of your
users. If you do this, then both the Signature Request and the Signature
Completion emails will come from the user who created the signature
request. However, if an email address is not found for user in the
Organization-Wide Email Addresses, then it will look for the default user in
the Configure page, and if that one does not have an Organization Wide
Email Address, then it will be sent from the Authorized user.

47
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Email SPAM and Other Problems


When Salesforce sends emails from users in the system, it will look like the emails are
potentially SPAM, or worse, unless careful configuration is followed. For example, look
at the following Signature Request email:

Notice that, not only is there a big “Be careful with this message” warning, there is also
an indicator next to the name of the Sender which indicates that this email was sent
through an unrecognized process.
These issues can be resolved via careful configuration of both the Salesforce system and
the email or internet domain. If you have a Salesforce Partner who can do this for you,
please ask them to configure your Salesforce system so that it is fully authorized to send
email on your behalf. If you do not have a Salesforce Partner who can help you, we do
offer services to do this as well. If so, reach out to us at [email protected].

Multiple Step Signatures


Simple Signature is most often used for one individual to sign a document or agreement.
However, with a little configuration it can be used to set up a complex, multi-step
Signature process using the Step object and Process Builder or a Flow.
1) To get started with Multiple Steps, please first create the Signature Request as
explained on page 43. The only change is that the MultiStep option needs to be
turned on.
a. For Signature Requests created by an Action or an automated method,
simply populate the signature__MultipleSteps__c to TRUE.
b. For Signature Requests created using an Experience ID, the “multistep”
parameter must be checked.
2) When this “MultiStep” option is on, there are two significant differences that
happen immediately:

48
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

a. A new “Step” record, the child of the Signature record will be


automatically created when the Signature record is created. This new
record will be the foundation of the signature process, so that only when
all Step records are signed, will the signature process be finalized.

b. The email template that is sent for Signature Requests with multiple steps
is different from the regular one. By default, the “ESignMutliContact”
Classic Email Template is used for Signature Requests with multiple
steps, instead of the regular “EmailSignature” one.
3) Adding additional required signatures is easy. Simply create new Step records
when the first one is created. You can use a Process in Process Builder, or a Flow
to do it, based on the Step record being created with the “Order” field having a
“1” value. The Step record with the Order = 1 field will be the first step, which
is created automatically. Other fields to populate in the new step records are:
a. First Name = The first name of the signee. Often used in the email
template.
b. Last Name = The last name of the signee
c. Email = The email address the Signature Request should be sent to
d. Order = 2, 3, 4, etc. (numerical value, setting the order you want the
signature requests to be emailed)
e. Email Template = Unique name of Classic Email Template (if different
from the ESignMultiContact default template)
f. Status = “Requested”
g. Wait On Prior Step (Set to TRUE so that this signature request is only
emailed once the prior one – order is defined by the Order field – is
Signed. Set to FALSE if you want it to be sent at the same time as the
prior one.)
4) When all Steps have been signed, the Signature record Status field will be set to
“Signed” as well, which triggers the final PDF being generated. The remaining
task is to bring the Signature information from the Steps into the main Signature
object so that we can display them in the PDF. Now, this step is not mandatory,
as you may not need all signatures on the final PDF, or if your PDF is generated
using Visualforce, you might be able to build an Apex class that pulls the
signature images in from the Step records themselves. For those not so lucky,
here are the steps to do either in a Flow or using Process Builder:
a. For each Step, create a Signature Image Rich Text field in the Signature
object. You might want to also create a Signature Date and Signature
Name field for each Step as well.
b. Using a Flow or Process Builder, create an action on the Step object that
will copy the following fields, based on the Order field. The automated
Step that is created with an Order value of 1, will copy the Date and

49
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Signature image to the Signature record, but you must do it for any Step
with an Order value of 2 or 3 or greater. Here are the fields to copy (the
field names are just examples) in the case where signature__Order__c =
2 and signature__Status__c = “Signed”:

Target Target Field Source Source Fields


Object Object
Signature SignatureImage2__c Step signature__SignatureImage__c
Signature SignatureDate2__c Step signature__Signed__c
Signature SignatureName2__c Step signature__Firstname__c & “ “ & signature__LastName__c

If using Process Builder for both processes, it might look something like this:

5) That is all that needs to be done to implement a robust multiple signature


solution. You are ready to test it out!

50
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Signature Security
Electronic Signatures have a degree of potential questioning that hard-copy, paper
document signatures do not have. How do you determine if the person you intend to
sign is actually the person who signed? Well, with Simple Signature you have a few things
that will help:
1) You can set a password that must be typed in before the signee can see the
signature form. You can do this by simply filling in the Signature Password
field using a process or another automated measure. This will ensure that only
the signer will be able to sign, even if someone unauthorized has access to the
emailed signature request.
2) You can set an expiration for the signature, so that if the intended signee does
not sign withing a set number of days, then the signature request is no longer
valid. You do this by populating the Expiration Date field with a date in the
future.

3) During the Signature process the Digital Fingerprint field is populated with a
32-character string, which is supposed to be unique for each device. In this way,
you can determine if signatures are signed on the same device or not.

4) The IP Address of the signee is saved in the Actual Signed IP field, and a
secondary field called Actual Signed IP Info attempts to collect information
about the location of the IP address of the signee. If the Info field does not work,
you can also create a formula field that contains a link to the IP address
information. Use this code to create the formula:

if ( not ( isblank ( signature__IPWhenSigned__c ) ), signature__IPWhenSigned__c & " " &


HYPERLINK("https://ipapi.co/"+signature__IPWhenSigned__c+"/json/", "info","_blank"), "" )

5) The Actual Signed Location field will contain the Latitude and Longitude of
the signee at the time of signature. This data is dependent upon the signee’s
device providing the location. You can also create a formula field with a link to
map this location. Use the following code in the formula:

if ( not ( isblank ( signature__ActualSignedLocation__Latitude__s ) ),


text( signature__ActualSignedLocation__Latitude__s )+" "+text(
signature__ActualSignedLocation__Longitude__s ) + " " +
HYPERLINK("http://www.google.com/maps/place/"+text(
signature__ActualSignedLocation__Latitude__s )+","+text(
signature__ActualSignedLocation__Longitude__s ), "map","_blank"), "" )

51
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

6) One more formula which might be of use when determining if a signature is


valid can be seen below. It calculates the number of Days, Hours and Minutes
between when the Signature Request was emailed for signature, and when the
Signature was actually completed. A blank or problematic value indicates a need
for further review:

if( if( isblank ( signature__ActualSignedTimestamp__c ), Now(),


signature__ActualSignedTimestamp__c ) - if ( isblank ( signature__Emailed__c ),
CreatedDate, signature__Emailed__c ) > 0 , "D:"

& TEXT( FLOOR( if ( isblank ( signature__ActualSignedTimestamp__c ), Now(),


signature__ActualSignedTimestamp__c ) - if ( isblank ( signature__Emailed__c ),
CreatedDate, signature__Emailed__c ) ) ) & " H:"

& RIGHT( "0" & TEXT( FLOOR( MOD( ( if ( isblank ( signature__ActualSignedTimestamp__c ),


Now(), signature__ActualSignedTimestamp__c ) - if ( isblank ( signature__Emailed__c ),
CreatedDate, signature__Emailed__c ) ) * 24, 24 ) ) ),2) & " M:"

& RIGHT( "0" & TEXT( ROUND( MOD( ( if ( isblank ( signature__ActualSignedTimestamp__c ),


Now(), signature__ActualSignedTimestamp__c ) - if ( isblank ( signature__Emailed__c ),
CreatedDate, signature__Emailed__c ) ) * 24 * 60, 60 ), 0 ) ),2), "")

* This formula can also be tweaked to only pull the number of days, or hours, for example,
so that you can then set a limit on signing if more than a predefined period of time has elapsed
since the emailed request for signature.

All of these measures are useful for ensuring the correct person signs the requested
document, though they cannot ever guarantee it.

User Counter-Signature
Simple Signature allows users to store a signature to be used as a counter signature, which
is applied automatically after the signee completes a signature process. In order to set
this up, you first need to configure a few things.

1) Make sure you are in Lightning with Admin rights. Click on the Search
Apps and Items icon on the top-left of the page, and type in Files in the
search box. Click on Files when it comes up.

2) Click on the Libraries link on the left list of folders, and once you see the
Libraries, click the New Library button (assuming Simple Signature is not one
of your library options.). Enter “Simple Signature” as the name, and Save.

3) Click into this new Simple Signature library and press the Manage Members
button. Using this popup, add as many users to this library as may need to have
counter signatures. If it is a lot of users, you might want to consider adding them
from a public group.

52
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

4) Once all are added, each user who wants a Counter Signature should go to the
Search Apps and Items icon and this time search for User Signature.

5) After each user who needs a counter signature has signed, then you will need to
add the counter signature code to the Visualforce PDF or the Google Doc. For
the Google Doc, see the example in the Merge Codes for Google Docs in the next
chapter.

* Please note that the "Access Libraries" right is needed for Community users to use the
"User Signature" functionality. This right is typically not on by default, so you will need
to set it up before Community users can use this feature.

Congratulations on setting up the Signature Request process, now on to the hardest part,
generating a custom PDF document for signature!

53
5
Chapter
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Document Generation (Paid)


How to set up Simple Signature to work with custom documents, either
through Google Docs, Visualforce code, or an external app…

S
imple Signature is intended to be, well, simple. The toughest part might the
creation of the PDF documents where the final signature is supposed to go. For
most companies, the included Google Docs integration is the simplest and fastest
way to build these documents on their own. And for those geeks who love to code,
creating Visualforce pages might be simple, and even fun. If neither of those options
works, we have three other options:

v To A Finish, the creator of Simple Signature, offers a service to create Google Docs
or Visualforce documents for your organization. Depending on how complicated
your document is, they might typically cost a few hundred dollars to build. Contact
[email protected] to explore this option in more detail. These documents can look
exactly like you want them, and once they are built, there is no cost to use them.
Additionally, you also have several apps that work nicely with Simple Signature and
provide document generation:
v COOLDOX is a Microsoft Word Add-in developed to help Salesforce user in creating impressive, rich-
text documents like Sales proposals (Quotes), Customer contracts/agreements, and other documents.

v S-Docs is a Salesforce add-on that generates quotes, contracts, invoices, reports and any other document
directly on Salesforce. S-Docs does have its own signature component now, though it is a lot more
expensive than Simple Signature. S-Docs also does not have in-person signatures.

v CongaComposer is a document generation app which also now includes a signature plugin. For that
reason, this app is also not typically used with Simple Signature. Much higher cost, and lack of in-
person signatures would again be the main reason to go with Simple Signature if you already have
CongaComposer.

v Nintex Drawloop is another document generation app which can be integrated with. Please contact
support for help doing so.

54
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Google Docs PDF Document Creation


Simple Signature comes with a very powerful document generation engine which employs
Google Docs, an online word processor accessible to almost everyone. It will even work
with the free version of Google Docs.
To create a new Template in Google Docs, first you will need to configure Simple
Signature in order to connect to your Google account:

1) Switch to CLASSIC mode. You will need to be in Classic mode to do these next
steps. Once in Classic, go to Setup à Installed Packages à Simple Signature à
Configure.
a. Click the “Google Account Authorize” tab and IF you see a message
telling you to set up several Remote Sites, then please do so.

b. Click the Authorize button. (For this you must be in CLASSIC or it


will give you an error here.) Accept the permissions and log into your
selected Google account. Once you log in, it will give you a code to past
into the tab, and after doing this, it should show you a Revoke button,
signifying that you completed it correctly.
After setting up Google Docs, you can now create as many Templates to be used with
Simple Signature as needed.

2) Switch back to Lightning mode. Click on the Search apps and items
icon, and search for Templates. Click on Templates and then you will see
the option to create a New template.

3) Select Google Docs, and press Next. As this is your first template, select Create
New Template and press Next.

4) On the New Template page, enter the fields as shown below and press the Save
button.

55
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

a. Enter anything you want in the Name field. The Name is not used for
anything programmatic, so you can truly call it what you want.
b. IF you have an existing Google Docs document that you want to use as
the starting point for this one, then paste in the Google Id for the
document (taken from the URL when editing it) and click the Copy
Template checkbox. For your first one, just leave these fields blank.

c. In the Object Name field, select “Signature” as the object. If you want
to create other types of documents that are not intended to be signed, you
can select a different object.

d. In the first Permission Type field choose “Anyone with link” to allow
other uses in your Salesforce instance to use this document as a Template
for Simple Signature. The other options provide more specific access:
User, Anyone in this group, and Anyone in this Domain.

e. In the second Permission Type field, choose “writer” so that other


Salesforce users can edit this document. If you do not want anyone to
edit except for you, then choose a different option.

5) Once the template is created, click the Edit Google Doc button, and you will be
taken to the Google Docs page.

* Please Note that Simple Signature does not


support merging with documents in other
formats, like Microsoft Word. Google Docs
nicely supports these documents, but we cannot
use them in Simple Signature. In Google Docs,
go to File à Save as Google Docs to convert it.

56
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

6) You can edit the document as necessary, paste in text, build tables and add graphics
or whatever you need. To add in Salesforce data, use the Show Fields button.
This will open a panel allowing you to browse to specific fields, or related lists.
When you select one of these fields, you can copy a “Merge Code” that you can
then manually paste into the document. The next section specifies many different
merge code options.

Example Merge Codes


The following examples are given to show the versatility of the merge code options. In
order to best use these samples, start with pasting the merge code into the document using
the Show Fields tab, but then add options and filters to them as necessary.

• Signature Image, No Filter

<ß>signature__Signature__c-300</ß>

• Signature Image, Filter: When Status = Signed

<ß>signature__Signature__c-
300%<signature__Signature__c><signature__Status__c><Signed></ß>

• Normal User Counter-Signature, No Filter

<ß>User.LibrarySignature-300</ß>

• 5 Days After Today in the USA, No Filter

<ß>system.today<day#5><en-US></ß>

57
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

• 5 Days Before Today In India, No Filter

<ß>system.today<day-5><hi-IN></ß>

• The Signature Date In India, No Filter

<ß>signature__Date__c-<hi-IN></ß>

• The Signature Date In USA, No Filter

<ß>signature__Date__c-<en-US></ß>

• 6 Days After Now In USA, No Filter

<ß>system.now<day#6><en-US></ß>

• 6 Days After Now In India, Timestamp, Filter: Firstname = “Testing”

<ß>system.now<day#6><hi-
IN>%<signature__Signature__c><signature__Name__c><Testing></ß>

• Signature Date in USA, Filter: Firstname = “Testing”

<ß>signature__Date__c-<en-
US>%<signature__Signature__c><signature__Name__c><Testing></ß>

• Signature Date in USA, Filter: User Is Active = TRUE

<ß>signature__Date__c-<en-US>%<User><IsActive><true></ß>

• User Counter Signature, Filter: Status = “Signed”

<ß>User.LibrarySignature-
300%<signature__Signature__c><signature__Status__c><Signed></ß>

• Custom User Rich Text Field, Filter: User Is Active = TRUE

<ß>User.User_Signature__c-300%<User><IsActive><true></ß>

• Signature Image Field with SIZE, Filter: Firstname = “Smith”

<ß>signature__Signature__c-
250%<signature__Signature__c><signature__Name__c><Smith></ß>

• Signature Image Field Proper Filter User Filter Right Value

<ß>signature__Signature__c-250%<User><IsActive><true></ß>

58
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Visualforce PDF Document Creation


If you do not want to use Google Docs, are not using a Document Generation app, and
simply prefer using your own document in order to achieve your desired result, use this
section to get started building your own document in Salesforce.
The first thing to do is to set up a Visualforce page that will be used as the PDF where
the final signature will be merged onto. This Visualforce page will usually be formatted
in a particular way, with the logo and other information of your company. This is the
most difficult part of the process and it cannot really be explained in a step-by-step
tutorial. If you do not already know how to create Visualforce pages, then you must
either ask someone internally to do it, or you can contact us at [email protected]
in order to do it for you. We offer hourly services for this type of work.
To get you started, you can use some of the sample Visualforce PDF pages that are
included in our GitHub Repository.

GitHub.com Simple Signature Sample Code Repository


https://github.com/ToAFinish/simplesignature

Following is a list of the PDF Visualforce page templates currently in the “pages” folder.

File Description
CustomEmbeddedSignature This page is to be used instead of the Visualforce page that is
embedded in the Signature object page layout.
CustomSignature Prior version of the Signature page to be used inside of
Salesforce, for In-Person signatures.
CustomSignature_Lightning Signature page to be used inside of Salesforce for In-Person
signatures.
Custom_SiteSignature Signature page to be used for completing Signature Requests in
a Salesforce Site.
SampleAgreementPDF Simple PDF document laid out like a legal document such as
an NDA.
SampleOpportunityPDF * Slightly complicated PDF which functions as a "quote" from
the Opportunity object, including the Opportunity Product
lines. *
SampleOpportunityPDF_noController Version of the Opportunity quote PDF which does not use a
controller.
SamplePDF Prior version of the PDF included in the app.
SamplePDF_v2 Copy of the current signature__BasicSignaturePDF that is
included with the app. Allows you to update it, change the
logo, etc.
SampleQuotePDF * Slightly complicated PDF which functions as a "quote" from
the Quote object, including the Quote Item lines. *

59
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

* If you are using Opportunities or Quotes as the parent object, we provide sample Visualforce pages you can
use as a starter. Use these instructions to build it in a Sandbox or Dev org. You will likely not be able to
do it directly in Production, but rather, you need to do it in a Sandbox and then deploy it to Production.

1) First you will need to add a static resource to your org that allows the signature
process. Go to Setup à Custom Code à Static Resources and press the "New"
button. Call the Static Resource "sampleinvoice", change the Cache Control to
"Public" and then select a file called SampleInvoice.zip which you will need to
download from the "resources" folder in our GitHub repository.

2) Next, create controller for your Visualforce page. Go to Setup à Custom Code
à Apex Classes and press the "New" button. Note that this will only work inside
of a Sandbox or Development org. You will not be able to do it directly in
Production, so if you do not see a "New" button, that is probably the reason.
3) Go back to the GitHub repository, in the "classes" folder, and open the
SampleOpportunityPDFController or SampleQuotePDFController file and
copy all of the contents, without the line numbers. Paste all of it into the Apex
Class Salesforce window and Save.

• You should also copy the matching “Test” file as another Apex Class if you
intend to deploy it into production.

4) Finally, you will now need to create a new Visualforce page. Go to Setup à
Custom Code à Visualforce Pages and click the "New" button.
5) Once you see a new bank Visualforce page, fill out the Label and Name fields and
then delete all of the default content that is in the main Visualforce Markup area.
Now you are ready to put the actual code in.
6) Go back to the GitHub repository and this time go into the "pages" folder and
click on the SampleOpportunityPDF or SampleQuotePDF entry. Copy all of
the text in this page (without the line numbers), starting with <apex:page and
ending with </apex:page>. Paste all of this text into the Visualforce Markup area
in Salesforce and then Save the page.

7) First, go back to Setup à Custom Code à Visualforce Pages and find your new
page on the list. Click on the "Security" link next to the name of the new page.
A list of the profiles that can view this page will show up, you want to select all
of them, or at least all of the ones who will use Simple Signature, and give them
access. Save.
Once you are finished creating the page, you will need to assign it as the one to use in
your Org. To set the default, use the pdftemplate parameter as described on page 17.
Many of the settings in that section involve Signature Requests, and in particular you will
need to set the PDF Visualforce page you just created in this area.

60
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Integration with other Document Generators


If you have a document generation app, like Salesforce CPQ s-Docs, COOLDOX, Conga
Composer or Drawloop, a few steps are key to using Simple Signature with your
document templates.
1) If you are generating a document that can only pull values from a single object,
then you need to set up a process that will copy the Signature information from
the Signature object into a field in this object.

a. First, we need to create those fields: go to the object you will be using to
generate documents from. Go to Setup à Object Manager and click on
the object name. Now create the following fields:

Field API Name Field Type


Signature Image SignatureImage__c Rich Text Area(32768)
Signed Signed__c Checkbox

b. Go to the Signature object (Setup à Object Managerà Signature) and


create a lookup field to the parent object (the object in step #1.) You can
call it what you want. But do not duplicate lookup fields.

2) After you have created the fields, then also create a Process Builder entry that
will watch the Signature object for any record that is changed to “Signed” Status,
and then copy the signature__Signature__c field, and perhaps others like
signature__Date__c as well, so that the other objects will have a copy of the
signature information in order to merge these fields into the document.
3) Next, update the template in your document generator where you want to include
a signature, and drop in the Signature image field you created. This field will be
blank if it hasn't been signed yet.

Once you have this set up, the following steps need to be performed by
someone who is very familiar with the document generation app you are using:

4) The first thing that needs to be done is to create a trigger that will take a generated
document and create a Signature Request for it. To get you started, you can use
a sample code that is included in our GitHub Repository, in the “triggers” folder.
We have CreateSignatureOnAttachments and CreateSignatureOnFile. Both
of these assume that the parent object is called Quote__c, so you will need to
change that, at least.

GitHub.com Simple Signature Sample Code Repository


https://github.com/ToAFinish/simplesignature

61
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

5) Now, when you generate the document as you typically would from your
document generation app, this trigger should create a Signature record as a
Signature Request, so that an email is sent with the document to be signed. If
everything is configured correctly, then the signature request will go out via email.

6) After the signature request is processed and the Signature record is now Signed,
you will need to re-generate the document using whatever tools are provided for
automatically generating documents by your selected document generation app.
Sometimes this will need to be done via an Apex trigger, other times it might be
accomplished through a Flow or a Process. Whatever triggers the re-generation,
this time the document should have the Signature image in it.
Let us know if you have any questions when going through this section. It can be
difficult, especially for the less-technical among us. If you need help, reach out to us at
[email protected] and we will be happy to help.
That's it. You are ready to test Simple Signature with your document generator.

62
S I M P L E S I G N A T U R E F O R S A L E S F O R C E

Feedback and Support Access

Please send us your feedback to [email protected], and don't hesitate to email if


you have questions about these instructions. When you do, you might want to give us
support access, as shown in the screenshot below, so that we can log in as you to see the
problem.

Rating Simple Signature


We greatly enjoy being able to provide users with and app they will find useful. So, if you
like the app, please leave us a positive review on the AppExchange:
https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000DqCoUUAV

But if you run into issues, please don't leave them there for the world to see (unless
we can’t get it resolved). Rather, contact us at [email protected] and we'll
work together to make this app To A FinishTM.
Thank you!

The To A FinishTM team.

63

You might also like