Building Document Templates

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

Please note: Templates cannot have transition effects. If your presentation will use transition effects, add them after you have exported the editable PPTX file.

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
Opportunity: {{recordName}} Account: {{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.

image-20250527-104726.png
Page with expressions
image-20250527-104812.png
Resulting page

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 the if 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
image-20250523-122607.png
Render quantity values if template is quantity based.
image-20250523-122638.png
Resulting page in the PPTX export

xSlide

  • Modify slide page based on the provided parameters.

  • Must be applied as text on the slide.

Syntax
{{xSlide visible=scorecard.isVisible}}
Parameters
  • visible - indicates if page is visible for user or must be removed from the slide deck.

Example
image-20250428-083126.png
Render slide page is visible

xSlides

  • Iterates over provided data and create extra slides on item’s context.

  • Must be applied as text on the slide.

Syntax
{{xSlides scorecard.c filter="isVisible"}}
Parameters
  • order - defines sorting order for processed items.

    • By default there is no sorting done.

  • filter - logical condition that reduces the number of processed items.

Example
image-20250501-215708.png
Iterate over all scorecard categories and render their question/answers.
image-20250501-215900.png
Resulting page in the PPTX export

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 items

    • If 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
image-20250523-122248.png
Renders all scorecard categories vertically with their scores.
image-20250523-122408.png
Resulting page in the PPTX export

xShape

  • Dynamically updates shape based on the provided parameters.

  • Must be applied inside the shape alt text.

  • Parameters can contain reference to data, static text or template expression.

  • All parameters are optional.

Syntax
{{xShape text=dynamic.value textColor="#static_hex_color" fillColor=dynamic.hex.color borderColor=dynamic.hex.color}} {{xShape text=count}} {{xShape text=“{{openCount}} ({{formatPercent (calc this expression=“openCount/count”)}})”}}
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.

  • borderColor - color to fill the shape border.

Example
image-20250527-105343.png
Set score and color for the circle shape
image-20250527-105436.png
Resulting page with score and colors

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

"records": [ { "name": "GenWatt Diesel 1000kW", "quantity": 5, "listPrice": 100000, "unitPrice": 100000, "totalPrice": 500000, "productCode": "GC1060" }, { "name": "GenWatt Diesel 10kW", "quantity": 4, "listPrice": 5000, "unitPrice": 5000, "totalPrice": 20000, "productCode": "GC1020" }, { "name": "GenWatt Diesel 200kW", "quantity": 3, "listPrice": 25000, "unitPrice": 25000, "totalPrice": 75000, "productCode": "GC1040" }, { "name": "GenWatt Gasoline 2000kW", "quantity": 3.5, "listPrice": 150000, "unitPrice": 150000, "totalPrice": 525000, "productCode": "GC5060" } ]

Object

"stakeholders": { "columns": [ { "label": "Name", "value": "name" }, { "label": "Title", "value": "title" }, { "label": "Role", "value": "role" }, { "label": "Relationship", "value": "relationship" }, { "label": "Decision Influence", "value": "decisionStatus" }, { "label": "Support Status", "value": "supportStatus" } ], "rows": [ { "isGhost": false, "name": "Andy Young", "title": "SVP, Operations", "initials": "AY", "color": "#555555", "hasPower": false, "accountName": "Dickenson plc", "role": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "relationship": { "value": "No Contact", "font": { "color": "#c4c4c4" } }, "decisionStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "supportStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } } }, { "isGhost": false, "name": "Jane Grey", "title": "Dean of Administration", "initials": "JG", "color": "#555555", "hasPower": false, "accountName": "University of Arizona", "role": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "relationship": { "value": "No Contact", "font": { "color": "#c4c4c4" } }, "decisionStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "supportStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } } }, { "isGhost": false, "name": "John Bond", "title": "VP, Facilities", "initials": "JB", "color": "#555555", "hasPower": false, "accountName": "Grand Hotels & Resorts Ltd", "role": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "relationship": { "value": "No Contact", "font": { "color": "#c4c4c4" } }, "decisionStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "supportStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } } }, { "isGhost": false, "name": "Tim Barr", "title": "SVP, Administration and Finance", "initials": "TB", "color": "#555555", "hasPower": false, "accountName": "Grand Hotels & Resorts Ltd", "role": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "relationship": { "value": "No Contact", "font": { "color": "#c4c4c4" } }, "decisionStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } }, "supportStatus": { "value": "Unknown", "font": { "color": "#c4c4c4" } } } ] }
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
image-20250527-110149.png
Table with data as array
image-20250527-110457.png
Rendered table with data as array
image-20250527-110213.png
Table with data as object
image-20250527-110330.png
Rendered table with data as object

xImage

  • Replaces rectangle shape with image based on the provided url or base64 data.

  • Must be applied inside rectangle shape alt text.

  • Image is always inside rectangle shape.

Syntax
{{xImage link.to.image fit="true" vAligh="center" hAligh="center"}} {{xImage base64.image.format}}
Parameters
  • fit - defines if image uses rectangle sizes or not.

    • By default image size is used.

  • vAlign - image vertical position, ex. center, top, bottom.

    • By default it is always top.

  • hAlign - image horizontal position, ex. center, right, left.

    • By default it is always left.

Example
image-20250527-110641.png
Relationship map image on place of the rectangle shape
image-20250527-110714.png
Resulting page in the PPTX export

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
image-20250527-110826.png
All elements inside the group can have direct access to the object’s attributes
image-20250527-111000.png
Resulting page in the PPTX export

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=dynamic.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
image-20250527-111705.png
Displays boolean value as checkbox mark
image-20250527-111754.png
Resulting page in the PPTX export

truncate

  • Allows truncation of long text.

Syntax
{{truncate value length}}
Parameters
  • length - represents how many characters are visible before truncating

Example
image-20250527-112409.png
Truncates description to 20 characters.
image-20250527-112451.png
Resulting page in the PPTX export

calc

  • Allows to do math calculation.

  • Supports operations:

x + y

Add

x * y

Multiply

x - y

Subtract

x / y

Divide

x ^ y

Power

abs(x)

Absolute value

ceil(x)

Round floating point up

floor(x)

Round floating point down

max(a, b, c...)

Max value (variable length of args)

min(a, b, c...)

Min value (variable length of args)

round(x)

Round floating point

Syntax
{{calc obj expression="value1/value2"}} {{calc this expression="floor(value1-value2)"}}
Parameters
  • expression - contains math expression

Example
image-20250527-112550.png
Calculate percent ratio.
image-20250523-121555.png
Resulting page with calculated percent ratio.

format

  • Renders value in the proper format.

  • Format can be set with additional parameters.

Syntax
{{format value locale="en-US" style="currency" currency="USD"}}
Parameters
Example
image-20250527-113436.png
Display list price in the EUR currency format
image-20250527-113512.png
Resulting page with formatted currencies.

formatNumber

  • Renders the number in a compact format.

  • Format can be set with additional parameters.

Syntax
{{formatNumber value}}
Parameters
Example
image-20250527-113205.png
Render products list with formatted quantities.

 

image-20250527-113243.png
Resulting page with formatted quantities.

 

formatCurrency

  • Renders the number as currency in a compact format.

  • Format can be set with additional parameters.

Syntax
{{formatCurrency value}}
Parameters
Example
image-20250522-133426.png
Render products list with formatted currencies.
image-20250522-133523.png
Resulting page with formatted currencies.

formatPercent

  • Renders the number as percent.

  • Format can be set with additional parameters.

Syntax
{{formatPercent value}}
Parameters
Example
image-20250527-112550.png
Display percent ratio.
image-20250523-121555.png
Resulting page with percent ratio

scFormattedAnswer

  • ClosePlan only related helper.

  • Allows format scorecard answers by simply providing question datapoint.

Syntax
{{scFormattedAnswer scorecard.c.AccountOverview.q.Question1}} {{scFormattedAnswer this}}
Example
image-20250508-140026.png
Render scorecard answers in the formatted way.

 

image-20250508-140211.png
Resulting page with formatted scorecard answers.

 

Building PPTX Template Additional Notes

  • {{this}} is used to reference the current context within a template, usually within iteration over loop.

  • @root is used to reference the parent context.

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

    • Overflow will need to be manually adjusted after export.

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

    • Text overflow will need to be manually adjusted after export.

  • PowerPoint does not support html, meaning Rich Text answers 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

image-20250205-091313.png

Best Practices

  • Avoid using large resource files (ie: high resolution images or videos), smaller templates will have better rendering performance.

Sources

  • PowerPoint Template:

  • Data: