Gonexa University

Initial training


The Gonexa Doc solution is Gonexa's historic solution for generating a document from a template in the format .docx. xlsx .pptx .pdf

Installing Gonexa

This first step will guide you through the installation steps of our generation solution

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

  • Install our application via the AppExchange
  • Give access to users and to yourself
  • Secure the solution with a key
  • Make the link between Gonexa and Salesforce
  • Make the generation button available to users

Prerequisites

BEFORE STARTING
  • Have the rights to install a package on the target environment
  • Have an account on the AppExchange

Install the package via the AppExchange

STEP #1
Access to the Gonexa page on the AppExchange
  • Click on The following link to access the Gonexa Doc application on the AppExchange, the Salesforce marketplace that allows you to view, download and install our Gonexa Doc application.
  • Click on “Get In Now”
Connect to your AppExchange account
  • Connect to your Salesforce by clicking “Log In”
  • Choose Salesforce and then enter your credentials
  • Choose the Production environment or the Sandbox (recommended before going into production)
  • Enter your username and password
  • Click on “Connect to Salesforce”
Installing the package
  • Select the “Install for Admins Only” option (rights will later be assigned via permission sets)
  • Click on “Install”
  • Accept the terms and click on “Confirm and Install”
  • Click on “Finish to continue.”
  • Once the application is installed, you will receive a successful email notification letting you know the installation was successful.
Verify that the package is properly installed

You can check this from Setup.
From the tab, go to the “Installed Packages”

Give access to users and to yourself

STEP #2
2 levels of rights for Gonexa Doc
  • Gonexa Doc User: Allows you to generate a document
  • Gonexa Doc Admin: Allows you to generate a document + template administration
Authorization set
  • Go to Salesforce Setup
  • Search for “Authorization Set” or “Permission Sets”
  • Click on the letter “G” to access the rights offered by Gonexa
Assigning authorization sets
  • Click on the desired authorization set
  • Click on “Manage Assignments”
  • Click on “Add Assignment”
  • Select the user and click next to finalize

Retrieve the security key

STEP #3
Access to the security key manager
  • Go to the Salesforce application launcher to find “Gonexa Administration”
  • Click on “Security Key Management”
  • Allow access via the “Allow” button
Key generation
  • In the “API keys” section, click on “Generate” to get your key (note that this key is unique for your production). Another key, common to all sandboxes, should also be filled in.)
  • Carefully keep this long character string that is your security key

Make the link between Gonexa and Salesforce

STEP #4
Access via the Gonexa Administration application
  • Go to the Salesforce application launcher to find “Gonexa Administration”
  • Click on “Named Identifiers” in the “Gonexa Doc Solution Authorization” section
Create a new ID called “inherited”

Attention, Here you must click on the arrow next to New to click on “New Inherited” and enter the following information:

Label:

Gonexa Doc (case sensitive)

Name:

Gonexa_Doc (case sensitive)

URL:

Production : https://api.exadoc.gonexa.fr

tes Copy URL

URL

Sandbox : https://api.exadoc-test.gonexa.fr

tes Copy URL

Identity type:

Named principal

Authentication protocol:

Password authentication

User name:

Gonexa

Password:

[Security key retrieved in the previous step. Unique key for a production environment. Same key for all your Sandbox or Dev environments]

Generate an authorization header:

checkbox-unchecked

Allow merge fields in the HTTP header:

checkbox-checked

Allow merge fields in the HTTP body:

checkbox-unchecked

Outbound network connection:

checkbox-unchecked

Position the generate button

STEP #5
Using the lightning component on the page (recommended)
  • Go to the context where you want to see the component displayed (opportunity, quote,...)
  • Change the lightning page layout by clicking on “Edit page” by clicking on GD
  • Look for the “Gonexa - Generate Document” component
  • Drop the component into your page
  • Save & activate the page for the desired profiles or applications.
Using the “button” at the top of the page
  • Go to the object manager where you want to see the generate button displayed
  • Click on the “Buttons, links and actions” section
  • Click on “New Action”

Type of action:

Lightning component

Lightning component:

GNX: GenerateDocument

Label:

[Text that appears to the user]

Name:

[Automatic]

  • Don't forget to drop the action into the desired presentation page

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

  • Creating the basic configuration in Salesforce
  • Word document design
  • Upload the template to Salesforce to make it available to users

Prerequisites

BEFORE STARTING
  • Have done the complete installation of the package
  • Master the basics of Microsoft Word or Google Docs

Basic Setup in Salesforce

STEP #1
Basic creation of the new template
  • Click on the “Document Template” tab
  • Click on “New”
  • Choose the type of template: Main for a typical template, Associate for appendices, or Translation to translate a main template that has already been done
  • Give the template a name: It will appear to the user if several templates are available on the same Salesforce object
  • Choose the version management policy to help optimize Salesforce storage
  • Check the correct desired output formats while remaining consistent with the format of the future template
  • Other configuration items are optional, you can save
Selecting the main object

The main object is the starting point for generation, it is the basic context for creating a document.

  • Click on “Choose the main object”
  • Find the Salesforce object that you want to start building from
  • The tag label is automatically fed with the object's API name, but you can change it to make your document template easier to understand.
  • Define the prefix, we expect here a text that will be frozen for all generations and that will make up the first part of the file name
  • Choose a field on the main object for the suffix that will compose the 2nd part of the file name dynamically this time (Tip, you can create a formula field on the main object to have a more personalized file name)
Creating child objects

Child objects are items that are linked to the main object. These are the “lists associated” with your main object. For example, we will have the “Opportunity Products” linked to an opportunity.

Important, it is not mandatory to have a child object to allow a generation. Only the main object is mandatory.

  • Go to the “Objects” tab next to “Journals” to access the creation of child objects
  • Click on “New”
  • Choose the relevant Salesforce object
  • The label is fed by default, but you can change it for greater clarity in the template.
  • Finalize this part by clicking on “Create”

Design in Word

STEP #2

You can start from a document template that you already have or download a pre-designed template directly accessible via our page: 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 “Assistant” at the top right of the page
  • Allow the assistant to communicate with your Salesforce (to be done 1 time only)
  • Set the window that opened with the main object and the child objects to the correct size
Inserting tags from the Assistant

You will need to know what information you want to dynamically generate in your template.

  • Click on the object in the Assistant to display the available fields
  • Use the search bar to filter
  • 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
  • You can also click on the arrows to navigate between object relationships and search for information related to the main object (move up relationships)
  • 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)

Important : It is recommended to keep the weight of the file as small as possible to optimize the generation

Publish your template

STEP #3
Adding the template to the template document
  • Go back to configuring 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
  • Make sure your template is in one of the following formats: “.docx” “.pptx” “.xlsx” or “.pdf”
  • Check the “Merge Fields” tab if there is a red dot to see if a tag is not properly formalized or if the field in Salesforce does not exist
Template testing
  • This part is important to validate that the template works well as expected.
  • Provide the name of a record from your main object (e.g. ABC Opportunity) to find a test record
  • Click on “Test template”

Your template is now available for generation to anyone who has the “Gonexa Doc Users permission sets”

Managing the document preview

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

  • From the page of your generated file, click on edit the page
  • From the custom components, drag and drop the Gonexa - File Preview action onto the page

    💡 Tip, thus give your users access to useful commands such as printing, zooming, or quickly downloading the generated document.

  • Save

    ⚠️ Attention, Si lors dela génération du document, l'utilisateur ne peut pas voir le modèle généré référez-vous à la gestion des règles de partage du modèle de document ;s'il est en privé l'accès au modèle peut être bloqué si aucune règle de partage n'a pété créé, nous vous recomandons de passer le paramètre de partage du modèle à public lecture seule.

We are going to travel in 3 simple steps to design a Word document:

  • Structuring the document
  • Add content
  • Organize information

Prerequisites

BEFORE STARTING
  • Have a Microsoft Word license

Structuring the document

TIP #1

Create a stable, consistent, and clean document by first structuring your document.

See hidden layouts
  • Activate spaces, line breaks, page breaks and section changes by clicking on the “show formatting marks” symbol from the home tab
Design document appearance
  • From the Insert tab, choose the orientation of the document or section
  • From the Design tab, choose the color of the background, its borders, watermarks...
Define margins
  • From the Layout tab, choose the margin format: default or custom

💡 Change spacing by hand with horizontal and vertical rulers

Add content

TIP #2

Create a stable, consistent, and clean document by first structuring your document.

Managing font settings
  • Set your titles, subtitles, and body text by creating your own default fonts from the Style Panel tab from the home page.

    💡 Use the “Reproduce Formatting” tool to homogenize fonts
Choice of fonts
  • Gonexa supports the following Word fonts:

    AharonialDabi, Andalus, AngsanaNew, AngsanaUPC, Aparajita, ArabicTypeSetting, Arial Black, ArialNova, ArialNovaCond, ArialNovaCondLight, Batang, Batangche, Browallianew, BrowalliaUPC, CalibriLight, Cambria, CambriaMath, Candara, Comics without SMS, Consolas, Constantia, Corbel, CordiaNew, CordiaUPC, CourierNew, DaUnPenh, David, DengXian Light, DFKai-SB, Dillenia UPC, DokChampa, Dotum, Dotumche, Ebrima, EstrangeloEdessa, EucrosiaUPC, Euphemia, FangSong, FranklinGothic Medium, France HL, Freesia UPC, Gabriola, Gadugi, Gautami, Georgia, GeorgiaPro, GeorgiaProBlack, GeorgiaProCond Black, GeorgiaProCondLight, GeorgiaProCondSemibold, GeorgiaProLight, GeorgiaProSemibold, GillSansNovaCond, GillSansNovaCondLT, GillSansNovaCondUltrabold, GillSansNovaCondXBD, GillSansNovaCondDLT, GillSansNovaCondUltrabold, GillSansNovaCondXBD, GillSansNovaCondDLT, GillSansNovaCondUltrabold, GillSansNovaCondXBD, GillSansNovaCondDLT, GillSansNovaCondUltrabold, GillSansGillSansNovaLight, GillSansNovaUltraBold, Gisha, Gulim, Gungsuh, GungSuhche, Impact, IrisuPC, Iskoolapota, JasmineUPC, JavaneseText, Kaiti, Kalinga, Kartika, KhmerUI, KodchianguPC, Kokila, LaOui, Latha, Leelawadee, Leelawadee, Leelinga, Kartika, KhmerUI, Kodchiangupc, Latha, Leelawadee, Leelawadee Awadeeui, Leelawadeeuisemilight, LevenimMt, LilyUPC, LucidaConsole, LucidaSans Unicode, MalgunGothic , MalgunGothicSemilight, Mangal, Marlett, Meiryo, Meiryoui, MicrosoftHimalaya, MicrosoftJhenghei, MicrosoftJhengheiLight, MicrosoftJhengheiUI, MicrosoftJhengheiuiLight, MicrosoftNewtailue, MicrosoftPhagSpa, MicrosoftSansserif, MicrosoftTuighur, MicrosofTailue Yahei, MicrosoftYaheilight, MicrosoftYaheiUI, MicrosoftYaheiiLight, MicrosoftYibaiti, MingLiu, Mingliu-extb, Mingliu_hkscs, Mingliu_hkscs-extb, Miriam, MiriamFixed, MongolianBaiti, Moolboran, MsMincho, MSPgothic, MSPMincho, MSUIGothic, MBOli, MyanmarText, Narisim, NeuehaasGroteskTextPro, NirMalaui, NirmalauiseMilight, NSimSun, Nyala, PalatinoLinotype, PlantageNetCherokee, PMingliu, PMingliu-ExTB, Raavi, RockwellNova, RockwellNovaCond, RockwellNovaCondLight, RockwellNovaExtrabold, RockwellNovaExtraBold, RockwellNovaLight, Rod, SakkalMajalla, SanskritText, SegoEMDL 2Assets, SegoePrint, SegoEUIEMibold, SegoEUIBlack, SegoEUIEmoji, SegoEUIHistoric, SegoEUISemiBold, SegoEUISEmiBold, SegoEUISemilight, SegoEUISymbol, ShonarBangla, Shruti, SimHei, SimplifiedArabicFixed, SimSun, SimSun-ExTB, SitkaBanner, SitkaDisplay, SitkaHeading, SitkaSmall, SitkaSubheading, SitkaText, Sylfaen, Symbol, Tahoma, TimesNewRoman, TraditionalArabic, Trebuch and TMS, Tunga, UrduTypeSetting, Utsaah, Vani, Verdana, VerdanaPro, VerdanaProBlack, VerdanaProCondBlack, VerdanaProCondLight, VerdanaProCondSemibold, VerdanaProCondLight, VerdanaProProLight, VerdanaProSemibold, Vijaya, Vrinda, Webdings, Wingdings, YuGothic, YuGothicLight, YuGothicUiMedium, YuGothicUiLight, YuGothicUISemiBold, YuGothicUISEmiLight, YuMincho, YumInchoDemiBold, YumInchoLight
