Salesforce PDF Generator Documentation


Documentation v2 · Updated November 30, 2026

This guide covers the GoCloudz PDF Generator app for Salesforce, version 3.57 and later: building branded PDF templates, creating, emailing, printing and automating PDFs, and collecting e-signatures with DocuSign. Please select a Role below to show only topics applicable for the role.

PDF Generator Overview

▶ Video: PDF Generator overviewVideo coming soon.

Welcome! PDF Generator helps your team send polished, on-brand quotes, proposals and order confirmations in seconds, without leaving Salesforce or copying data into Word.

PDF Generator creates branded PDF documents, such as quotes, proposals and order confirmations, from any standard or custom Salesforce object. Users save, download, print or email the PDF, or send it for e-signature with DocuSign. PDF Rules can create and email PDFs automatically when a record changes.

Administrators set up templates and settings; sales reps and other users create PDFs from buttons on the record.

Lightning Experience only: PDF Generator no longer supports Salesforce Classic. In Classic, the PDF buttons show a message asking the user to switch to Lightning Experience.
Help in the app: The ? icon at the top of the template builder and of PDF Settings opens this documentation. Each section of the builder and of PDF Settings also has an information panel that explains its fields, with a Learn more link to the matching topic here.

Install the App

A few minutes of setup gives every rep a consistent, professional document from day one.

  1. Install PDF Generator from the AppExchange. Install for All Users is recommended.

  2. Assign the PDF Generator permission set to the users who create PDFs or set up templates. It grants access to the package objects, fields, pages and classes.

  3. In production, assign a PDF Generator license to those users. Sandboxes do not need licenses.

  4. Open the App Launcher and select PDF Generator. The app has the PDF Templates, PDF – Dynamic Content and PDF Settings tabs.

  5. The install creates sample templates (inactive), sample PDF rules, default settings and default recipients. Clone a sample and change it, or create a template from scratch.

Screenshot: PDF Generator app with the PDF Templates tab and the sample templates

PDF Template Basics

▶ Video: Creating a PDF templateVideo coming soon.

A template is your document’s blueprint: design it once, and every rep’s PDF looks the same, with the right logo, terms and pricing every time.

A PDF template defines the content and layout of the PDF for one object. It has seven sections, each edited and saved separately. Only Overview is required; leave out any section you do not need.

SectionWhat it holdsLeave it empty when
OverviewTemplate name, object, active flag, PDF file name, page size and margins, page numbers, date and time formats, background colorAlways needed
HeaderContent at the top of every page, for example the logo and company addressThe PDF needs no repeated header
TitleThe first page or pages: cover, customer and address details, introduction (Title 1 and Title 2)The PDF starts straight with the tables
Tables / ColumnsThe table style, and tables of related records (for example quote line items) with their columnsThe PDF lists no related records
AggregatesTotals and other summary values from the record, shown below the tablesThere are no document totals
T&CTerms and conditions and any closing content (T&C 1 to T&C 3)There are no terms
FooterContent at the bottom of every page, for example page numbersThe PDF needs no footer

Create a Template

Start a template for each document your customers receive, such as a quote, a proposal or an order confirmation.

  1. Open the PDF Templates tab and click New.

  2. In New PDF template, enter the Template Name, choose the Object the PDF is for (Quote, Opportunity, Order, Lead or any other object) and enter the PDF Name. Turn on Active when users may use the template.

  3. Click Save. The template is created with standard settings (page size, margins, fonts and colors) and opens in the template builder.

Screenshot: New PDF template dialog with template name, object, PDF name and Active

The Template Builder

Everything you need sits on one page: edit a section, save it, and see the result straight away.

A template opens in the template builder on its record page. Edit on a template also opens the builder.

  • Highlights panel: template name, object, PDF name and status, with Clone, Delete and the help icon.

  • Sections menu (left): Overview, Header, Title, Tables / Columns, Aggregates, T&C and Footer. A section with unsaved changes is marked.

  • Section (center): the fields of the selected section. Save and Cancel at the bottom save or discard that section only.

  • Toolbar: click the icons next to the section title to insert a field, today’s date, the page number, a page break or a DocuSign tag at the cursor. An icon that does not apply to the section is disabled; hover over it to see why.

  • Live Preview (right): the PDF of the last saved template.

  • Click the buttons in the highlights panel to hide the sections menu on the left and the preview panel on the right, giving you more room to configure the template.

Screenshot: Template builder with the sections menu, the Overview section and Live Preview
Tip: Save each section before you move on. Each section saves only its own fields; the other sections stay as they were.

Preview Template

See exactly what your customer will receive, with real data, before any rep sends it.

Live Preview shows the PDF of the last saved template for a real record, and refreshes after each save.

  • It uses the record of the template’s object you viewed most recently, or else the most recently changed one. Choose another record in the Record box.

  • Translate the PDF shows the PDF in one of the languages set up in Locale Settings.

  • The expand icon opens the preview in a large window.

Screenshot: Live Preview with a record selected and the PDF translated into French

Clone Template

Cloning is the quickest way to start a new template from one that already has your branding, layout and tables: for example a version for another language, product line or document type, or a copy to try changes without affecting the template users work with.

Click Clone in the highlights panel and enter the New template name. The cloned template includes all sections, tables, columns and aggregates, and opens in the builder. The separate iClone app is no longer needed.

Delete Template

Click Delete and confirm to delete the entire template, including its tables, columns and aggregates.

To stop reps from using a template without deleting it, deactivate it instead: turn off Active in Overview.

Template Sections

▶ Video: Template sections, fields and tablesVideo coming soon.

Each section controls one part of the document, so you can update your terms or logo without touching the rest.

This section describes each part of the template builder: the Overview settings, the rich text editor, the content sections, merge fields, tables and aggregates.

Overview: Page and Style

Set the paper size, margins and date formats your customers expect, for example Letter for US customers and A4 for Europe.

GroupFields
TemplateTemplate name, object and active. PDF Name sets the file name and can contain merge fields, for example {!Name} - {!Today}.
PagePage Size: A3, A4, A5, B4, B5, Letter, Legal, Ledger, landscape or 8.5in × 11in. Margins, header and footer margins, page number format, background color, and whether the header and footer also show on the title page.
Date and timeThe date and time formats used for all dates and times in the PDF, including translated PDFs.

The table style (font, font size, row and border colors, cell padding) is set at the top of Tables / Columns.

Rich Text Editor

Format content as you would in Word, or paste in existing content, with no HTML needed.

Header, Title, T&C, Footer, dynamic content and the additional information of a table use the same rich text editor: fonts, colors, tables, images, alignment, lists, links, and paste from Word or web pages. Content is saved exactly as entered; a counter shows the characters used against the field limit.

Screenshot: The rich text editor with its toolbar and the character counter

Long content can be split across the parts of a section: Title 1 and Title 2, T&C 1 to T&C 3. Switch between parts with the buttons above the editor.

Tip: Fixed layouts, such as a header of a set height or a logo beside an address, work best inside an editor table with the borders set to 0.

Brand every page, open with a strong cover, and make sure your terms are always included.

  • Header: shown at the top of every page. If the header overlaps the PDF content, adjust its height by setting the header margin in Overview.

Screenshot: Header section with a logo and the document title
  • Title: the start of the PDF, before the tables. Select Show Header and Footer on Title page to show them on the first page too.

Screenshot: Title section with Title 1 and Title 2 and the cover content
  • T&C: shown after the tables and aggregates. Insert a page break to start the terms on a new page.

Screenshot: T&C section with T&C 1 to T&C 3 and a page break
  • Footer: shown at the bottom of every page. Its height is set by the footer margin in Overview.

Screenshot: Footer section with company details and the page number

Insert Field and Merge Fields

Pull customer names, amounts and dates straight from the record, so reps never retype data and errors don’t reach customers.

The Insert field icon opens a dialog with three tabs; the selected value is inserted at the cursor.

  • Field: a field of the template’s object or of a related record, up to three levels (for example Account > Owner > Email). Format adds a format such as Currency or Date; the dialog shows exactly what will be inserted.

  • Recipient: a field of the PDF recipient (Contact, Lead or User), inserted as {!Recipient.FirstName}.

  • Custom label: enter a custom label API name and click Check to see its value in each active language. Labels already used in the template can be picked from a list.

Screenshot: Insert field dialog with the Field, Recipient and Custom label tabs
SyntaxResult
{!Field}The field value, for example {!Name} or {!Account.Name}
{!Field}.Date, .DateTime, .TimeA date or time in the template’s format
{!Field}.CurrencyAn amount with the currency symbol or ISO code
{!Field}.Number, {!Field}.PercentA number or percentage
{!Field}.TranslateA picklist value translated with Translation Workbench
{!Field}.CheckboxA checkbox symbol for a checkbox field
{!Recipient.Field}A field of the PDF recipient
{!Label.Name}A custom label in the PDF’s language
{!Today}Today’s date in the template’s format
{!PageNumber}The page number, in the page number format of Overview
{!PageBreak}Starts a new page (Title and T&C only)
{!GoCloudz.Attachment1}, {!GoCloudz.Attachment2}Dynamic content
{!Signer1.SignHere}A DocuSign tag for signer 1
Note: The format goes after the closing brace: {!ExpirationDate}.Date, not {!ExpirationDate.Date}.

