implementation - amazon s3 › simplesignature › taf... · 2020-03-10 · in html or flex). more...

48
IMPLEMENTATION GUIDE

Upload: others

Post on 29-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

IMPLEMENTATION GUIDE

Page 2: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Implementation Guide

© 2016-2020 To A Finish LLC 12407 MoPac Expwy N • Suite 250

Austin, TX 78758 Phone 512.436.3464 • Fax 267.935.7773

Page 3: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

Table of Contents

Introduction to this Implementation Guide ____________________________ 3

Introducing Salesforce.com ______________________________________________ 4

Introducing To A Finish _________________________________________________ 5

Introducing Simple Signature ____________________________________________ 6 Free vs. Paid App Comparison _________________________________________________ 6

Before You Begin, Requirements _________________________________________ 7

Constant Development – What it Means ___________________________________ 7

Please, Please, Please … Review us! _______________________________________ 7

Basic Configuration _______________________________________________ 8

Adding Signature Form to Salesforce Mobile ________________________________ 9

Modifying the Signature Form __________________________________________ 10

Adding Fields to the Signature Form ______________________________________ 12 Connecting to a Parent Object ________________________________________________ 12

Launching a Signature Experience ________________________________________ 12 Launching from the Parent Object (Lightning) ____________________________________ 13 Launching from the Parent Object (Visualforce) __________________________________ 14 Launching from the Signature Related List (Visualforce) ____________________________ 15 Adding the Signature Button to the Layout ______________________________________ 16 Advanced Parameters _______________________________________________________ 17

Using a Custom Signature Form _________________________________________ 19 Visualforce Page for Classic or Salesforce Sites ___________________________________ 19

Automatic Lead Creation _______________________________________________ 21

Creating a Signature Experience _________________________________________ 22

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

Creating a Lightning Signature Form ______________________________________ 24

Adding the Signature Form to a Lightning Page _____________________________ 25

Page 4: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

Configuring Signature Requests ____________________________________ 27

PDF Form Creation ____________________________________________________ 28

Defaults Configuration _________________________________________________ 30

Signature Requests Creation ____________________________________________ 32 Custom Action Creating Record _______________________________________________ 32 Custom Button Calling a Visualforce Page (Classic) ________________________________ 34 Custom List Button Calling a Visualforce Page ____________________________________ 35

Site Setup ___________________________________________________________ 37

Email Template Setup _________________________________________________ 38

Testing _____________________________________________________________ 39

Document Generation (Visualforce, s-Docs, or CoolDox, Conga, etc.) _______ 40

App Configuration ____________________________________________________ 41

Set Up Signature Fields ________________________________________________ 42

Code to Make it All Work ______________________________________________ 42

s-Docs, CoolDox, Conga Template Setup __________________________________ 45 No Document Generator? Use Visualforce! _____________________________________ 45

Feedback and Remote Access ___________________________________________ 46

Rating Simple Signature ________________________________________________ 46

Version 2020.03.09

Page 5: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Introduction to this Implementation

Guide

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

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 close attention to all of the information contained in this manual. We recommend reading through this first chapter before you begin, and then reading through each section as you work on it.

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.

Chapter

1

T

I C O N K E Y

Details You Can Skip

Don’t Miss This!

Sample Code

Danger!

Page 6: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Introducing Salesforce.com Salesforce.com's CRM solution is broken down into several broad categories: Sales Cloud, Service Cloud, Data Cloud, Collaboration Cloud, Custom Cloud (including Force.com) and more. Below, we’ll highlight a few of them.

The Sales Cloud includes a real-time sales collaborative

tool called Chatter, provides sales representatives with a customer profile and account history, allows the user to manage marketing campaign spending and performance across a variety of channels from a single application, tracks opportunity-related data including milestones, decision makers, customer communications, and other information unique to the company's sales process. Automatic email reminders can be scheduled to keep teams up to date.

Other activities on the Salesforce cloud include using the Jigsaw business data to access business contacts, and designing and automating processes in Salesforce CRM.

The Service Cloud provides companies with a call center-like view that enables them to create and track cases coming in, and

automatically route and escalate what’s important. The Salesforce CRM-powered customer portal provides customers the ability to track their own cases, includes a social networking plug-in that enables the user to join the conversation about their company on social networking websites, provides analytical tools and other services including email, chat, Google search, and access to customers' entitlement and contracts.

Salesforce.com's platform as a service (PaaS) product is known as Force.com. The Force.com platform allows external developers to create add-on applications that integrate into the main

salesforce.com application and are hosted on Salesforce.com's infrastructure.

These applications are historically built using Apex (a proprietary Java-like programming language for Force.com) and Visualforce (an XML-like syntax for building user interfaces in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement for older technologies.

In addition to the web interface, salesforce.com offers a SOAP/REST Web service API that enables integration with other

systems.

You can continue reading more on Salesforce.com at WikiPedia.com.

The Sales Cloud

The Service Cloud

The Force.com

Platform

Web Services

Page 7: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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

Page 8: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Introducing Simple Signature Introducing a simple solution to capture signatures on the Force.com 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.

Simple Signature is not intended to replace other document generation apps for Salesforce, but rather as 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 usage in Lightning, Mobile, and Classic ✔ ✔

Technical Support ✔

Field changes on the Signature Form Limited ✔

Custom/Multiple Signature Forms ✔

Link to Parent Object Limited ✔

Document Generation with 3rd Party Apps * ✔

Signature Request Tracking ✔

Completion PDF Generation Attachments & Emails ✔

Reports & Dashboards ✔

Automated Lead Creation ✔

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

Keep it Simple. Get it done.

Page 9: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Before You Begin, Requirements 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 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.

Sales Cloud

Service Cloud

Custom Cloud (Force.com)

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

Please, Please, 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.

Salesforce.com

Page 10: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Basic Configuration

The steps necessary to set up the app for full use

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.

Chapter

2

T

Page 11: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Adding Signature Form to Salesforce Mobile The first thing you will 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 web version of Salesforce to continue configuring.

Page 12: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Modifying the Signature Form The next thing you need to do before beginning to use it is change what the form says in order to make it yours.

1) Make sure you are in the Lightning experience web 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 button.

* Note: If you do not see the “Translations” area shown in the screenshot above, go to Setup Quick

find Box Translation Workbench Translation Settings and turn it on. You should choose “English” or the native language of the users who will be using the form.

Page 13: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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, if not you can add text in the Long Legal Text 2 item. 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, or add custom fields to 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.

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.

Page 14: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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 Experience In Salesforce we currently have several different technologies at play, all of which are supported in most cases in Simple Signature:

1) Lightning (which works with Lightning and Mobile),

2) Lightning Web (which also works with Lightning and Mobile), and

3) Visualforce (which works with Lightning, Classic and Mobile).

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.

Page 15: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Launching from the Parent Object (Lightning)

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 “Salesforce Lightning” web 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, follow the instructions in the Creating a Signature Experience section on page 24. Then, follow the instructions in the Creating a Lightning Signature Form on page 26.

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.

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, 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) Skip to page 18 for help adding the new button to your page layout.

Page 16: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Launching from the Parent Object (Visualforce)

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 Classic. It can be used in Mobile somewhat, but for various reasons we recommend going to the Lightning version(s) in the next section.

1) Make sure you are in the “Salesforce Lightning” web 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) Again at the top-right of the page click on Setup Object Manager and then click on the Parent Object.

5) Now click on the Buttons, Links and Actions section, and click on the New Button or Link button.

6) Enter “Sign” for the Label and select Detail Page Button as the Display Type.

7) For the Behavior you can select “Display in existing window without sidebar or header, and for the Content Source, choose URL.

8) Now, for the actual URL, you must customize it depending on the parent object that you selected. If you are using Contacts, then the URL would be this:

/apex/signature__Signature ?parentid={!Contact.Id} &backtoparent=1

9) Save the Button. Skip to page 18 for help adding it to your page layout.

Parameter Description

parentid This will link the new Signature with a parent record of any type. For example, for the Contact object, you would use the standard {!Contact.Id} formula field notation.

backtoparent 1 to take the user back to the parent record after the signature process completes, 0 (default) to leave the user on the newly created Signature record.

Page 17: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Launching from the Signature Related List (Visualforce)

Instructions to set up a “New Signature” button on the Signatures related list (not available as a Lightning Action) for the Contact as an example, are below:

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

2) At the top of the page click on Setup Object Manager, then click 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 click on the Buttons, Links and Actions section, and click on the New Button or Link button.

5) Enter “New Signature” for the Label and then select List Button as the Display Type (and unselect the Display Checkboxes option).

6) For the Behavior you can select “Display in existing window without sidebar or header, and for the Content Source, choose URL. Something like this:

7) Now, for the actual URL, you must customize it depending on the parent object that you selected. If you are using Contacts, then the URL would be this:

/apex/signature__Signature ?parentid={!Contact.Id} &backtoparent=1

8) Save the Button. Instructions on adding it to the layout are on page 18.

Page 18: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Adding the Signature Button to the Layout

Instructions to set up signature buttons are in the previous pages. This section shows you how to add them to the page 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) To add a button to the top of the page, you need to add it either in the Salesforce Mobile and Lightning Experience Actions (for Lightning and Mobile) and/or in the Custom Buttons (for Classic). See screenshots for both below.

3) Finally, if you chose to set up the button in the Signature object itself (instead of the Parent object) then you must add the button to the Signature related list on the parent object.

a. In “Related Lists” - drag down the Signatures related list onto the layout.

b. Edit the Signature related list to remove the standard “New” button and add the new button you just created.

4) Save the Layout and test it out. Keep in mind that you might have to edit multiple layouts if different Users are seeing profile-specific layouts.

You are done! Happy Signing!

Page 19: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Advanced Parameters

The Paid Version of Simple Signature supports several other parameters to provide additional functionality. Following is a list of parameters available in the paid version as shown in the sample URL in the above example:

Parameter Description

pdftemplate The name of the Visualforce page to be used as the PDF template that is 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__".

emailpdf 1 to email the PDF generated to the contact attached, 0 (default) to do nothing.

attachpdf 1 to attach the PDF generated to the Signature record, 0 (default) to do nothing.

attachpdftoparent 1 to attach the PDF generated to the Parent record, 0 (default) to do nothing.

requestedform The name of the form that is being requested; used for differentiating Signature requests.

requestedpdfname The name that you want the eventual PDF attachment to have. You can hard-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”.

contactField If your parent object is not the Contact record, but you still want to attach a 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.

sdocstype This is useful for s-Docs integration only. Do not use this, if you do not have 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.

defaultvalue_XXX The “defaultvalue_” parameter is dynamic, the parameter name always starts the same, but then must use a name of a formula field in the Signature object. For example: defaultvalue_InspectionDate__c or defaultvalue_CustomerContact__c. More on using this to achieve read-only values on the Signature form in the next section.

Page 20: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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

There are two different ways of using these parameters:

1) These parameters can be added via a Signature Experience as shown on page 24 and then referencing the Experience ID in a Lightning Component or directly as a parameter on a URL button.

2) The parameters can all be added directly in a URL button. This works best in Classic, and is not recommended for Mobile or Lightning. For example, a button specifying a particular PDF, default values, and several other things, could have a URL button with code similar to this:

/apex/signature__Signature ?parentid={!Contact.Id} &backtoparent=1 &pdftemplate=c__MyVFPage &emailpdf=1 &attachpdftoparent=1 &attachpdf=0 &requestedPDFName={!Contact.Name}_SignOff2020 &defaultvalue_Phone__c={!Contact.MobilePhone} &defaultvalue_Email__c={!Contact.Email} &contactField=Customer_Contact__c &requestedform=My Form Name

Page 21: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Using a Custom Signature Form Most 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.

* 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 as well. Let us know.

Visualforce Page for Classic or Salesforce Sites

Outside of Mobile and Lightning, or even in Lightning in some cases, a Visualforce page can be used to change the visuals when signing a form.

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.

3) Go to the GitHub repository and go into the "pages" folder and click on the "CustomSignature" 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. You can make changes to it, like adding your own logo.

GitHub.com Simple Signature Sample Code Repository

https://github.com/ToAFinish/simplesignature

Congratulations! You've done the hardest part. Now - you need to make sure everybody can see your page.

4) First, go back to the 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.

Page 22: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

5) We recommend giving your new page a Tab style. To do so, go to Setup > User Interface> Tabs and press "New" on the Visualforce Tabs section. Choose the page that you created, name it, and then select a color and icon that you like. Save.

6) Now you need to go back and modify any custom URLs you have created using the instructions starting on page 13. Change the "signature__Signature" page name to the name of your new page. For example, if the URL looks like this:

/apex/signature__Signature ?parentid={!Contact.Id} &backtoparent=1

And your new page is called "CustomSignature", then the new URL would be:

/apex/CustomSignature ?parentid={!Contact.Id} &backtoparent=1

