Create Your First PowerPoint Template
Create a Microsoft PowerPoint template, add S-Docs syntax, upload the file, and test PPTX generation.
What You'll Learn
Create a PPTX template record for S-Docs
Generate Microsoft template syntax from the template editor
Place bracketed merge fields into a PowerPoint presentation
Add conditional logic and related list syntax to a PPTX file
Upload the finished PPTX file and test generation
What You'll Build
In this tutorial, you will build a simple PowerPoint-based quote template for Opportunity.
By the end, you will have:
A PPTX template record tied to
OpportunityA PowerPoint presentation with bracketed S-Docs merge fields
A conditional note that appears only for one stage
A related list pattern you can paste into a PowerPoint table
A finished PPTX file uploaded back to S-Docs
Estimated time: 20 minutes
Prerequisites
Before you start, make sure you have:
Access to S-Docs Templates in Salesforce
Permission to create or edit templates
Microsoft PowerPoint or another editor that saves valid
.pptxfilesOne test
Opportunitywith an Account, Stage, and AmountBasic familiarity with merge fields such as
{{!Opportunity.Name}}
PPTX syntax follows the same Microsoft template pattern used by DOCX and XLSX templates.
Step 1: Create the PPTX template record
Start by creating the Salesforce template record before you build the PowerPoint file.
Open the App Launcher.
Search for
S-Docs.Open S-Docs Templates.
Click New.
Set Related To Type to
Opportunity.Set Template Format to
PPTX.Enable Enable New Microsoft Template Upload.
Click Save.
This record gives you a place to configure settings and generate the syntax you will paste into PowerPoint.
Step 2: Open the template editor and generate syntax
The template editor is your syntax builder for Microsoft templates.
Open the new template record.
Click Template Editor.
Use Insert Field to choose the fields you want in the presentation.
Copy each generated value from the output box.
For PPTX templates, merge fields, related lists, and conditional blocks must be enclosed in square brackets.
If you need literal bracket characters in the presentation, use BRACKETOPEN and BRACKETCLOSE.
Step 3: Build the presentation body in Microsoft PowerPoint
Now create the visible presentation in PowerPoint.
Start with a simple quote title and summary slide.
Paste this pattern into your PPTX file:
What you just did:
Added basic merge fields for the base record
Used the bracketed Microsoft template syntax
Created a working first version before adding logic
Step 4: Add one conditional block
Use conditional logic when part of the presentation should appear only for some records.
Add this block below the summary:
What you just did:
Added a stage-based rule to the PPTX file
Kept the full conditional block inside bracketed Microsoft syntax
Created one safe pattern you can reuse with other fields later
Step 6: Upload the PPTX file to the template
Upload the finished PowerPoint file back to the S-Docs template record.
If you are using S-Docs Summer 2025 (v10.0) or later:
Return to the template record.
Click Upload Files.
Select the
.pptxfile.
If you are using an earlier version, upload the file from the template editor.
Once the upload completes, the template is ready for generation.
PPTX templates with Enable New Microsoft Template Upload checked are not compatible with legacy custom button generation.
They can only be generated through S-Docs LWCs or the SDK.
Step 7: Generate a test document
Test the template with a real Opportunity record.
Open a test opportunity.
Generate the PPTX template.
Download or preview the generated file.
Verify the output.
Check these results:
The account and opportunity names resolve correctly
The stage and amount display real record values
The conditional note appears only when the stage is
Proposal/Price QuoteNo raw S-Docs syntax appears in the presentation
Common PPTX syntax patterns
Use the patterns below when you expand the template.
Merge field syntax
PPTX templates require brackets around merge fields.
Use Insert Field in the template editor to generate the syntax.
Then:
Select the field.
Apply any formatting.
Copy the generated syntax.
Paste it into Microsoft PowerPoint.
Related list syntax
To insert a related list into a PPTX template, generate the related list syntax and paste it into a prebuilt PowerPoint table.
Use Insert Related List at the top of the template editor to build the related list.
When the related list is ready:
Open the Get Related List tab in the related list menu.
Copy the generated source.
In PowerPoint, create a styling table with:
a header row with your intended header text
an odd row
an even row
Paste the related list code into the cell in the first column under the header.
The same related list placement pattern used in Microsoft Word templates also applies to PPTX.
Conditional logic syntax
Use Insert Conditional Logic at the top of the template editor to open the logic builder.
Build the condition, then copy the generated output into PowerPoint.
If the rendered content contains merge fields, those merge fields must also be enclosed in brackets.
Do not place RENDER tags on the same line as the LINEITEMS block.
Additional syntax
Rich text images
To display images stored in rich text fields, use three curly braces instead of two.
To adjust image dimensions:
Open the Document Options tab in the template editor.
Scroll to Other Options.
Enter the size in Rich Text Image Dimensions.
This setting controls the size of all images merged into the PPTX template from rich text fields.
Named queries
If you use named queries in a PPTX template, convert them to the bracketed Microsoft template syntax.
If the named query looks like this:
Update it to this:
PPTX templates support named query filter and offset.
Common Issues and Solutions
"The presentation shows raw merge field syntax"
Check these items:
Confirm each merge field is wrapped in square brackets
Confirm the merge field itself still uses
{{! ... }}Reupload the PPTX file after fixing the syntax
"The presentation generates, but values are blank"
Check these items:
Confirm the template uses Related To Type
OpportunityConfirm the test record has values in the fields you used
Recopy the field syntax from Insert Field if needed
"The conditional note never appears"
Check these items:
Confirm both
RENDERtags are wrapped in square bracketsConfirm the compared value matches the record value exactly
Test the same record value directly in the presentation first
"My related list formatting looks wrong"
Check these items:
Confirm the related list code was pasted into the first cell under the header
Confirm the PowerPoint table includes header, odd, and even rows
Regenerate the related list syntax after query changes
"My latest PPTX changes do not show up"
Check these items:
Save the PowerPoint file before uploading it
Upload the newest version of the
.pptxfileGenerate a new document after each upload
"PPTX generation is not available"
Check these items:
Enable Enable New Microsoft Template Upload on the template
Confirm the template was uploaded as a
.pptxfileGenerate through an S-Docs LWC or the SDK when the new Microsoft upload flow is enabled
What You've Learned
✅ Created a PPTX template record for Opportunity
✅ Used the template editor to generate Microsoft template syntax
✅ Added bracketed merge fields to a PowerPoint presentation
✅ Added conditional logic and related list patterns
✅ Uploaded and tested a PPTX template in S-Docs
Next Steps
Use Template Attributes Tutorial to format values inside the presentation.
Use Getting Started with Conditional Logic to add more conditions.
Use Creating Your First Named Query to reuse query results in Microsoft templates.
Use Build and Upload a DOCX Template if you also build Word templates.
Use Add S-Docs Lightning Components to a Record Page to expose the template for record-page generation.
Practice Exercise
Build a second PPTX template for Opportunity that includes:
A title with
Opportunity.NameA customer line with
Opportunity.Account.NameA stage-based conditional note
A related list placeholder in a PowerPoint table
One test generation from a real record
Bonus challenges:
Add one more merge field from a related record
Add a named query to the PPTX file
Rebuild the same pattern for
Account
Last updated
Was this helpful?