PDF Table and Columns

Show line items the way customers understand them, for example one-time fees and subscriptions in separate tables, each with clear totals.

Tables / Columns starts with the Table style used by all tables of the template: row colors (even and odd), border color, font, font size and cell padding.

Below it are the template’s tables. Click New table to add one, drag tables to change their order, or use the row icons to clone or delete a table. Click a table to see and change its columns.

Screenshot: Tables / Columns section with the table style and two tables

Table settings

TabFields
GeneralTable name (can contain merge fields and labels, for example Hardware - {!Name}), Related object (for example Quote Line Item), Field Name (the lookup to the template’s object), Hide Table Title, Display on a new page, and Additional information: rich text shown under the table.
Filter & sortWhich related records the table shows. Add condition picks a field, an operator (equals, contains, greater than, is blank and others) and a value; Combine with joins the conditions with AND or OR. The Filter (SOQL condition) box shows the result, and you can also type a SOQL condition there directly. Sort by and Sort order set the order of the rows.
Title styleAlignment, font size, font color and background of the table title.
Product BundleBundle view, Group bundles, Merge child bundle items and Show aggregate fields as a separate section (with the Product Bundle app only; see Displaying Bundles on PDF).
Screenshot: Edit table: the Filter & sort tab with a SOQL condition and the sort order

Example: two tables of quote line items, one filtered on Product Family equals Hardware, the other on Product Family equals Software.

Columns

Click New column. A new column copies the header and row style of the previous column; drag columns to change their order.

Screenshot: A table opened in Tables / Columns, with its columns
TabFields
FieldField (a field of the related object or of its parent records), Column label, Type, Decimal places, Width (%) and Group rows by this column
Header styleFont size, weight, alignment, font color and background of the column header
Row styleThe same settings for the column’s values
Total rowTotal label and Total type (Sum, Avg, Min, Max, Append, or as-is)
Screenshot: Edit column dialog with the Field tab
  • A table with no records is not shown.

  • A line item with Do Not Show on PDF selected is left out.

  • Hide blank columns and Highlight negative values are set in PDF Settings > General Settings and apply to all templates.

  • To combine fields in one column (for example product name and description), create a formula field on the related object.

Aggregate Fields

Summarize what matters most to the buyer (subtotal, discount, tax and grand total) at a glance.

Aggregates are document-level values from the record itself, such as subtotal, discount, tax, shipping and grand total. They are shown after the tables and before T&C. In Aggregates, click New aggregate and choose the field, its label and its style; drag aggregates to change their order.

Screenshot: Aggregates section with a Total investment aggregate

Multilingual

▶ Video: Multilingual PDFsVideo coming soon.

Sell globally with one template: customers receive documents in their own language, and you maintain a single design.

One template can create PDFs in several languages:

  • Template text: use custom labels ({!Label.Name}) with translations in the template text, table names, column labels and aggregate labels.

  • Picklist values: add .Translate (for example {!StageName}.Translate) to use the Translation Workbench translations.

  • Record data, such as product names and addresses, is not translated.

Set Up Translations

A one-time setup by your admin, after which every translated PDF is ready on demand.

  1. In Setup, open Translation Language Settings and make sure each language is active. Translations of inactive languages are not used.

  2. Create the custom labels and their translations. Clear Protected Component on each label: the package cannot read protected labels. Values are limited to 1,000 characters; a missing translation uses the label’s default value.

  3. In PDF Settings > General Settings > Locale Settings, click New locale for each language the PDFs support and select Active.

Example: a table and the T&C text that use custom labels, and the same content in a translated PDF.

Screenshot: A table whose name and column labels use custom labels
Screenshot: The table in a translated PDF
Screenshot: T&C content that uses custom labels
Screenshot: The T&C in a translated PDF

Translated PDFs

Reps choose the customer’s language with one click, with no separate templates to manage.

The PDF is created in the user’s language. On the PDF page and in Live Preview, Translate the PDF lists the active locales, so users can create the PDF in another language.

Note: Dates always use the template’s date format, also in a translated PDF. To show dates differently per language, use a separate template.

Localize PDF

Useful when a button or link should always create the PDF in a set language, for example a Print button for your team in Mexico.

A direct print link or button can create the PDF in a set language. Add both parameters to the URL:

&locale=fr_FR&language=fr
  • locale: the locale, as set up in PDF Settings > General Settings > Locale Settings.

  • language: the Salesforce language code, used for custom labels and translated picklist values. It can be a regional code, such as es_MX.

Languagelocalelanguage
French (France)fr_FRfr
German (Germany)de_DEde
Spanish (Spain)es_ESes
Spanish (Mexico)es_MXes_MX
Dutch (Netherlands)nl_NLnl_NL
Italian (Italy)it_ITit
Portuguese (Brazil)pt_BRpt_BR
Japanese (Japan)ja_JPja
English (United Kingdom)en_GBen_GB

The language must be active in Translation Language Settings, and the locale active in Locale Settings. Example of a print link in German:

/apex/sfcloud2__PDF_PrintHost?id={!Opportunity.Id}&templateId=a0X5g000001AbCdEAF&locale=de_DE&language=de

Displaying Bundles on PDF

▶ Video: Displaying bundles on PDFVideo coming soon.

Present solutions, not part lists: customers see the package and its price, which keeps proposals clear and protects your pricing.

With the Product Bundle app installed, you can show bundle or package details and pricing to your customers instead of individual line item details. Set this on the Product Bundle tab of a table of Quote, Opportunity, Order or Work Order line items:

  • Bundle view: select it to group the line items by bundle, with each bundle in its own table.

  • Tabular: all bundles in one table.

  • Compare: bundles side by side.

  • Merge child bundle items: nested bundles are merged into their parent bundle.

Column rules: relationship fields are not supported (use a formula field on the line item). Totals work as on other tables, including Append, which joins the values.

Screenshot: Columns of a bundle table, with Append and Sum totals
Screenshot: Bundle view: each bundle in its own table
Screenshot: Tabular bundle view: all bundles in one table

Preview, Save, Download, Print and Email PDF

▶ Video: Creating and emailing PDFsVideo coming soon.

Reps create and send documents from the record they’re already working on, so deals move faster.

Users create PDFs from buttons on the record. Each button opens the PDF page with the action of that button.

Buttonaction=What the user does
Create PDF & EmailsendEmailChooses a template, previews, saves the PDF and emails it
Create PDFsaveChooses a template, previews and saves the PDF to the record
Download PDFdownloadChooses a template, previews and downloads the PDF without saving it
Print PDFprintChooses a template, previews and prints
PreviewpreviewChooses a template and previews the PDF
Create PDF and E-SignaturesendForESignatureSaves the PDF and sends it for signature with DocuSign

Quote, Opportunity, Order and Lead come with these buttons; add them to the page layout under Mobile & Lightning Actions. For other objects, create the buttons: Custom Buttons has an example for each button.

The PDF Page

Pick a template, check the preview, and send with confidence.

  1. Click the button on the record, for example Create PDF and Email.

Screenshot: Create PDF and Email in the actions of an Opportunity
  1. Select the template. When only one template is available, it is selected for you. With Filter Templates on, only the templates of matching PDF rules are offered.

  2. Check the preview and the file name.

  3. Optional: choose another active language in Translate the PDF.

  4. Click Save PDF, Download PDF, Print PDF, Save and Email PDF or Send for E-Signature, as offered by the button.

Screenshot: PDF page with the template selected, the language and the preview

A saved PDF is stored in the record’s Files. For Quotes it is also added to the Quote PDFs related list.

Create PDF and Email

Send the quote in seconds; the email is logged on the record, so the whole team can see what was sent.

After Save and Email PDF, the email step opens with the PDF attached.

FieldContent
ToThe recipients of the record (see Recipients)
Related ToThe record
Additional To, CC, BCCMore email addresses
Subject, BodyThe defaults of the object’s settings, or an email template (Insert Email Template)
AttachmentsThe new PDF, selected; other files of the record can be selected, and Upload Files adds a file from your computer
Screenshot: Send an Email step with recipients, subject, body and attachments

Click Send. Emails to a Contact or Lead are logged as an activity on the record.

Screenshot: The sent email in the Activity timeline of the Opportunity

Email settings

  • Default subject and body per object: PDF Settings > Object & Recipient Settings, Email Subject and Email Body. Merge fields of the record and its related records can be used.

  • Sender name and reply address: see Customize Sender Info.

Create PDF

Keep a saved copy on the record for reference, audits or approvals.

Create PDF saves the PDF to the record’s Files without emailing it.

Download PDF

Download PDF downloads the PDF to the user’s computer without saving it in Salesforce. Use it when the PDF does not need to be kept on the record, for example to save file storage, or to send the document from an external email client such as Microsoft Outlook.

Handy for in-person meetings or signed hard copies, without filling up file storage.

Print PDF opens the PDF in a new browser tab with the print dialog. The tab closes after printing or cancelling (depending on the browser). Browsers block tabs that open without a click, so printing starts from the Print PDF button on the PDF page.

Print straight from the record: to skip the PDF page, create a button (see Custom Buttons) that opens the print tab with a fixed template:

/apex/sfcloud2__PDF_PrintHost?id={!Opportunity.Id}&templateId=a0X5g000001AbCdEAF
  • id and templateId are required. Copy the template Id from the template’s URL.

  • locale and language are optional and go together, for example &locale=fr_FR&language=fr. Without them, the user’s settings are used. See Localize PDF.

  • Set the button behavior to Display in new window so the tab can close itself.

Customize Sender Info

Emails come from your company name and reply address, so customer replies reach the right inbox.

In PDF Settings > General Settings, Display Name and Reply Address set the sender name and reply-to address of PDF emails. To send from a shared address, set up an Organization-Wide Address in Setup and use it as the reply address.

Screenshot: PDF Settings, General Settings: Display Name and Reply Address

Automated PDF Generation

▶ Video: Automated PDF generation with PDF RulesVideo coming soon.

Put routine documents on autopilot: when a deal reaches a stage, the right PDF is created and sent with no clicks.

PDF Rules create a PDF, and optionally email it, when a record is created or changed and a field has a given value. Example: when a Quote’s Status changes to Approved, create the quote PDF and email it to the customer.

Turn On Automation

One switch for the whole org, so you stay in control of when automation runs.

In PDF Settings > PDF Rules > Filter and Auto PDF, select Auto Generate PDF.

Screenshot: PDF Settings, PDF Rules: Filter Templates, Auto Generate PDF and the rules of an object

Create a PDF Rule

For example, create and email the order confirmation automatically as soon as an Order is activated.

  1. In PDF Settings > PDF Rules, click New rule.

  2. Choose the Object, enter the rule Name, and choose the Field Name and Field Value that fire the rule.

  3. Choose the PDF Template.

  4. To email the PDF, choose the Email Template. The email goes to the record’s recipients.

  5. Optional: Internal Email Id(s) sends the email to these addresses instead of the recipients (for testing). CC me and BCC me copy the user whose change fired the rule.

  6. Select Active and click Save.

Screenshot: Edit PDF rule dialog: Opportunity, Stage equals Closed Won, with a PDF template and an email template
  • Rules are checked in the order of the list; drag rules to change the order. The first matching rule of an object wins.

  • The field must be a field of the object itself. For a condition on several fields, create a formula field and use it in the rule, for example this checkbox formula:

    AND(ISPICKVAL(StageName, "Closed Won"), Payment_Mode__c = "Card")
  • Date and number values are stored in the format the automation compares. A rule saved by an earlier version shows the converted value when opened; save it to keep it.

  • PDFs are created in the background, a few seconds after the change. If something fails, the user whose change fired the rule receives an email with the error.

  • Images from external websites need a Remote Site Setting.

  • Test with Internal Email Id(s) before emailing customers.

Automation works for Quote, Opportunity, Order and Lead. For other objects, add a trigger (see Automations for Other Objects).

Restrict/Filter Template

Show reps only the templates that fit the deal, for example the partner template on partner deals, so the wrong document never goes out.

PDF rules can also limit which templates users see on the PDF page. Select Filter Templates in PDF Settings > PDF Rules > Filter and Auto PDF. Users then see only the templates of the rules that match the record. Example: Opportunities in Europe see only the EUR template.

Recipients

▶ Video: RecipientsVideo coming soon.

Make sure every document reaches the right people: the decision maker, the finance contact, and anyone who needs a copy.

Recipients are the people a PDF is emailed or sent for signature to. They are kept in the Recipients related list of the record: Users, Contacts or Leads, each as To, CC or BCC.

Add Recipients Manually

For one-off deals, add or adjust who receives the document and who signs first.

In the Recipients related list, click New and fill in:

FieldContent
Contact, Lead or UserThe person
PrimaryThe main recipient
Receive email asTo, CC or BCC
Signer RoleFor e-signature: Signer 1 to Signer 6, the order of signing
Screenshot: New Recipient on a record: the person, Primary, Receive email as and Signer Role

Recipients Automation

Set it once, for example “the billing contact always receives the invoice”, and reps never have to think about it.

Default recipients are added to a record automatically when it is created or changed.

  1. In PDF Settings > Object & Recipient Settings, click New object setting and choose the object. Enter the default Email Subject and Email Body, and the E-Signature Flow: Sequential (one signer after the other) or All at once.