Test, test, test and if you run into issue, you can move the URL back until you figure them out. Let us know if you need help: [email protected].

Page 23: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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. Here are the necessary steps.

1) First, the Lead creation functionality must be turned on. Go to Setup > Apps > Packaging > Installed Packages and click on the Configure link next to the Simple Signature app. If the paid version is enabled, you should see the "Automation 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. 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.

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

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

Page 24: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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 Configure Signature Experiences button at the bottom of the page.

3) In the new page, click the Add an Experience button:

Page 25: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

4) Fill in the Name of the experience, and optionally a Description. Click on the Save Experience button to generate the Experience Id, and then click on the Add Parameter button to start with the configuration.

5) Continue to add parameters as shown on page 19 until you are done. Remember to press the “Save Experience” button at the bottom.

6) Now copy the “Experience ID” value to be used in a Lightning Component, or in a URL button.

Page 26: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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" >

<aura:attribute name="recordId" type="String" />

<div class="slds">

<div class="slds-page-header" role="banner" id="mobHeader">

<div width="100%">

<span><center>

<img src="{!$Resource.signature__SSLogo}"

style="height:25px;" />

</center></span>

<span class="slds-text-heading--small">

<center><b>{!$Label.signature.Page_Title}</b></center>

</span>

</div>

</div>

</div>

<div style="margin: 1em 1em 2em 1em">{!$Label.signature.Long_Legal_Text_1}

&nbsp; {!$Label.signature.Long_Legal_Text_2}</div>

<signature:SignatureJunction recordId="{!v.recordId}"

ExperienceID="XXXXXXXXXXXXXXX"/>

<div align="center" style="color:gray"><br/><br />Powered by <i>

<a href="http://www.simplesignatureapp.com/" target="_blank">

Simple Signature</a></i> from To A Finish</div>

</aura:component>

4) In the code above 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.

Page 27: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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:

1) In the “Salesforce Lightning” web 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.

4) Leave the Setup area, and now 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.

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

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

Page 28: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

* Note: You can also use the SignatureFormConnector component. This one uses older technology and might be a bit slower, but it might be more solid. Try it if you run into any strange issues with the other one.

7) 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 on page 24.

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

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

Page 29: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Configuring Signature

Requests

Steps necessary to set up Salesforce for requesting Signatures

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 in your Salesforce org is a bit more complicated, and requires several steps in order to work

correctly:

1) Create a Visualforce page to be used in the Signature process. This is the PDF that you will want to be the final result of the signature process.

2) Configuring the App to use this page.

3) Creating a Signature Request action or button to trigger the request.

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.

Chapter

3

T

Page 30: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

PDF Form Creation 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 if you don't have someone with the skills or time to do it.

To get you started, you can use the included signature__BasicSignaturePDF page that is included with the app. This page only contains the legal wording, selected fields, and the signature on a simple form.

If you are using Opportunities as the parent object, we also provide a few sample Visualforce pages that you can use as a starter. Use these instructions to build it in a Sandbox or Dev org. (With one exception, you will not be able to do it directly in Production, but will 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.

GitHub.com Simple Signature Sample Code Repository

https://github.com/ToAFinish/simplesignature

2) Next, unless you are using a page called “SampleOpportunityPDF_NoController”, you will need to create a controller for your Visualforce page (steps 3-5). Go to Setup > custom code > Apex Classes and press the "New" button. Note that this will only work inside of a Sandbox or Dev 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 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 SampleOpportunityPDFControllerTest 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.

Page 31: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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 “SampleOpportunityPDF” (or “SampleOpportunityPDF_NoController” if you don’t need a controller) 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) Now, go back to the 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, as shown in the next section.

Page 32: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Defaults Configuration Once you have the Visualforce page that you want to use as the default for PDFs to be generated for signatures, you should configure the app to use it. Many of these options can be set via parameters when creating the Signature Request, however, it is best practice to set the defaults initially in order to ensure the correct settings are used if the parameters are not employed in a signature request. To do so:

1) Go to Setup > Apps > Packaging > Installed Packages and click on the "Configure" link next to the Simple Signature app. If the paid version is enabled, you will see these options:

2) Turn on or off the options according to what is defined below, and fill out any fields that are necessary.

Option Description

Run Batch on Save Run a job to email the blank and completed PDFs once the Signature is finished.

Attach PDF After Signature Attach the completed PDF to the Signature record.