Manage headers and footers
  • Create headers and footers by double-clicking at the top and bottom of the document.

    💡 Check the “first different page” box from the header or footer menu if you want to differentiate the elements on the first page
  • Add page numbers from the Insert tab by clicking Page Number. Go to Page number formats to set the desired format (1,2,3...) and the start of the numbering.
Add a summary
  • From the Reference tab, click Table of Contents, choose the type of table you want to insert, or create a custom table. Update the inserted table of contents by right-clicking to update, in case new titles have been added.

    💡 If you find missing entries, please define the text to be displayed as the title
Insert and optimize images
  • Add images to your document by clicking on insert: image or by dragging and dropping.

    💡 Optimize the size of your images by compressing them to get the most out of your document. From File, click on “reduce file size” and choose Screen

Organize information

TIP #3
Multi-column display
  • Select the text concerned, from the tab click on insert to choose the number of columns to display.
Repeat the table header on the next page
  • Select the header (s) of your table to be repeated, by right-clicking, access the properties of the table. In the Line tab, check the box “repeat at the top of each page as a header line.”
Create interlocking paragraphs
  • To prevent rows in a table or paragraph from intersecting between two pages, select the block to split, and right-click to access paragraphs. In the sequence tab, check the box interlinked paragraphs and intersecting lines. Save.

To go further

Filter the visibility of a template

TIP #1

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

Create a condition
  • Go to the Option tab in your document template
  • Click on New Condition
  • Set your conditions and click Add

💡 Add as many conditions as needed and choose whether your conditions should be strictly verified with AND or if you want one to be verified only by writing OR.

Use tag extensions

TIP #2
Indicate the date of generation day

Place the generic Gonexa generation date tag with the desired date format.

  • From the assistant, go to the main object and scroll through the list to the end.
  • Find the Document Generation Date tags and copy and paste the desired one into your document.

    Short format: DD/MM/YYYY
    Long format: the JJ MMMM AAAA

Manage the formatting of rich texts

TIP #3

By default, the Salesforce layout is applied to the content of a rich text field placed in a Word document upon generation. Add one or more tag extensions to change these settings.

Setting up

To apply the format applied to the tag in the word template instead of the format used in the Salesforce field, you will need to use a tag extension to allow you to choose exactly the right format.

There are 5 types of formats that can be modified: “f” for “font” = font, “s” for “size” = size, “c” for color = color, “t” for “type form” = character shape, “i” for “indentation” = indentation

To help you, the assistant will guide you:

  • At the level of the tag, click on the 3 small dots on the right
  • Click on “format richtext”
  • Select the format you want to take from the Word


Your tag is copied and can be pasted into your template using the following format:
E.g.: {! Account|Description (HTML,f, s)} for a case where I want to apply the font and size that is defined in the template.

Insert dynamic image

Setting up the image

From the assistant, access the Rich Text field containing your image

  • Click on the “...” to access the Image Configuration
  • Choose the default format or set the expected height and width

    💡 Tip, Set the height or width only so that the source image ratio is applied automatically and thus avoid image distortion.

  • Insert your tag where you want
Allow access to the URL database

In the case of URL image insertion, it is likely that you will need to authorize access to your platform's URL database‍

  • From Salesforce Setup, go to Remote Site Detail
  • Click on New Remote Site
  • Name and fill in the URL containing your images
  • Check the Active box and validate

You can easily insert a tag that refers to a rich text field, or URL whose content is an image, in your document.

Manage tables

Insert items related to your main context in the form of tables

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

  • Creating multiple tables in a document
  • Filter these tables to show only relevant data
  • Sort the tables by the criteria of your choice

Prerequisites

BEFORE STARTING
  • Have a template already ready with the main object configured
  • Take a use case where the main object has many related elements (e.g.: Opportunity, Quote, Account,...)
WHY USING TABLES?

A table corresponds to a related list in Salesforce. For example, if I am on an account, the contacts are children of the account. If I find myself on an opportunity, the opportunity products are children of the opportunity.
These relationships can be standard or built using custom objects. Gonexa technology will simply allow you to display information related to your context.

Many use cases are possible such as displaying the products, services, and options related to my business opportunity in 3 separate tables in my document even though they are all in the same Salesforce object (ProductLineItems).

Create tables

STEP #1
Add child objects to Salesforce
  • In your document template, click on the “Objects” tab to access the list of linked objects
  • Click on “New” in the “Children object” section
  • Select the Salesforce object linked to your context (e.g. opportunity products linked to the opportunity)
  • Rename the tag label carefully if you want to have multiple arrays on the same child object
  • Click on “Create”
  • Repeat the operation several times with a correctly named label each time (e.g.: Label 1 = Product, Label 2 = Service, Label 3 = “Option”)
  • We finish this part by clicking on “Open Assistant” to facilitate the insertion of information into the final document.
Inserting tables in Word

This step is based on standard tables offered by Word. For more simplicity, feel free to use our pre-designed templates available on our website.

  • Insert a new table with 2 rows and the number of columns you want
  • The first line will allow you to have the names of the columns, name the columns as you want
  • On the 2nd line, we are going to use the Wizard that we opened earlier to put the tags
  • Click on the desired child object and look for the field according to what you want to put in your table
  • Finalize the template with all the fields you want to see displayed



To make it easier to understand, you can download the template shown during the demonstration below:

Template upload and testing
  • Go back to Salesforce and upload the Word template with the tables by clicking on “Upload version”
  • Make sure you have a test record with children
  • Test the generation to see the final result

Filter tables

STEP #2

Filters ensure that you only see data that is relevant to your context. Here, we want to filter only the “Product” category in the 1st table, the “Services” in the 2nd, and the “Options” in the last. We use the same Salesforce object 3 times but with different views.

Identification of the filter to be used
  • Knowledge of your Salesforce is essential to know the right filter to use and who will be the one fed with the right data.
  • If the field that can filter the data has not yet been created, you must create it and ensure that it is populated.
Addition of the condition on the child object
  • In the “Object” tab, click on the label (e.g. Product, Service, or Option)
  • In the “Conditions” panel, click on “New Condition”
  • Find the field to use for the filter
  • Indicate the operator and the expected value (ex: Category = “Product”)
Checking the filter
  • Go back to your context (Quote, Opportunity,...)
  • Make sure you have completed data on the filtered field
  • Generate to verify that the filter has been applied

Sort tables

STEP #3

This step is optional since it will simply improve the organization of the data in your table a bit at the time of generation.

Identify the sorting criteria
  • Same as for the filter, you need to identify the right field that will allow us to sort dynamically
  • Make sure there is a link with the child object
  • If this field does not exist, you will have to create it as well
  • Get the API name of the field, it will be needed for the filter
Add the filter to the child object
  • Go back to the child object you want to filter
  • In the “Sort Request” area, specify the API name of the field to be filtered
  • Put a space + ASC or DESC next if you want to sort ascending (ASC) or descending (DESC)
  • Example: “TotalPrice ASC” if I want to sort the product line from the largest total amount (TotalPrice) at the top to the lowest at the bottom
Sorting check
  • Go back to your context (Quote, Opportunity,...)
  • Make sure you have the data filled in on the sorted field
  • Generate to verify that the sorting has been applied

To go further

⚠️ The use of extensions requires being on a package version that is later than 1.7. Please update the package via the AppExchange as required.

Use tag extensions in a table

Make sums with the “SUM” tag

Add up the amounts of the same child object, a group or even hidden information and combine multi-currencies. This way, avoid formula-type fields in Salesforce and easily display subtotals.

  • After setting up a child object in Salesforce, opening the assistant, and placing your tag in your document template, add the extension (SUM) in your tag to add the currencies or quantities: Ex. {! Product|Amount (SUM)}
  • Place the new tag at the desired location on your page using one of the two options.

    Word configuration vs build output

Limits
  • It is possible to display a SUM tag by itself if it is located outside of a Word table (option 2)
  • A SUM tag is imperatively a tag on a child object
  • Multi-currency management is taken into account.
Count the number of records in the table

Cumulate the records in the child object to show the number of rows in a table or that meet a criteria specified in Salesforce.

  • After setting up a child object in Salesforce, open the assistant.
  • Access the tags for the desired child object.
  • Scroll to the bottom of the list of available tags and go to the “Number of records” tag
  • Click on it to copy and paste it to the desired location on your page.
Limits
  • It is possible to display a COUNT tag in a table or outside of a table.
  • A COUNT tag is imperatively a tag on a child object.

    Add up the amounts of the same child object, a group or even hidden information and combine multi-currencies. This way, avoid formula-type fields in Salesforce and easily display subtotals.

Make groupings

Group items based on Salesforce criteria

Group all the elements of a child object that match a criterion, that is, group the rows of a table in a Word document according to a Salesforce field, such as the family of a product, for example.

From the child object of your document template:

  • Name the “Group Name” field as desired. Ex. Group
  • In the “Field to group” field, specify the API name of the field on the child object on which to group (this can be an object based on the child object or on a parent object of the child object)
    Ex. Quantity or Product2.Familly
  • From your Word document template, create a one-row and one-column table from which you will fill in the Group Name tag constructed as follows:

    {! Group name | Api name of the field to group on}

    E.g. {!Group|Product2.Familly}
  • Then insert the array of your child object into this initial array. The table (as a whole) will be repeated according to the number of results that correspond to the criterion and with the name of its family in the header.

Word configuration vs build output

Word display conditions

Bring dynamism to your template by creating conditions for displaying paragraphs, images, or any element in your document.

We are going to break down the training into 2 simple steps :

  • Creation of a simple condition to understand the principle
  • See real use cases that we encounter regularly

Prerequisites

BEFORE STARTING
  • Have a template already ready with the main object and a child object configured
  • Use a word template, be careful this feature is not available in Google Doc
  • Have the “shipping address” and “billing address” fields present in the template
WHY MAKE CONDITIONS?

A condition allows you to display or not display text, an image, a table, and other elements based on a criterion found in Salesforce. This is very useful to add a legal paragraph in the T&Cs based on a checkbox, for example in Salesforce, or to hide a part that shows the possible discounts when no discount has been applied in a quote.

The idea is to personalize a template without multiplying the number of different templates.

Simple display condition

STEP #1
Identifying logic

The logic in our example will be simple, we want to display the word “Apple” when the checkbox on the “Show the word Apple” account is checked.

  • Define the field that will be used next for the condition (The “multiple selection list”, “date”, and “text box” fields cannot be used in a condition)
  • Think about the logic you want
  • Find the document template on which you want to make the condition
  • Make sure that the main object & the child objects (optional) are properly configured
  • Open the assistant from the document template
Create the condition via the assistant
  • Using the assistant, find the Salesforce field that will be the basis of your condition
  • Click on the 3 small dots at the end of the line
  • Click on “Add a condition”
  • I complete the logic by entering the word “Apple” in the “True” box (True = Box checked)
  • I leave the “False” box empty to put nothing if the box is unchecked
  • Click on “Copy”
Inserting the condition in Word
  • Click on the “Insert” tab on the word ribbon
  • Click on “Fields...” or “Insert Field”
    Accédez au pictogramme intitlulé "Quick parts", puis sur "Field..." (Sur Windows)
  • Now paste the condition in the editable area instead of the equal sign already present
  • Finalize by clicking on “Ok”

Note that it is the condition if false that will be displayed by default in the template but that the condition will execute according to our criterion at the time of generation.

Test your condition
  • Upload your template with the condition as usual when loading a new version
  • Find a record that matches your criteria (We check the box “Show the word Apple” on our account for the example)
  • Generate a document to validate that the condition works well
  • Systematically test all the alternatives for your condition to ensure that it has been well built

Actual display conditions

STEP #2
Display of the word “Free” instead of 0€ in a table

We assume that we have a template with an array where there is a currency field to be able to make the condition. In our example, we use opportunity and opportunity products.

  • Make sure you have a main object as well as a child object configured
  • Open the assistant from the document template
  • Look for the field on your child object
  • Click on the 3 small dots and add a condition
  • Indicate “0" in the expected value
  • Text if true = Free
  • Text if false = [Re-enter the tag you want to display]
  • In the table in Word, position yourself where you want to insert the condition
  • Always access the same menu to insert a “Insert/Insert Field” field
  • Paste the condition into the editable area
  • Click on “Ok”
  • Finalize by uploading the template as usual
  • Test
Showing a checked or unchecked box in Word

We're starting with an example where we want to display a checkbox in the same way as in Salesforce.

  • The starting principle remains the same as for the previous case.
  • We insert a condition
  • Text if true = ✅
  • Text if wrong = ❌

Note that if we use emojis here but we could easily insert images, you simply have to make this change after having inserted the condition, toggle the field codes with a right click on the condition.

  • If you changed the condition directly by switching the field codes, make sure to “Update Fields” by right-clicking on the condition
Display multiple fields dynamically
  • Same principle as before to insert the condition
  • Once the condition is inserted, right-click to “toggle field codes”
  • Move all of the parts you want to have dynamically into the “Text if true” or “Text if false” area according to your logic
  • Finalize by uploading the template as usual
  • Test

Advanced display conditions

Create multiple nested conditions (or, and, and +or), and display images, tables, pyctograms, checkboxes, or display a specific layout with advanced SI condition constructs.

Download the template for inspiration.



  • Download the conditions template and open it with Word.
  • Select the entire document (control + A) and right-click: toggle field codes to display conditions
  • Copy and paste the condition you want to use into your Word template.
  • Open the condition and change the values as needed: tag, operator, text if true, text if false
  • Close your condition by selecting it, via right click: update field codes
⬇ Download the SI conditions template

Are you having a problem with IF conditions?

Check out our help page: The Word IF condition inserted in the document does not trigger

Import/Export templates

Facilitate your deployments between 2 environments via our import/export tools.

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

  • Exporting templates from the source environment
  • Importing in the new environment
  • The final production of templates

Prerequisites

BEFORE STARTING
  • Have 2 environments with Gonexa installed (2 sandboxes or 1 sandbox + 1 production)
  • Update the package to at least the “Bordeaux '23" version (February 2023)
  • Have at least 1 template present on an environment
WHY IMPORT/EXPORT?

The Gonexa configuration cannot be deployed using a change set or a traditional deployment tool since it is not about deploying meta-data.

A document template is configured using data (Input in the “Template name” fields, output format, version management policy, etc.) but also the file that carries the tags.

If you had to deploy this without any particular tool, you would have to export data+export files and re-create the links in the new environment. For this reason, we have developed a tool that allows you to export on the one hand and import into the new environment in a few clicks.

The export

STEP #1
Salesforce connection
  • Connect to your source environment
  • Verify that your templates are available
Connection to the Gonexa App
  • Go to the Gonexa Administration via the application launcher
  • In the links section, click on “The App”
  • A window may open if this is the first time to ask the App to communicate, click on authorize
Selection & export of template
  • Click on “Manage my templates” in the “Import/Export” section
  • The list of templates appears, select the template or templates you want to export (note that only templates with a file are exportable)
  • Click on “Export” at the bottom of the list to create the export zip
  • A Zip file can be downloaded directly
  • Carefully keep this file for the future

The import

STEP #2

It is possible to import templates onto a production or a sandbox. Also note that if you repeat the operation, the templates will be updated and not a duplicate will be created as long as they are the same templates.

Disconnect source environment from the Gonexa App
  • First, make sure you log out of the Gonexa App
  • Click on the avatar at the top right on app.gonexa.fr
  • Click on log out
Salesforce login
  • Connect to your target Salesforce environment
Connect to the Gonexa App
  • Go to the Gonexa Administration via the application launcher
  • In the links section, click on “The App”
  • A window may open if this is the first time to ask the App to communicate, click on authorize
Selection & export of templates
  • Click on “Manage my templates” in the “Import/Export” section
  • Click on “Import files”
  • Select the Zip that you exported
  • A success message tells you that the templates are successfully imported
  • You can check in Salesforce that the templates have been imported successfully

Final production

STEP #3

This step allows all of the new imported templates to be sent to our Azure servers for the generations to work.

Add the “Upload Versions” button

This step is not necessary if you have installed the “Bordeaux” version directly (February 2023). This part is only necessary in case of an update from an earlier version.

  • Go to the object manager in the configuration
  • Find the object “Document template” or “Document template”
  • Click on “List View Button Overview”
  • Change the list view by clicking on the chevron at the end of the line
  • Add the custom “Upload Versions” button in the custom buttons
Upload versions via a list view
  • Go to the “Document template” or “Document template” tab
  • Select templates
  • Click on the “Upload Versions” button at the top right
  • The templates are now fully functional

Allow access to support

Your Gonexa support team may need to log in to your application using your ID to resolve and repair issues arising from your request. To do this, you must first allow us access.

Open access to Gonexa support
  • From the environment in question, click on your user icon at the top right of any page in your organization.
  • Go to settings
  • Open the Allow Access to Account Login tab
  • Grant access to Gonexa support by selecting the desired duration of access and clicking on save.
Provide support with the organization ID
  • From Setup, go to Company Information
  • Get the organization ID
  • Give this information to support so they can connect

Create a PDF document template

Create a document template in PDF input format to have specific information filled in by the recipient.

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

  • The creation of a fixed background
  • The creation of the form

Create a fixed background

Create the background of a form with the method of your choice (Canva, Google Docs, Word, Figma, or directly with PDF).

  • Leave spaces dedicated to beacons
  • Give titles and indications
  • Convert it to PDF.

Create the form from Adobe Acrobat

STEP #1

Open your PDF template (fixed background) with Adobe Acrobat to add tags. Access the available tools from the banner, select “Prepare the form” and click “Start.”

Add a text box (Text field)
  • From the Adobe navigation bar, select the “Add a text field” option on the document at the desired location.
  • Double click on the element to configure it.
  • In the “Name” field on the General tab, fill in the Gonexa tag with the Salesforce field to be displayed. Copy and paste it from the assistant banner.
  • Choose whether the item is mandatory or read-only by checking the “Read only” box
  • Control the formatting of your tags in the “Appearance” tab: size, border color, background color, font...
  • Validate by clicking on Close
Create an option list (Salesforce Picklist)
  • From the Adobe navigation bar, select the “Insert drop-down list” or “Add a list of choices” option on the document at the desired location.
  • Double click on the element to configure it.
  • In the “Name” field on the General tab, fill in the Gonexa tag with the Salesforce field to be displayed. Copy and paste it from the assistant banner.
  • From the Options tab, fill in the values for the selection list. These are the exact Salesforce picklist values. Add the items and order them. Select the default value and click Close.

    Attention, If a Salesforce Picklist value does not exist, that is to say is empty, specify Null in the value element in your options list.

Place a checkbox (Salesforce Checkbox)
  • From the Adobe navigation bar, select the option “Add checkboxes to allow the selection of one or more options” and drop it on the page at the desired location.
  • Double click on the element to configure it.
  • In the “Name” field on the General tab, fill in the Gonexa tag with the Salesforce checkbox field to be displayed. Copy and paste it from the assistant banner.
  • The box will be checked if it is checked in Salesforce and retrieves a true/false value.
  • Click on Close to validate.

    Attention, A checkbox tag can only be called once in the document.

Create radio buttons (single selection list)
  • From the Adobe navigation bar, select the “Add checkboxes to allow the selection of mutually exclusive options” tool and drop it onto the page where you want.
  • Name them with the Gonexa tag created from the assistant.
  • From the banner, modify the values: choice 1, choice, choice 3... with the name of the Salesforce PickList value.
  • A success message tells you that the templates are successfully imported
  • You can check in Salesforce that the templates have been imported successfully

Save, upload your document to Salesforce, and test it.

Create the form from Adobe Acrobat

STEP #1

Open your PDF template (fixed background) with Adobe Acrobat to add tags. Access the available tools from the banner, select “Prepare the form” and click “Start.”

Add a text box (Text field)
  • From the Adobe navigation bar, select the “Add a text field” option on the document at the desired location.
  • Double click on the element to configure it.
  • In the “Name” field on the General tab, fill in the Gonexa tag with the Salesforce field to be displayed. Copy and paste it from the assistant banner.
  • Choose whether the item is mandatory or read-only by checking the “Read only” box
  • Control the formatting of your tags in the “Appearance” tab: size, border color, background color, font...
  • Validate by clicking on Close
Create an option list (Salesforce Picklist)
  • From the Adobe navigation bar, select the “Insert drop-down list” or “Add a list of choices” option on the document at the desired location.
  • Double click on the element to configure it.
  • In the “Name” field on the General tab, fill in the Gonexa tag with the Salesforce field to be displayed. Copy and paste it from the assistant banner.
  • From the Options tab, fill in the values for the selection list. These are the exact Salesforce picklist values. Add the items and order them. Select the default value and click Close.

    Attention, If a Salesforce Picklist value does not exist, that is to say is empty, specify Null in the value element in your options list.

Place a checkbox (Salesforce Checkbox)
  • From the Adobe navigation bar, select the option “Add checkboxes to allow the selection of one or more options” and drop it on the page at the desired location.
  • Double click on the element to configure it.
  • In the “Name” field on the General tab, fill in the Gonexa tag with the Salesforce checkbox field to be displayed. Copy and paste it from the assistant banner.
  • The box will be checked if it is checked in Salesforce and retrieves a true/false value.
  • Click on Close to validate.

    Attention, A checkbox tag can only be called once in the document.

Create an Excel document template.

Create a document template in Excel input format.

We are going to break this training down into 4 steps :

  • Creating a table in Excel
  • Make calculations (Average, Maximum, Sum...)
  • Create a formula
  • Insert a dynamic crosstab

Training requirements

  • Know how to make a Word template
  • Have created a document template with a child object

Create a table in Excel

STEP #1

From the document template, add tags on the main objects at your convenience using the assistant banner.

To add tags to a child object, you must first set up a child object in the document template.

💡 Tip: Please define the printable content of your Excel page so that all items can appear on a PDF page when generated. Access the final version by activating the page mode in your Excel.

Add a table
  • Insert a header in your document with column titles
  • In a second line, insert the tags on the child object via the assistant
  • Select the table, then from the Insert tab, click Table
  • Check the box “My table has headers” if you have already set them up and click OK
  • Once the table is created, go to the Table tab.
  • In the Name box of the table, name it with the label of the label of the child object that you set up in Salesforce. (Ex. quoteLineItem)

Save, upload your document to Salesforce, and test it.

Make calculations (Average, Maximum, Sum...)

STEP #2

Do calculations like the average, the maximum, and the sum linked to your table.

Activate the Totals Line
  • Select the table that has already been created
  • From the Table tab, check the “Totals row” box
  • An additional line will appear
  • Select the new box, and on the arrow to choose the type of calculation to be carried out among the average, the maximum, the minimum, the sum...

Save, upload your document to Salesforce, and test it.

Create a formula

STEP #3

Avoid making a formula field in Salesforce and add the logic directly into your Excel document.

Activate the totals row
  • Insert a column to your table and give it a name
  • From the row in the new column, insert your Excel formula starting with “=”
  • Select the box or boxes involved in the calculation and build your formula in the following form: = C17* 0.20

💡 Tip: Add the expected formats: standard, monetary, fraction, time, date... to show the right format to the generation.

Save, upload your document to Salesforce, and test it.

Insert a dynamic crosstab

STEP #4

Display a graph and dynamically cross-referenced information in your document on a separate sheet.

Create a dynamic table
  • Select your board
  • From the Insert tab, click Pivot Table
  • From the “Create a dynamic crosstab” pop-up, check “New Spreadsheet” to display the report on a separate spreadsheet and click OK.
  • From the new sheet on which your dynamic crosstab will appear, check the boxes of the table fields to appear on your table.
  • Move fields to target areas among filters, columns, rows, and values by dragging and dropping them.
  • Click on the i next to the element to choose the display mode: sum, average, maximum...

Save, upload your document to Salesforce, and test it.

💡 Attention: You won't be able to add Gonexa doc tags on the same page as your PivotTable.

Display a graph and dynamically cross-referenced information in your document on a separate sheet.

Add a chart
  • From your selected crosstab, select the chart you want to appear.
  • Place it on the page where you want it.

Save, upload your document to Salesforce, and test it.

Gonexa & Flows

Save time and eliminate repetitive actions with Salesforce flow actions.

We are going to break this training down into 4 steps :

  • Main principles of flow, action triggered on the update of a record
  • Generate a document individually
  • Generate documents from a list view

Training requirements

  • Make sure click generation works
  • Know the process to be put in place

☝️ Org of pre-designed flows

Go to our sample flow org to get inspired. Find the use cases most used by our customers.

  • address: login.salesforce.com
  • identifier: tester@gonexa.fr
  • password: Gonexa01

Main flow principles

EXAMPLE OF AN ACTION TRIGGERED ON THE UPDATE OF A RECORD

From the Salesforce Setup, go to Flows (Flow), and then click New Feeds.

Select the type of flow to set up.

The types of flow
  • Screen flow : Display parameters or information to the user before launching a click action. (Ex. Choice of the template and the output format before generation (click)
  • Flow triggered by a recording : Trigger an action when a Salesforce record is created, updated, or deleted. (e.g. modification of a status, check box...)
  • Flow triggered by a schedule : trigger a specific action at a scheduled time (e.g. generation of tax receipts every December 31 at 9 am)

Click on Create

Creating a recordID variable

💡 Tip; The recordID variable is almost systematic for all screen flows. It is used to variabilize the recordID field, and to provide the flow with the context from which we launch the generation.

  • From the toolbox, click on New Resource
  • Choose the type: Variable and give an API name
  • Select the Text data type, to store the id of the record to be generated.
  • Check the box: Available for entry
Add an informational screen

From the process, click on the + and choose the item: screen

  • Name the label and the API name

    💡 Tip; Rename the next button in the footer configuration to improve the user experience.

  • Drag and drop the desired component: date, checkbox, informative text...

Validate

Add an update action

To update the data entered in the previous screen, you can add an update action. It will trigger a next action.

From the process, click on the + and choose the item: update records

  • Name the label and the API name
  • Check the box: specify conditions for identifying records
  • Select the Salesforce object from which the field is to be updated (e.g. Quote)
  • Filter conditions with the record Id = the previously created recordID variable
  • Define the fields to be updated and their values. (Ex. ExpirationDate = Expiration Date and Status = Review)

Validate, save, name, and activate your flow.

Provision of the flow

Place the feed on your context.

  • Access your main object from Salesforce (the object from which the action is triggered)
  • Click on edit page
  • Drag and drop the Flow component to the desired location
  • Select the flow you want to call from the dropdown list
  • Check the box: transmit the ID of the record in this variable

Generate a document automatically

UNIT GENERATION ACTION

Build your process at your convenience (screen, decision, success message...) and add the Gonexa action.

The 3 parameters of the GenerateDocument action
  • Add an item to your Action flow
  • Select the generateDocument action: apex-gnc__DocumentGenerationInvocable
  • Fill in the following 3 items:
  • Output format : Call the pdf, xlxs, pptx, or docx value.

    You can variabilize this value with a screen by creating new choice resources.

  • RecordID : get the id of the record to be generated.

    This value should be variabilized with a text variable, available for input.

  • TemplateId : Retrieves the Id of the document template to be generated.

    This value can be variabilized on a screen or selected among the documents according to certain criteria such as the name of the document or the azure id.

Save, activate, and test.

Generate documents from a list view

Mass generation action

Generate several documents at once from a list view.

Get the recordings

Add a registration requirement to your flow

  • Give it a label and an API name
  • Retrieve records from the object in your context. (Ex. Generating certifications (from contacts)
  • Filter records with the following requirement:

    Field: Id
    Operator : in
    Value : Sides

Create the ids variable

To fill in the value field, create a new resource:

  • Resource type : Variable
  • API name: Ids

    💡 Attention case sensitive name

  • Data type: Text
  • Allow multiple values (collection)
  • Available for entry

Validate

Add the Generate Multiple Document action

Add action on the page layout of your main object.

  • From the configuration object manager, access the object from which you want to start the generations.
  • Go to the Buttons, Links, and Actions tab
  • Create a new button such as List button
  • Name the label of your choice (e.g. generating certifications)
  • Paste the feed URL into the link.

    💡 Tip You can find the URL of your feed in the feed details.

  • From the layout tab of the list view button, add the new button and save.

Validate and test

Custom format management
Date & number

The characters included in the Date format string are interpreted as a custom format and time string. Add a standard specifier to define how the desired information is displayed.

Training requirements

  • Install, configure and know how to create a document template
  • Add a tag using the assistant

📅 Customize the date format

CHOICE OF EXTENSIONS

FORMAT SPECIFIER

DESCRIPTION

example

{! Tag | API name(d)}

Short date

01/09/2023

{! Tag | API name(D)}

Long date

Monday September 10, 2023

{! Tag | API name(f)}

Long date+short hour

Monday September 10, 2023 13:30

{! Tag | API name(F)}

Long date+long hour

Monday September 10, 2023 13:30:50

{! Tag | API name(g)}

Short date+short time

10/09/2023 13:30:50

{! Tag | API name(G)}

Short date+short time

10/09/2023 13:30

{! Tag | API name(M)}

Month+day

September 10

{! Tag | API name(R)}

RFC1123

Monday, September 10, 2023 13:30:03

{! Tag | API name(T)}

Long hour

13:30:50

{! Tag | API name(t)}

Short hour

13:30

{! Tag | API name(Y)}

Date+month

September 2023

🗓️ Customize the date format

Construction of the extension

FORMAT SPECIFIER

DESCRIPTION

example

{! Tag | API name(by MMMM yyyy)}

You can create complex tags with the following format specifiers in the form {! obj|field (dd MMMM yyyy)} for example. You can also choose to use hyphens or “/” between each date format.

01 09 2023

🕘 Customize the Time format

Construction of the extension

FORMAT SPECIFIER

DESCRIPTION

example

{! Tag | API name(d)}

Day of the month, from 1 to 31

1

{! Tag | API name(DDDD)}

Full name of the day of the week

monday

{! Tag | API name(yyyy)}

4-digit year

2023

🔢 Customize the number format

GENERATE A NUMBER FORMAT

FORMAT SPECIFIER

FIELD TYPE

example

{! Tag | API name(C)}

MOTTO

123,45€

{! Tag | API name(D)}
Optional: precision specifier
{! Tag | API name(D6)}

DECIMAL

1234
-001234

{! Tag | API name(F)}
Optional: precision specifier
{! Tag | API name(F4)}

FIXED POINT

1234,56
1234,5600

{! Tag | API name(P)}
Optional: precision specifier
{! Tag | API name(P4)}

PERCENTAGE

100.00%
-39.7%

{! Tag | API name(N)}
Optional: desired number of decimals
{! Tag | API name(N3)}

NUMBER

1,234567
1,234

For more information, see the following article: https://learn.microsoft.com/fr-fr/dotnet/standard/base-types/standard-date-and-time-format-strings