Screenshot: Object & Recipient Settings: the email subject, body and e-signature flow of each object
  1. Click Recipients on the object setting, then New recipient.

  2. Choose the Recipient field: a lookup on the record to a Contact, Lead, User or Group, up to two levels (for example Opportunity > Account > Owner).

  3. Choose Receive email as, Primary and the Signer Role. Signer roles must be unique and in order.

Screenshot: Default recipients of an object, with Receive email as, Signer Role and Primary

For Objects Other than Quote, Opportunity, Order and Lead

Extends the same convenience to your custom objects, such as contracts or service agreements.

  1. On the Recipient object (Recipients__c), create a lookup field to the object. Its API name must be the object’s API name, for example Contract__c for Contract.

  2. Add the Recipients related list to the object’s page layout.

  3. Add the trigger (see Automations for Other Objects).

DocuSign Integration for E-Signature

▶ Video: DocuSign e-signatureVideo coming soon.

Close deals faster: send for signature straight from Salesforce, and the signed document comes back to the record automatically.

Send the PDF for signature with DocuSign without leaving Salesforce: signers come from the record’s recipients, tags in the template place the signature fields, and the signed document returns to the record.

Prerequisite: A DocuSign subscription (Business Pro or higher) with API access. Users who send for signature need a PDF Generator license.

Step 1 – Connect DocuSign to Salesforce

Install the DocuSign Apps Launcher package and connect DocuSign and Salesforce as described in the DocuSign setup guide. Only steps 1 to 3 of the guide are needed for e-signature.

Make sure the user who connects DocuSign has a PDF Generator license; otherwise the PDF Generator objects and fields are not visible in the next step.

Step 2 – Configure DocuSign

In DocuSign Admin, configure each object your PDF templates are built for, standard or custom: for example Quote, or both Quote and Opportunity. Map the envelope Id between Salesforce and DocuSign to the object’s Envelope Id field.

Screenshot coming soon: DocuSign object configurationThe object configuration in DocuSign Admin, with the envelope Id mapping.

Step 3 – Configure Salesforce

  1. In PDF Settings > DocuSign Settings, enter the Account Id (the DocuSign API Account ID).

  2. Optional: choose the signer Authentication (Phone or SMS) and whether the Recipient may specify phone number (see Multi-Factor Authentication).

  3. Optional: add Custom Tags (see DocuSign Standard and Custom Tags).

  4. In Object & Recipient Settings, set the E-Signature Flow of the object and the Signer Role of each default recipient.

  5. Add the Create PDF and E-Signature button to the page layout.

Screenshot: PDF Settings, DocuSign Settings: Account Id, Authentication and Custom Tags

The envelope Id of a sent document is stored in the Envelope Id field on Quote, Opportunity and Order. On other objects, create a Text(255) field with the API name envelopeId__c to store it; without it the envelope is still sent.

Custom Button for Other Objects

For objects other than Quote, Opportunity or Order, create a button named Create PDF and E-Signature with this URL (replace Contract with the object):

/apex/sfcloud2__QuotePDF_Save?id={!Contract.Id}&sObj=Contract&action=sendForESignature

See Custom Buttons for the button settings.

DocuSign Standard and Custom Tags

Place signature, date and initial fields exactly where signers need them, so nobody misses a field.

Tags mark where each signer signs, initials or fills in a value. In the template builder, the DocuSign icon opens Insert DocuSign tag: choose the Signer (Signer 1 to Signer 6) and the Tag. The tag is inserted at the cursor in white text, so it is invisible in the PDF but read by DocuSign. The icon is shown once the DocuSign Account Id is set.

Screenshot: Insert DocuSign tag dialog: choosing the signer and the tag
Standard tagsUse
SignHereSignature
InitialHereInitials
FullName, FirstName, LastName, Title, EmailAddress, DateSignedValues filled in by DocuSign
SignerAttachment, SignerAttachmentOptionalThe signer uploads a file (up to 25 MB)

Custom tags are set up in PDF Settings > DocuSign Settings > Custom Tags: name, type, list items, radio group name, maximum length, width and required.

Example:

Signature: {!Signer1.SignHere}   Date: {!Signer1.DateSigned}

E-Signature User Experience

Reps send for signature in a few clicks and follow progress on the record, with no chasing by email.

  1. Check the recipients and signer roles on the record.

  2. Click Create PDF and E-Signature, select the template and check the preview.

