Building Document Templates
Overview
To export Account Plans and Opportunity ClosePlans in PPTX and DOCX formats, Templates must be created.
Export to PPTX and DOCX is in beta as of March 2025. If you wish to use this feature before it is generally available, please contact your CSM to activate beta features for your Org, or send an email to Support@people.ai
Create PowerPoint PPTX Template
Creating a PowerPoint template involves designing a .pptx file with expressions that will be dynamically replaced by data.
The PowerPoint template will allow the rendering engine to populate the Export with dynamic data, making it perfect for reports, sales presentations, business summaries, EBRs and more.
Step 1: Setup Slides
Open Microsoft PowerPoint (recommended) or any app that supports .pptx files (Google Slides, LibreOffice, etc.)
Create a basic slide setup:
Choose a theme or create a full customization if you want a specific design.
Add the necessary elements according to your needs (titles, content, tables, shapes or other layout components).
Step 2: Add Dynamic Expressions
The rendering engine replaces content dynamically according to expressions enclosed by double curly braces{{}}
. In the below example, recordName
and accountName
are variables that are enclosed by double curly braces, which is said to be an expression.
Example
Account Plan: {{recordName}}
{{accountName}}
Click anywhere on the slide and type the expression.
Expression can use datapoint or built-in helpers.
Expressions are case sensitive.
Expression can have dot-separated paths, like
{{path.to.variable}}
.Adjust the font size, color, and alignment as needed.
List of Built-in Helpers
Built-in Helpers are used inside templates to apply custom logic and formatting. Helpers can even dynamically produce layout elements directly within the expressions.
Example of correct syntax:
{{helper_name value param1=paramValue param2=paramValue ...}}
The return value of the Helpers is inserted at the place it was called. Each Helper has a unique syntax and purpose.
Below is the list of available Helpers and what they do.
if / else / unless
Conditionally renders a block.
If argument returns
false
,0
, or empty string, the block will not be rendered.unless
helper as the inverse of theif
helper. Its block will be rendered if the expression returns a falsy value.
Syntax
{{#if value}} show_value_if_true {{else}} show_value_if_false {{/if}}
{{#unless license}} show_value_if_false {{/unless}}
Example
xEach
Repeats content for the collection or object of properties based on the provided parameters
Must be applied inside alt text for any element that needs to repeated.
Parameters can contain reference to data or to static text.
All parameters are optional.
Syntax
{{xEach arr dir=”x” repeat=”4” limit=”12” mx=”0.5” my=”1” order=”attribute DESC”}}
{{xEach obj dir=”y” repeat=”3” limit=”12” order=”attribute ASC” filter=”(prop1 = 'value1' AND prop2 IN ('value2','value3'))”}}
Parameters
dir
- indicates the direction to repeat.x is default and means horizontal direction
y is vertical direction.
repeat
- indicates how many repetitions before moving to the next line.If the property is not defined it will be calculated dynamically based on the content and slide sizes.
limit
- the maximum number of itemsIf not defined, the default value is 12.
mx
- horizontal margin value between items.If not defined, it will be calculated dynamically to place items proportionally.
my
- vertical margin value between items.If not defined, it will be calculated dynamically to place items proportionally.
order
- defines sorting order for processed records.By default there is no sorting done.
filter
- logical condition that reduces the number of processed records.
Example
xShape
Dynamically updates shape based on the provided parameters.
Must be applied inside the shape alt text.
Parameters can contain reference to data or static text.
All parameters are optional.
Syntax
{{xShape text=dynamic.value textColor="#static_hex_color" fillColor=dinamic.hex.color}}
Parameters
text
- text which will be inserted inside the shape.Configured text styles for shape will stay.
textColor
- color for the text.fillColor
- color to fill the shape.
Example
xTable
Builds tables based on the provided data and parameters.
Must be applied inside the table alt text.
Table and cells can be styled in the template.
Configured styles are respected unless instructed to override.
Cells can be styled based on the provided value inside the data.
These instructions will override predefined template table styles.
Helper data (rows
, tblObj
) can be either an array of rows or objects with full table description (columns and rows).
Data
Array
"customRows": [
{
"name": "Dima",
"age": 37
},
{
"name": {
"value": "Pavlo",
"bg": "#eb4034"
},
"age": {
"value": 37,
"bg": "#fcba03",
"font": {
"size": "14",
"bold": true,
"color": "#000000"
}
}
},
{
"name": "Ivan",
"age": 30
},
{
"name": "Andriy",
"age": {
"value": 40,
"font": {
"size": "14",
"bold": true,
"color": "#000000"
}
}
}
]
Object
"customTable": {
"rows": [
{
"name": "Dima",
"age": 37
},
{
"name": {
"value": "Pavlo",
"bg": "#eb4034"
},
"age": {
"value": 37,
"bg": "#fcba03",
"align": "right-center",
"font": {
"size": "14",
"bold": true,
"color": "#000000"
}
}
},
{
"name": "Ivan",
"age": 30
},
{
"name": "Andriy",
"age": 40
}
],
"columns": [
{
"label": "Name",
"value": "name",
"bg": "#000000",
"size": "10%",
"align": "right-top",
"font": {
"size": "14",
"bold": true,
"color": "#FFFFFF"
}
},
{
"label": "Age",
"value": "age"
}
]
}
Syntax
{{xTable rows filter="(prop1 = 'value1' AND prop2 IN ('value2','value3'))"}}
{{xTable tblObj order="attribute ASC"}}
Parameters
order
- defines sorting order for processed rows.By default there is no sorting done.
filter
- logical condition that reduces the number of processed rows.
Example
xImage
Replaces rectangle shape with image based on the provided url or base64 data.
Must be applied inside rectangle shape alt text.
Image size is based on the original rectangle shape size.
Syntax
{{xImage link.to.image}}
{{xImage base64.image.format}}
Example
xWith
Navigates to a specific variable of object so all nested shapes can access props directly.
Useful if JSON object contains deeply nested properties, and you want to avoid repeating the parent name.
Must be applied inside element alt text.
Syntax
{{xWith obj}}
Example
xCheck
Renders checkbox mark based on a true or false value.
Must be applied inside rectangle alt text.
Parameters can contain reference to data or static text.
All parameters are optional.
Syntax
{{xCheck value trueColor=dinamic.hex.color falseColor=”#static_hex_color”}}
Parameters
trueColor
- represents color of the true check mark.Default value is
#81BB42
.
falseColor
- represents color of the false check mark.Default value is
#DF2E28
.
Example
truncate
Allows truncation of long text.
Syntax
{{truncate value length}}
Parameters
length
- represents how many characters are visible before truncating
Example
Building PPTX Template Notes
{{this}}
is used to reference the current context within a template, usually within iteration over loop.Always define Helpers from the nested component to the upper.
If you need to process a group inside another group, the nested group must be defined first.
The source data for the nested expression is the upper data.
e.g. you have hierarchy of groups and objects
{scorecard.categories[n].questions[n].score}
.The upper group will iterate over
{{xEach scorecard.categories}}
The nested group will iterate over
{{xEach questions}}
.
Content can overflow slide sizes, please be aware of this.
PowerPoint table cells can only contain text.
PowerPoint table cells cannot hold images, shapes, or other tables.
PowerPoint cell text overflow cannot be detected during generation, please be aware of this.
PowerPoint does not support html, meaning rich text will be rendered as plain text without formatting.
Create Word DOCX Template
Work in Progress, this functionality is not available at the moment.
For any questions, please email to mailto:support@People.ai
Limitations
MSWord Cover page is not currently supported. As a workaround, use a standard page to be the Cover Page
Best Practices
Avoid using large resource files (ie: high resolution images or videos), smaller templates will have better rendering performance.
Sources
PowerPoint Template:
Data: