Gonexa University

We're going to go through 3 simple steps to achieve this:

  • Creating the basic configuration in Salesforce
  • Word document design
  • Loading the model into Salesforce to make it available to users

Prerequisites
✓ Complete installation of the Gonexa Package
✓ Basic knowledge of Microsoft Word or Google Docs
✓ Updated application to a recent version

Basic Setup in Salesforce

STEP #1
Basic creation of the new template
  • Click on the “Document template” tab
  • Click on “New”, by default you create a “Main” template
  • Give the model a name: It will appear to the user if several models are present on the same Salesforce object
Selecting the main object

What is the main object?
It is the Salesforce object from which you want to trigger the generation and the base context for creating a document and retrieving the data to display in the template. It can be standard, custom, or from another Salesforce application.

  • Choose the main object: the Salesforce object will be the starting point for the generation, it is the basic context for creating a document
  • The tag label is automatically populated with the object's API name, but you can change it to make your document model easier to understand.

Example
You can rename the label Opportunité_Gonexa_2026__c to Opp to make the tags inserted into the template easier to understand and shorter.

Generated file settings

Tip
To have a more personalized filename like "Quote-{Today's Date} {Quote No.} Account Name," consider creating a formula field on the main object and setting it as a suffix.

  • Enter the prefix you want to give to the generated document names. This is fixed text that will form the first part of the filename.
  • Define the suffix and choose a field on the main object that will dynamically form the second part of the filename.
Version policy
  • Select the versioning policy you would like to apply to this document template from the 3 options provided.

VERSION CONTROL POLICIES

New file

With each new generation on the same record, a new file will be created.

Allows you to keep the entire history.
New version

With each new generation on the same record, a new version of the same file will be created.

Recommended if you want to maintain traceability while keeping only one file.
Clear and replace

With each new generation on the same record, the new file will overwrite the old one.

Useful for optimizing storage and keeping only one file.
Selecting the type of generation
  • Select the available output formats to apply from the options.

AVAILABLE FORMATS

Original format & PDF

Gives the user the option to generate their document in the original format (Word, PowerPoint, Excel) or as a PDF.

Original format only

The user will only be able to generate the document in its original format, i.e., Word, PowerPoint, Excel, or PDF.
PDF only

The user will only be able to generate the document in PDF format, without the ability to edit it. [Most popular]
Select generation type
  • Select the generation type to apply from the options.

GENERATION TYPES

Synchronous

Generates a document immediately and redirects you to the document once it is ready. [Most popular]

Future

Generates the document asynchronously. This means the action will run in the background. With future generation, you will not be redirected to the document, and you will need to refresh the page to view it.
External

Allows for the generation of very large and complex documents on Gonexa servers. In this case, you will not be redirected to the document, and you will need to refresh the page after a few seconds to view it. [Requires a specific license]
  • Save

The basic settings have been configured. You can proceed directly to building by creating the template. However, if you wish to add tags to child objects, please create them first before moving on to the design and tag insertion phase.

Creating child objects

What is a child object?
Optional, adding one or more child objects allows you to display a list associated with the main object, such as opportunity products, items, or account contacts, in a table format.

  • Go to the “Gonexa Assistant” component to access the creation of child objects
  • Click on “+ Child object”
  • Select the relevant Salesforce object
  • The label defaults to the object's API name, but you can modify it in the template for greater clarity.
  • Add a filter if you want to filter the child records to be retrieved
  • Add a sort if you wish to apply one to the results in the child table.
  • Finish this section by clicking "Create".

For more details on children's objects, go to the article Manage tables

Design in Word

STEP #2

Tip
You can start with a document template you already have or download a Gonexa template directly from our library of pre-designed templates: Pre-designed templates

Create the static part of the document
  • Make sure to layout your document completely on the part that will not change at the time of generation
  • Simply provide tables in your word for everything that will concern “Child Objects” (ex: Opportunity Products)
Open the Assistant
  • In the template document, click on “Access Tags” in the Gonexa Assistant component
  • Allow the assistant to communicate with your Salesforce (to be done only once)
Inserting tags from the Assistant

Tip
Position the assistant in a corner of your screen next to your Word template to keep it within reach.

  • Click on the object in the Assistant to display the available fields
  • Use the search bar to filter

    You can also click the arrows to navigate between object relationships and search for information linked to the main object to traverse the relationships.

  • Click on the desired field (this field is copied to your clipboard)
  • All that's left to do is paste to the desired location in your document
  • Configure the formatting of the tag with the Word standard (size, color, alignment, bold...)
Save the word to your computer
  • Make sure to save your word template in a clean directory to find it easily
  • For users of the Google Workspace suite with Google Doc, save your template in the format Word (.docx)

Note
File size is limited to 3MB by Salesforce standards. 

Consider optimizing your file size to ensure it loads efficiently, which will improve generation times and save storage space in your org.

Publish your template

STEP #3
Adding the template to the template document

Note
Only docx, xlsx, pdf, or pptx file formats are supported.

  • Go back to setting up the document template in Salesforce
  • Click on “Add a template”
  • Select on your word template from the file explorer
  • Click on “Open”
  • Wait a few seconds for the success message to appear
Typical mistakes
  • If a red dot and incorrect tags appear, a Merge Field icon allows you to check and verify the erroneous tags so you can correct them in your Word document.
Document preview

The Preview feature allows you to validate the layout and dynamic elements of a template by providing an accurate preview of the final document before full generation.

  • In the Generation Test section, search for the name of a record in your main object to find a record
  • Click on the action arrow then choose “Preview”
  • The document opens in a new tab with the data of the selected record
Testing the generation

Tip
Generations in Sandbox are not counted. Test without limits!

  • Enter the name of a record of your main object to find a record
  • Click on “Generate”
  • A document is then generated and you are redirected directly

Your template is now available for generation by anyone who has the "Gonexa Doc Users permission sets" assigned.

Return to your main object to see the template available for generation via the generation component.

Quickly access the content and the generated document
  • From the “Generation Logs” tab, find the generations of your document template
  • Access the Log of your choice, click on Record to access the generation record
  • And click on Document to access the generated file

If a log error occurs, no document is generated.

Salesforce document preview management [OPTIONAL]

Your generated document appears in the standard Salesforce preview by default. You can override this with the Gonexa preview.

Tip
The Gonexa Preview component provides faster PDF previews and access to various controls like quick print, zoom, or one-click document download.

  • From your generated file page, click "Edit page"
  • From the custom components panel, drag and drop the "Gonexa - File Preview" action onto the page where you want it to appear.
  • Save

Note
If a user cannot see the generated template when creating a document, check the document template sharing rules. If it is set to private, access to the template may be blocked. If no sharing rules have been created, we recommend setting the template sharing parameter to public read-only.

Filter template visibility

STEP #4

Make document generation available based on criteria related to your main object.

Create a visibility condition
  • Access template settings
  • Go to the "Filter template visibility for users" section
  • Set your desired condition(s) and click "Submit"
  • As a result, only models that meet the defined criteria will appear in the standard generation component

For example
You can make contract template A available only for quotes above a certain amount, or set template B for key accounts and template C for suppliers.

Tip
You can add as many conditions as needed and choose whether they must all be met (AND) or if only one needs to be met (OR).