Screenshot: Create PDF and E-Signature in the actions of an Opportunity
Screenshot: PDF page for e-signature with the template and the preview
  1. Click Send for E-Signature, check the signers, subject and body, and click Send.

Screenshot: Send for E-Signature step with the signers, subject and body
  1. Signers receive the DocuSign email. Follow the status in the DocuSign Envelope Status related list of the record.

Screenshot: DocuSign Envelope Status on the record: viewed and signed

Additional documents: files of the record whose names start with e-sign_ are sent with the PDF in the same envelope.

Multi-Factor Authentication (MFA)

Add an extra layer of trust for high-value or regulated agreements.

Signers can be asked to confirm their identity with a code sent by Phone or SMS, set in PDF Settings > DocuSign Settings > Authentication. The phone number comes from the recipient record. Recipient may specify phone number lets the signer enter a number instead (not recommended). Signers have three attempts to enter the code.

Dynamic Content

▶ Video: Dynamic contentVideo coming soon.

Write it once, reuse it everywhere: country-specific terms, data sheets or legal addenda appear automatically on the right deals.

Dynamic content is reusable rich text, for example terms per country or a product data sheet, that a template shows depending on the record.

  1. Open the PDF – Dynamic Content tab and click New. Enter the name, object and description, and the content (Content 1 to Content 3) in the rich text editor.

  2. In the template, insert {!GoCloudz.Attachment1} and/or {!GoCloudz.Attachment2} where the content goes.

  3. On the record, fill in the Dynamic Content 1 and Dynamic Content 2 lookups with the dynamic content to show. On Opportunity, Quote and Order these fields come with the package (GoCloudz_Attachment_1__c and GoCloudz_Attachment_2__c). For other objects, create two lookup fields to PDF – Dynamic Content with the same API names. A Flow can fill them automatically.

Screenshot: A PDF - Dynamic Content record with a data processing addendum
Screenshot: The Dynamic Content 1 and Dynamic Content 2 fields on an Opportunity

Watermark

Mark drafts clearly as DRAFT or CONFIDENTIAL, so customers never mistake an early version for the final offer.

A watermark, for example DRAFT or a background image, is shown behind the content of every page.

  1. Upload the image as a static resource (Setup > Static Resources) and copy its URL.

  2. Paste the URL into the record’s Watermark field (Quote, Opportunity and Order). For other objects, create a URL field named Watermark__c and add it to the page layout.

Screenshot: A PDF with a watermark behind the content

Working with Images

Logos and product images make proposals more engaging and easier for customers to evaluate.

  • Logo and other images in the header, title, T&C and footer: add them in the rich text editor.

  • Product images in tables: add an Image URL field on Product and a formula field on the line item, and use it as a column. For example:

    IMAGE(Product2.Image_URL__c, "Product", 75, 75)
  • Images from external websites need a Remote Site Setting for that site.

  • The Product Bundle app includes these product image fields.

PDF Settings

Your control center for settings shared by every template, so changes apply everywhere at once.

The PDF Settings tab holds the settings that apply to all templates. It has four sections.

General Settings

Set your sender details and number display once, for consistent documents across the org.

Display Name and Reply Address of PDF emails (see Customize Sender Info), Highlight negative values (color), Hide blank columns, Hide trailing zeros and Show currency symbols instead of ISO codes. Locale Settings lists the languages PDFs can be translated into (see Multilingual).

Screenshot: PDF Settings, General Settings with the default settings and Locale Settings

PDF Rules

Manage automation and template filtering in one place.

Filter Templates and Auto Generate PDF, and the PDF rules of each object (see Automated PDF Generation and Restrict/Filter Template).

Screenshot: PDF Settings, PDF Rules: Filter Templates, Auto Generate PDF and the rules of an object

Object & Recipient Settings

Default email text and recipients for each object, so reps start every email with the right content.

The default email subject and body and the e-signature flow of each object, and its default recipients (see Recipients Automation).

Screenshot: Object & Recipient Settings: the email subject, body and e-signature flow of each object

DocuSign Settings

Connect your DocuSign account and set how signers verify their identity.

The DocuSign Account Id, signer Authentication, Recipient may specify phone number, and Custom Tags (see DocuSign Integration).

Screenshot: PDF Settings, DocuSign Settings: Account Id, Authentication and Custom Tags

Custom Buttons

Bring PDF Generator to any object, such as contracts, service orders or invoices, with a simple button.

For objects other than Quote, Opportunity, Order and Lead, create a Detail Page Button with the behavior Display in existing window without sidebar or header and the content source URL, and add it to the page layout. Replace Contract with the object.

Create PDF & Email

