Step By Step Part 2. From Installing the Package to First Aveneer Document

Sep 11, 2025

Welcome to part two of our step-by-step guide! In the previous part, we explored Aveneer installation and configuration process. Now it’s time to meet the star of the show: Aveneer templates. Aveneer lets you generate documents from either DOCX or XLSX input templates, producing outputs in DOCX, XLSX, or PDF formats. In this post, we’ll focus on preparing templates using a DOCX base file.

Create DOCX template with tokens

A properly prepared DOCX template is the backbone of every document generated with Aveneer. How you set up your input file directly affects the appearance and structure of the final document. DOCX templates can include static text, dynamic Salesforce data, images, custom formatting, and more.

To display dynamic data in the final document, your DOCX template must include the appropriate Aveneer tokens. These tokens represent the information that will be inserted from Salesforce records or from the general context (such as the current date or time). Tokens are placed in the document using double curly braces, like {{token}}, and are later mapped to Salesforce data in the Template Configuration (you’ll learn more about this process later in the post).

There are several types of Aveneer tokens:

    • Value tokens – the name of the token is set in {{tokenName}} format. If it contains the API name of a field, then later on, after the docx template is uploaded into the Template Configuration record, that token will be automatically mapped to the correct object’s field. Otherwise, it will require manual mapping.
    • Table tokens – used to display data retrieved from selected child object’s records.
    • Image tokens – allow inserting an image into a document, using several different types of formatting.
    • Condition tokens – added in the form of a text, dependent on the defined condition logic utilizing {{if / else}} format.
    • Standard system tokens – automatically replaced with context data, such as date or time. They do not require manual mapping.
    • Boolean tokens – checkboxes.
    • HTML tokens – allow to retain any additional formatting applied to Rich Text Fields.
    • Number tokens – decide the way numbers are displayed by including additional formatting to define the thousand separators and number of decimal places.
    • Date tokens – decide the way dates are displayed by adding additional formatting to the token value. Any valid DateTime format compatible with Java Datetime Format is supported.
    • Function tokens – work in a similar way to roll-up fields. They execute calculations on selected fields of a child object and its records. 
    • Signature tokens – used for the e-signature process.

You can read about all the token types in more detail in the Aveneer documentation. Once you have your DOCX ready, you can navigate to your preconfigured Salesforce org to complete the template setup.

Create Template Configuration record

Template Configurations is the main object in Aveneer. It defines the properties, the outline, and the data of generated documents. After a Template Configuration record is set up, it is possible to either save it as a draft, or save and activate it. Please note that only saving and activating a Template Configuration record will make document generation possible.

To create new Template Configuration, go to the Aveneer app and select Template Configurations > New > Template Configuration. In the New Template Configuration modal populate the appropriate fields:

FIELD NAME REQUIRED FIELD DESCRIPTION
Object API Name Yes Template base object.
Document Type Yes PDF, DOCX or XLSX format of a generated document.
Is PDF Protected* No Protects a document with a password. A new token is added under the Configuration section where a password can be defined. Note that the preview of protected files is not available.
Additional Unprotected PDF* No When a PDF protected document is generated, an additional unprotected PDF file can be generated as well.
PDF Protected Name Prefix* No Adds a prefix to the protected document’s name.
Attach As Yes File or Attachment type of generated document.
Merge to Single Document No Option to merge documents generated from a list of records into one document.
Skip Assignment Rules No Ignore Assignment Rules related to the given Template Configuration record. Note that If the box is not checked and there are no Assignment Rules assigned to the Template Configuration record, then the document generation will not be possible. 
Use Labels in Picklist No Decide whether you want to pull the API names of the picklists/multi-select picklists values or their labels.
Notification Type No Type of the notification received after successful document generation.
Error Notification Type No Type of the notification received after failed document generation.
Document Name No Name of the generated document. It can contain any token included in the uploaded docx template. Although not marked as a required field, a Template Configuration record cannot be activated with this field having no value.
Description No Template Configuration description.
*Fields appear only after Is PDF Protected is checked. Protected and Unprotected versions of the document cannot be generated separately.

After creating a Template Configuration record, the next step is to upload a previously prepared DOCX template. Such template should be the final version of the target document, but with Aveneer tokens in places where you want to retrieve and insert Salesforce data. To do so, click the “Upload Template” button on the Template Configuration record page, and then follow the instructions displayed on the screen.

Map Aveneer tokens

After uploading the docx template, the next step is to correctly map Aveneer tokens to appropriate Salesforce data (fields) under the Configuration section. Verify the mappings which were done automatically and set correct mapping for the remaining, unmapped tokens. When manually mapping Aveneer Tokens, you can choose from the following mapping methods:

    • Object – this method allows mapping Aveneer Tokens directly to Salesforce fields. You can choose to map tokens to the main Object’s fields or its parent Objects’ fields.
    • Method – to retrieve data from Method source, first an Apex Class with TemplateApexDataProvider interface implementation has to be created by an Administrator.
    • Global – retrieves data from a Global Token Configuration. If a token name in the docx template matches the token name in Global Configuration, then that token is automatically mapped to the correct Global Token Configuration after template upload.
    • Text – fixed string of text displayed in the generated document.
    • Current User – method retrieving data from the User generating the document.
    • Manual – used in the signing process, allows a specific signing party to populate a field during the signing process. Does not require mapping to any defined Salesforce field.

Generate your first Aveneer document

Once your Template Configuration record is complete and active, you are ready to generate your first document! Navigate to the Salesforce object from which you want your document to be generated. There, you have two options: either generating from a single record, or doing it in bulk. For now, let’s focus on an individual record of your choice. Select the appropriate record from the object list view and on the record page click the “Generate Documents” button (if you don’t see the button on the record page, refer to the Button Configuration section of the Aveneer documentation).

Select the templates you want to use for document generation and click “Generate” at the bottom of the page.

After clicking the “Generate” button, the document generation process will be executed. Its progress is represented by the “Transaction in progress” bar. The bar displays the total number of documents that are being generated and the current completion percentage:

Additionally, you have the ability to use the “Manage Generated Documents” button which allows you to either download or delete documents directly from the generation page. Documents can be downloaded/deleted individually or in bulk. Generated documents are later stored on the selected record’s Notes & Attachments related list.

And that’s it, that’s your first document generated using Aveneer! If you want to play more with different functionalities and optional steps, you can dive into the Aveneer documentation. Alternatively, you can start with one of our suggestions described below.

Summary

Once you’ve configured your first document template in Aveneer, the possibilities are endless! You can easily create additional configurations to meet your business’s diverse needs. And this is just the beginning – follow us for more technical content to learn how to set up the signing process and post-generation actions in Aveneer.

Not an Aveneer user yet? Book a demo to discover everything else we have in store for you!

    Aveneer