Attach PDF on Parent Record After Signature

Attach the completed PDF to the parent record.

Attach PDF on Contact Record If Not Parent

If the parent record of the Signature is not a Contact, but you are still populating a Contact in the process, check this box so that the Contact record will also have an attached PDF at the end of the process.

Page 33: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Option Description

Email PDF to Contact after Signature

Email the completed PDF to the Contact on the Signature record.

Template Visualforce Page for PDF

This field must be populated with the name of the Visualforce page that will be used. If either of the above items is set, then this one must also be set. If you do not have a Visualforce page, you can use the default one: signature__BasicSignaturePDF

Default width (in pixels) for signature field (default = 500)

This is the width of the signature that will be saved for merging into an s-Docs template. The smaller the value, the smaller the signature will appear. If you are OK with the default of 500, then no need to enter anything different here, but it is a good idea to enter a number to avoid confusing in the future.

Use Files Instead of Attachments

This option is usually recommended. The only exception is when dealing with certain Sites where the Site User Profile does not have access to Files. In this case, you would want to avoid Files as after the signature the PDF will give an error.

3) Finally, click the Save Settings button at the bottom of the page.

Page 34: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Signature Requests Creation The next thing to do is to set up a button on the parent object of the proposed signature that will allow you to request a signature. 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. For these instructions, we will assume you choose the Contact object.

Important Tip: Creating a Signature Request is as easy as creating a Signature Record. The only thing you need to ensure is that you set certain fields to the correct value. There are several ways to do this, of which we will review the first three:

• Using a custom Action creating a record – this is the recommended method, and works nicely in Lightning and in Mobile, with the benefit of off-line support.

• Using a custom Button, calling a Visualforce page – this works for Classic and can also be used in Lightning and Mobile, without off-line support. The benefit of using a Visualforce page is that you can use a Custom Page to customize the look.

• Using a custom List Button, calling a Visualforce page, which allows you to create multiple signature requests at once. This works in Lightning and Classic.

• Using a custom Action calling a Lightning Component. This has all of the benefits of a custom button with Visualforce, with the exception of not working in Classic. In Lightning and Mobile, it works better. We will not discuss this one here, but you can use the instructions on page 26 to create a custom Lightning Component and simply set the allowrequest parameter to “1” in the Experience, in order to enable Signature Requests.

• Using a custom Process or a custom Trigger to create one or more Signature records. Use the instructions for the Action creating a record to populate fields.

Custom Action Creating Record

This action will create a Signature record with the appropriate fields populated in order to turn it into a Signature Request.

1) Start in the “Setup” area of Salesforce, with Admin permissions.

2) At the top-right of the page click on

Setup Object Manager and then find Contacts and click the Buttons, Links and Actions menu item from the left, then click the New Action button.

Page 35: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

3) Select “Create a Record” as the Action Type, “Signature” as the Target Object, and then give it a Label and Name. Finally, we recommend creating a Feed Item with a message similar to “Signature Request Created.” Save.

4) Next, edit the Page Layout to include whichever fields you want the user to see when they create the Signature Request. We recommend the First and Last Names, as well as the Email address. This ensures that all necessary data is in place before the request is made. Save.

5) Now click the New button in the “Predefined Field Values” area to add fields that must be populated in order to successfully create a Signature Request.

Field Default Value Notes

Attach PDF to Parent?

True

Attach PDF? True

Email PDF? False Change to true, in order to send out the final PDF after signature.

Email Contact.Email Values for any fields you want to pre-populate must match the API names of the fields. You can use the formula editor to arrive at these values.

First Name Contact.FirstName

Last Name Contact.LastName

PDF Template "c__CustomPDF" This is the name of the Visualforce page that will be used to build a PDF. If it is local (most often the case) it should begin with “c__” to indicate the local namespace.

Status Requested

Requested now()

Requested Form

"Custom Form Name"

This is optional, and is used to segment different types of signature requests.

Requested PDF Name

"Signed Form" Optional. If not included, a unique name will be provided using IDs.

6) Finally, click Page Layouts from the left menu and add this new Action into the page layouts. In addition to adding the Action, you might also want to add the Signatures related list in order to see the signatures. On the Signature related list, add the “Status” column to see where in the process each signature is.

7) Save and test.

Page 36: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Custom Button Calling a Visualforce Page (Classic)

This action will create a Signature record with no interaction from the user. Note that it will not work on Mobile in a disconnected environment.

