For admins and template authors: build a Generate SOW button on Opportunity that produces a PDF scope of work with the client's details, the project dates, a numbered table of deliverables (the opportunity's products) with fees and a total, and a sign-off block. The PDF is saved to the opportunity's Files. It takes about 25 minutes with the sample template.

What you'll build

For the sample opportunity Annual Support & Maintenance Contract with Burlington Textiles Corp of America, the SOW reads like this:

SCOPE OF WORK · Annual Support & Maintenance Contract Prepared for Burlington Textiles Corp of America on November 20, 2026

Client: Burlington Textiles Corp of America · Apparel · (336) 222-7000 · 525 S. Lexington Ave, Burlington, NC 27215, United States Project lead: Jordan Smith Timeline: January 5, 2027 to March 31, 2027

4. Deliverables and fees

#DeliverableDescriptionQtyFee
1Discovery WorkshopStakeholder workshops and process mapping1$4,000.00
2Configuration ServicesSalesforce configuration per approved design10$12,000.00
3Training SessionEnd-user training2$3,000.00
Total$19,000.00

Confidential · Burlington Textiles Corp of America · Page 1 of 2 File saved as SOW - Annual Support & Maintenance Contract - 20-Nov-2026.pdf

The Deliverable column shows each product's name through the line item's product lookup, {{Product2.Name}}.

It uses these features:

Before you begin

  • Docs Made Easy is installed, and you have a license and the permission set. See Assign licenses and permission sets.
  • You can create fields and edit the Opportunity page layout.
  • You have a test opportunity with an account and a Description, and products whose Line Description describes each deliverable.
  • Create two custom fields for the project dates:
    1. In Setup, open Object Manager > Opportunity > Fields & Relationships and click New.
    2. Choose Date, click Next, and enter Project start date as the Field Label. Salesforce sets the API name to Project_start_date__c.
    3. Make the field visible to the profiles that generate SOWs, add it to the Opportunity layout, and click Save.
    4. Repeat for Project end date (Project_end_date__c).

Everything in this recipe, including CurrencyCulture, AUTOSUM(ABOVE), Convert to PDF? and background mode (bgm=1), works in both Basic and Pro. Only sending the SOW for eSignature (in Take it further) needs Pro.

1. Build the template

Download the sample template (.docx), ready to upload, or create a Word document with the content below. Replace anything in [square brackets] with your own details.

[HEADER, right-aligned]
Scope of Work · {{Opportunity.Name}}

[BODY]
SCOPE OF WORK
{{Opportunity.Name}}
Prepared for {{Opportunity.Account.Name}} on {{Today \@ MMMM d, yyyy}}

1. Parties to this agreement

CLIENT
Company: {{Opportunity.Account.Name}}
Industry: {{Opportunity.Account.Industry}}
Website: {{Opportunity.Account.Website}}
Phone: {{Opportunity.Account.Phone}}
Address: {{Opportunity.Account.BillingStreet}}
{{Opportunity.Account.BillingCity}}, {{Opportunity.Account.BillingState}} {{Opportunity.Account.BillingPostalCode}}
{{Opportunity.Account.BillingCountry}}

SERVICE PROVIDER
Company: [Your company name]
Project lead: {{Opportunity.Owner.Name}}
Email: {{Opportunity.Owner.Email}}

2. Project overview
{{Opportunity.Description}}

3. Timeline
Project start: {{Opportunity.Project_start_date__c \@ "MMMM d, yyyy"}}
Project end: {{Opportunity.Project_end_date__c \@ "MMMM d, yyyy"}}

4. Deliverables and fees