/apex/sfcloud2__QuotePDF_Save?id={!Contract.Id}&sObj=Contract&action=sendEmail

Create PDF

/apex/sfcloud2__QuotePDF_Save?id={!Contract.Id}&sObj=Contract&action=save

Download PDF

/apex/sfcloud2__QuotePDF_Save?id={!Contract.Id}&sObj=Contract&action=download

Print PDF

/apex/sfcloud2__QuotePDF_Save?id={!Contract.Id}&sObj=Contract&action=print

Create PDF and E-Signature

/apex/sfcloud2__QuotePDF_Save?id={!Contract.Id}&sObj=Contract&action=sendForESignature

Add &templateId=<template Id> to open the PDF page with that template selected.

Automations for Other Objects

For admins or developers who want PDF rules and default recipients on custom objects: a small trigger is all it takes.

PDF rules and default recipients run on Quote, Opportunity, Order and Lead. For another object, a developer adds this trigger (replace Contract with the object) and a test class, and deploys them from a sandbox.

trigger PDFGeneratorContract on Contract (after insert, after update) {
    String objectName = 'Contract';
    if (!sfcloud2.QuotePDF_Utility.proceedWithTrigger(objectName)) {
        return;
    }
    // Default recipients (Object & Recipient Settings)
    sfcloud2.QuotePDF_Utility.copyRecipient(objectName, Trigger.new);
    // PDF rules (create and email PDFs)
    sfcloud2.QuotePDF_Utility.createPDFAndEmail(objectName, Trigger.new);
}

Sample test class

@isTest
private class PDFGeneratorContractTest {
    @isTest
    static void createsContract() {
        Account acc = new Account(Name = 'Test');
        insert acc;
        Contract c = new Contract(AccountId = acc.Id, StartDate = Date.today(), ContractTerm = 12);
        insert c;
        update c;
        System.assertNotEquals(null, c.Id);
    }
}
Note: Production deployments need 75% test coverage. If you copy the code from a web page, type the single quotes again, as some browsers change them.

Frequently Asked Questions

Quick answers to the questions we hear most often. Can’t find yours? Contact us, we’re happy to help.

1. Why don’t users see the PDF buttons?

Check that the buttons are added to the Lightning page layout under Mobile & Lightning Actions, that users have the PDF Generator permission set and, in production, a PDF Generator license. Users in Salesforce Classic see a message asking them to switch to Lightning Experience. For objects other than Quote, Opportunity, Order and Lead, create the buttons first (see Custom Buttons).

2. Why is my template not offered on the PDF page?

The template must be Active and built for the record’s object. With Filter Templates on, only the templates of the PDF rules that match the record are offered (see Restrict/Filter Template).

3. Why is a table missing from the PDF?

A table with no records is not shown. Check the table’s Filter & sort conditions, the Field Name lookup on the General tab, and that the line items do not have Do Not Show on PDF selected.

4. Why don’t my changes show in Live Preview?

Live Preview shows the last saved template. Save the section you changed; each section saves only its own fields.

5. Why is a custom label blank in the PDF?

An unknown label prints blank. Check the label’s API name with Check in the Insert field dialog, clear Protected Component on the label, and make sure the language is active in Translation Language Settings (see Multilingual).

6. Why don’t I see the DocuSign icon in the template builder?

The icon is shown once the DocuSign Account Id is set in PDF Settings > DocuSign Settings.

7. A PDF rule did not create a PDF. What should I check?

Check that Auto Generate PDF is selected, the rule is Active, and the field value matches. Only the first matching rule of an object runs. For objects other than Quote, Opportunity, Order and Lead, the trigger is needed. PDFs are created a few seconds after the change; if something fails, the user whose change fired the rule receives an email with the error.

8. Where is the saved PDF stored?

In the record’s Files. For Quotes it is also added to the Quote PDFs related list.

9. Which fields do I need to create for a custom object?

Quote, Opportunity, Order and Lead come ready to use. For a custom object (or another standard object), create only the fields your business needs:

  • Recipients: a lookup field to the object on the Recipient object (Recipients__c), with the object’s API name, and the Recipients related list on its page layout (see Recipients).

  • E-signature: a Text(255) field envelopeId__c to store the DocuSign envelope Id (see DocuSign).

  • Watermark: a URL field Watermark__c (see Watermark).

  • Dynamic content: lookup fields GoCloudz_Attachment_1__c and GoCloudz_Attachment_2__c to PDF – Dynamic Content (see Dynamic Content).

For PDF rules and default recipients, also add the trigger and test class (see Automations for Other Objects), and create the PDF buttons (see Custom Buttons).