1) Start in the “Setup” area of Salesforce, with Admin permissions.

2) At the top-right of the page click on Setup Object Manager and then find Opportunities and click the Buttons, Links and Actions menu item from the left, then click the New Button or Link button.

3) Give it a Name and Label like "Request Signature", set the Display Type as "Detail Page Button", set the Behavior to "Display in existing window without sidebar or header" and make sure the Content Source is URL.

4) In the main code area below, paste the following (remove any spaces):

/apex/signature__RequestSignature ?Id={!Opportunity.Id} &templateName=c__MyVFPage &contactField=PrimaryContact__c

5) You will need to change each parameter as explained below:

Parameter Description

Id The Id field of the parent object. For Opportunities it would be {!Opportunity.Id}, for Contacts {!Contact.Id}, etc. Use the Insert Field functionality provided to make sure you enter it correctly.

templateName This is optional if you want to use a different Visualforce page from that one you set up in the Configuration step above. You can create multiple buttons for different forms, if you change this one parameter.

contactField This is the API name of the Contact lookup field on the Parent object. Note that this field is required whenever doing a Signature Request because it is automatically emailed when the button is pressed. The process needs to know which Contact field to use. Please contact [email protected] if this is not clear to you. Only on Opportunities, if you leave off this Parameter it will search for the “Primary” Contact on the Contact Role and use this Contact. But if the “Primary” does not exist, it will be blank and not work.

6) Save the button, and now click on the Page Layouts menu and add the new button into the necessary page layouts in order to be able to request signatures from there.

Page 37: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Custom List Button Calling a Visualforce Page

This action will create one or more Signature records with no interaction from the user. It can be used in Lightning or Classic on a List View.

1) Start in the “Setup” area of Salesforce, with Admin permissions.

2) At the top-right of the page click on Setup Object Manager and then find Contacts and click the Buttons, Links and Actions menu item from the left, then click the New Button or Link button.

3) Give the button a name and select “List Button” under the Display Type. Then select “Display in existing window without sidebar or header” as the Behavior, and “Visualforce Page” as the Content Source. Finally, select the “List Signature Creator (Contacts)” Visualforce page as the Content.

* Note that you can copy this Visualforce page to any custom or standard object in order to have this same functionality for any other regular object.

4) Save the button and then click on the “Search Layouts for Salesforce Classic” menu option on the left. Edit the “List View” option to add your button to the list view.

5) Leave Setup and go to the object you selected. Click on the Tab and then from the List View dropdown, select a list you want to start from. Check the box next to any of the records (only a few to start) and press your new button.

6) Now go to the Signatures object list view and open a list view that shows all signatures. You will see that a signature record was created for each of the records you selected.

Page 38: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

7) In order to finish the functionality, you will need to create a Process that will run on creation of Signature records. Make a filter that ensures the Object’s lookup field is populated (in this case it would be the Contact lookup) and that other critical fields, such as the Status are empty.

8) Create an Action in the Process that will automatically populate the fields listed on Page 35. These fields are essential to the signature requests.

9) After creating the Process, Enable it and go do #5 again. This time, when you go look at the signatures, you should see that all of the fields are populated.

* Note: Please ensure you are not testing with actual email addresses that do not belong to you, as these signature requests will go out, and could cause some consternation with your contacts if they don’t know the test you are running.

Now you must set up a Site where your contacts can sign the form you set up. See the next section to work on this more advanced task.

Page 39: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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 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 the following pages into the Site Visualforce Pages:

• Signature.Signature (or the name of your Custom Signature page)

• Signature.TrackEmail

c) In the Public Access Settings, you will need to give this Site user 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.

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

Page 40: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

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) Go to Setup > Email > Classic Email Templates and open the Simple Signature folder.

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

3) Update the Subject Line to say what you want it to say, and then click inside of the email body and select all of the content. Use the Ctrl+A key combination or use whatever way you are best comfortable to ensure that you have selected ALL of the content. Now, CUT the content to the clipboard, leaving the email completely blank. Do not save it.

4) Go over to your favorite HTML editing program. If you do not have one, then you can use a free HTML editor online at http://htmleditor.in/ Delete any content currently in the window, and then PASTE from the clipboard the content you cut in step #4. If you are using the online editor, it should look like this:

5) Now click on the Source button in the editor, so that you can now see the code that is behind the scenes. You need to do this because you have to edit the URLs in the links.