[TABLE: 5 columns. Row 1 is the header; its first cell starts with the TableHide tag, so the whole table is left out when the opportunity has no products. Row 2 repeats once per product. Row 3 totals the Fee column.]
| {{TableHide:Opportunity.r.OpportunityLineItems}}# | Deliverable | Description | Qty | Fee |
| {{TableStart:Opportunity.r.OpportunityLineItems}}{{RowNumber}} | {{Product2.Name}} | {{Description}} | {{Quantity}} | {{TotalPrice \# CurrencyCulture1}}{{TableEnd:Opportunity.r.OpportunityLineItems}} |
| | | | Total | {{AUTOSUM(ABOVE)\# CurrencyCulture1}} |
[END TABLE]

5. Assumptions
- The Client provides access to its Salesforce org, data and subject-matter experts when needed.
- Work outside the deliverables above is handled as a change request.

6. Change requests
Either party may request a change to the scope in writing. Changes that affect fees or the timeline take effect only when both parties approve them in writing.

7. Acceptance and signatures

CLIENT AUTHORIZATION: {{Opportunity.Account.Name}}
Name: ______________________________
Title: ______________________________
Signature: ______________________________
Date: ______________________________

SERVICE PROVIDER: [Your company name]
Name: {{Opportunity.Owner.Name}}
Signature: ______________________________
Date: ______________________________

[FOOTER, centered]
Confidential · {{Opportunity.Account.Name}} · Page {{PAGE}} of {{NUMPAGES}}

Create a Word document with this content. Lines in square brackets and capitals, such as [HEADER, right-aligned] and [TABLE: …], tell you where the text goes; don't type them. Build the table as a real Word table with 5 columns and 3 rows, one cell per |-separated value. The {{TableHide:Opportunity.r.OpportunityLineItems}} tag goes in the header row's first cell, before the #. When the opportunity has products, the tag is removed from the output and the header shows as normal. Replace the other bracketed text, such as [Your company name], with your own wording. Type each {{…}} tag in one go, without changing its formatting halfway, so Word doesn't split it.

API names in your org can differ, especially for the custom date fields. Check each one in the Merge Field Helper when you upload the template (step 2): pick a field from the Account ID lookup to get the Opportunity.Account.… form.

{{Product2.Name}} in the line-item row merges the product's name through the line item's product lookup. {{Name}} would show the opportunity product's own name, which Salesforce builds from the opportunity name and the product name.

2. Create the solution

  1. In the Docs Made Easy app, click Document Setup, then click Launch Wizard.
  2. Enter Generate SOW as the Button Name, select Opportunity and click Create. The Gather Data page opens.
  3. Click Next. The template reads products through the standard Opportunity.r.OpportunityLineItems relationship, and the account and owner through lookups, so you don't need to add relationships here.
  4. Click Add templates and choose Upload a document (before v1.25: Create New Document Template). Enter Scope of Work as the Template Name, upload your Word file and click Save. Then click Next.

For a description of every wizard page, see Create a template with the Document Automation Wizard.

3. Set the behaviors

On the Assign Behaviors page, set these, clicking Save in each panel, then click Next:

SettingValueWhy
Generated File > Convert to PDF?OnSOWs go out as PDF, so the layout can't be edited by accident. See Default PDF.
Generated File > FilenameSOW - {!Opportunity.Name} - {{TODAY}}Each file names the deal and the date it was made, so revisions are easy to tell apart. See Output file name.
Background Mode > Would you like to enable background mode?On, with File (bgm=1) selectedOne click saves the PDF to the opportunity's Files and downloads a copy. The Composer page is skipped. See bgm=1.
Other Parameter > CurrencyCulture1en-USFormats the fees and the total as US dollars, for example $12,000.00. AUTOSUM(ABOVE) needs a currency culture. Use your own culture code. See CurrencyCulture.

4. Add the button

  1. On the last wizard page, click Go to Page Layouts and open Opportunity Layout.
  2. From Mobile & Lightning Actions, drag Generate SOW into Salesforce Mobile and Lightning Experience Actions.
  3. Click Save.

If users still don't see the button, see Users can't see or use the Docs Made Easy button.

5. Generate and check

  1. Open your test opportunity and click Generate SOW. The PDF downloads.
  2. Check the PDF against the opportunity:
    • The client details match the account, and the project lead is the opportunity owner.
    • The project dates match Project start date and Project end date, written like January 5, 2027.
    • The deliverables table has one numbered row per product.
    • Fees show a currency symbol, thousands separators and 2 decimals.
    • The Total equals the opportunity Amount (when the amount comes from its products).
    • The footer shows the right page count, for example Page 1 of 2.
  3. On the opportunity's Related tab, open Files. The SOW PDF is listed.

Your SOW looks similar to this, with your own styling:

Generated two-page scope of work with client details, opportunity details and deliverables tables

Troubleshooting

What you seeFix
{{Opportunity.Project_start_date__c}} appears as text, or a value is blankThe API name is wrong, the field is empty on the record, or you can't see the field. Copy the syntax from the Merge Field Helper and check field-level security. See Merge fields are blank or show as {{…}} text.
The deliverables table is missing, shows one row or repeats wronglyIf the opportunity has no products, TableHide leaves the table out. Otherwise, TableStart and TableEnd must be in the first and last cell of the same row. See Related-list tables are empty, show one row or repeat.
Fees or the total show as 12000 with no symbol, or dates as 2027-01-05CurrencyCulture1 isn't saved on the solution, or the \# or \@ switch is missing from the tag. See Dates, numbers or currency show the wrong value or format.
The PDF's table, fonts or page numbers differ from WordSee The PDF looks different from my Word template.

Take it further