Page 41: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

6) Find the two places in the code where a URL similar to the following is found:

simplesignature-developer-edition.xxxx.force.com

and replace it with the Site URL you pulled two pages back in the Site Setup section. Note that you should leave the https:// at the beginning, and the / plus whatever is after that at the end. You are only replacing the middle section, which directs it to your Salesforce org.

7) Now click the Source button again to switch out of Code mode, and again select ALL content in that window. Copy or Cut it to the clipboard.

8) Switch back to Salesforce, go to the email that should be blank, and Paste the content into the HTML Email Content area.

* Note that you might see a tiny square below the signature. Do not remove that square. It is a 1x1 image that is used to track when the email is opened.

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

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

Page 42: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Document Generation

(Visualforce, s-Docs, or

CoolDox, Conga, etc.)

How to set up Simple Signature to work with custom documents,

either through a Document Generation app, or via code…

imple Signature is intended to be “simple”, but the one complicated part about it is to create the actual documents where the final signature is supposed to go. For those geeks who love to code, creating Visualforce pages might be simple, and even fun, but for the majority of people, this might be outside of our toolbox. For those

people, we have three options:

To A Finish, the creator of Simple Signature, offers a service to create Visualforce forms for your organization. Depending on how complicated your document is, they might typically cost a few hundred dollars to build. Contact [email protected] or head on over to the www.simplesignatureapp.com website to explore this option in more detail. The good part of making Visualforce documents is that they can look exactly like you want them, and once they are built, there is no further cost to use them. But the downside is that if you ever need to change them, you have to go back through the process of hiring somebody again.

Additionally, you also have several Apps that work nicely with Simple Signature and provide document generation. (Descriptions below from their websites…)

COOLDOX is a MS-Word Add-in developed to help Salesforce user in creating impressive, rich-text documents like Sales proposals (Quotes), Customer contracts/agreements, and other documents. You can create new templates, import your existing templates from Salesforce, modify them and create rich documents to impress your customers. Documents generated using COOLDOX are immediately available in Salesforce, you can start sharing it with your colleagues or send to customers. https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000ETJDpUAP

Chapter

4

S

Page 43: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

S-Docs is an add-on that generates quotes, contracts, invoices, reports and any other document directly on Salesforce. S-Docs was developed on the force.com platform exclusively for Salesforce with features far superior to the out-of-box capabilities. It's 100% Native - running entirely on the Salesforce Cloud, so it stands alone as the only document generator that does not rely on external servers. Therefore S-Docs is the most secure, fastest, easiest to use and most cost effective solution on the AppExchange. https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003HeuPEAS

App Configuration If you haven’t already, you need to set two different options in the app configuration…

1) Go to Setup > Apps> Packaging> Installed Packages and click on the "Configure" link next to the Simple Signature app. If the paid version is enabled, you will see these options:

2) At least set the option defined below. Then click the Save Settings button.

Option Description

Default width (in pixels) for signature field (default = 500)

This is the width of the signature that will be saved for merging into an s-Docs template. The smaller the value, the smaller the signature will appear. If you are OK with the default of 500, then no need to enter anything different here, but it is a good idea to enter a number to avoid confusing in the future.

Page 44: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Set Up Signature Fields Before we can start using Simple Signature with another app, we need to create certain fields that will be used to display the images, and we also might need to do some configuration, and possibly some coding, in order to get everything to work.

1) Go to the object you will be using to generate s-Docs/COOLDOX documents

from (If it is a standard object, then go to Setup Object Manager and then click on the object and then go to fields. Now create the following fields:

Field API Name Field Type

Signature Image SignatureImage__c Rich Text Area(32768)

Signed Signed__c Checkbox

2) Go to the Signature object (Setup Object Manager Signature) and create a lookup field to the parent object (the object in step #1.) Call it what you want.

If you want to add other fields to the Signature page, check chapter 2 for fairly detailed instructions on adding fields.

Code to Make it All Work At this point you have done all you need to do from a configuration perspective, and now you need to just change a few things using code. If you are not familiar with this type of thing, ask your Salesforce support staff for help. If nobody in your organization can do it, please contact us and we’ll help as much as we can: [email protected].

Note that this will only work in a sandbox, so if you are in Production, you will need to create this trigger in a sandbox and deploy it here, rather than create it directly here.

1) Go to Setup Object Manager and select the Signature object, scroll down to the Triggers section and press the "New" button. Following is code that can be used assuming you followed the above field creation instructions AND assuming the Parent Object you selected in Opportunities. If not, please update accordingly:

Page 45: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

/* COPIES THE SIGNATURE IMAGE FROM THE SIGNATURE OBJECT TO THE PARENT OPPORTUNITY RECORD AND FLAGS IT AS SIGNED */ trigger copySig on signature__Signature__c (after insert, after update) { Map <Id,signature__Signature__c> sigMap = new Map <Id, signature__Signature__c>(); Set <Id> newIds = new Set <Id> (); for ( signature__Signature__c sig:Trigger.new ) { if ( sig.signature__Signature__c != null && sig.signature__Signature__c != Trigger.oldMap.get( sig.Id ).signature__Signature__c && sig.Opportunity__c != null ) { newIds.add( sig.Opportunity__c ); sigMap.put( sig.Opportunity__c, sig ); } } if ( !newIds.isEmpty() ) { List < Opportunity > oList = [select Id, SignatureImage__c, Signed__c from Opportunity where Id in:newIds limit 1000 ]; if( !iList.isEmpty() ) { for ( Opportunity o:iList ) { o.SignatureImage__c = sigMap.get( o.Id ).signature__Signature__c; o.Signed__c = TRUE; } try { update oList; } catch (exception ex) {} } } }

We recommend you copy this code from our GitHub repository, shown below. If a more updated version of the code exists, it will most likely be here, in the “triggers” folder:

GitHub.com Simple Signature Sample Code Repository

https://github.com/ToAFinish/simplesignature

This code will take the signature created and will copy it back to the object you will be using with your Document Generation app, like s-Docs or COOLDOX, or Conga.

Page 46: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

2) Now you need to go back to the object from Step #3 and scroll down to the "Buttons, Links, and Actions" section. Click on the "New Button or Link" button and fill it out like shown below:

a) Label = "Signature" or whatever you want it to be b) Name = "Signature" c) Display Type = "Detail Page Button" d) Behavior = "Display in existing window without sidebar or header" e) Content Source = "URL" f) Text area should be filled with something like this (delete spaces):

/apex/signature__Signature ?parentid={!Opportunity.Id} &backtoparent=1 &emailpdf=1 &contactField=Customer_Contact__c &sdocstype=Opportunity

Some of the different parameters supported are listed below, using examples from the Opportunity object:

COMPONENT DESCRIPTION

/apex/signature__Signature This is the name of the Signature page. Showing the default, but you can change it if you have a custom page.

parentid={!Opportunity.Id} This is the record Id of the current object where you start from.

backtoparent=1 This tells it to come back to this record after the signature. If you change it to 0, it will stay on the Signature record when done.

emailpdf=1 This tells it to email the PDF to the contact once finished. (optional)

contactField=Customer_Contact__c This tells it which is the contact field on the current object.

sdocstype=Opportunity This tells s-Docs the type of object being used, so that it will take you to the s-Docs merge page immediately after signature. (optional)

* For a complete list of supported parameters, please review chapter 2.

3) Now, Save this button.

Page 47: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

4) Still on the parent object, click on the Page Layouts section on the left and edit each layout that needs the Signature button. Add it to the appropriate area: Custom Buttons for Classic, and Mobile and Lightning Actions for Lighting and Mobile.

s-Docs, CoolDox, Conga Template Setup If you have a document generation app, like s-Docs, Conga or CoolDox, you have only one more step to incorporate the signature into your document templates.

1) The final step that needs to be done is to simply update any template in your document generator where you want to include a signature, and drop in the Signature Image field you created earlier in the chapter. This field will be blank if it hasn't been signed yet.

2) If Simple Signature has been used to sign, then not only will the Signature Image contain the signature, but also the Signed__c field will be TRUE. You can use this to determine if a signature is still needed or not.

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 s-Docs, Conga or COOLDOX!

No Document Generator? Use Visualforce!

If your documents do not change very often, and especially if there are not too many different ones, we highly recommend creating the documents in Visualforce rather that use a Document Generator. Please see the instructions on Page 30 in order to accomplish this.

Page 48: IMPLEMENTATION - Amazon S3 › simplesignature › TAF... · 2020-03-10 · in HTML or Flex). More recently, Lightning and Lightning Web Components have been introduced as a replacement

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 . C O M

Feedback and Remote 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 remote 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.