Gonexa University

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 tables by the criterion of your choice

Prerequisites

Pré-requis
✓ Avoir un modèle déjà prêt avec l'objet principal configuré
✓ Prendre un cas d'usage où l'objet principal a bien des éléments liés (ex : Opportunité, Devis, Compte...)

Why do tables?

Qu'est-ce qu'un "Objet enfant" Gonexa ?

Un tableau correspond à une liste associée dans Salesforce. Par exemple, si je suis sur un compte, les contacts sont enfants du compte. Si je me trouve sur une opportunité, les produits d'opportunités sont des enfants de l'opportunité. 

Ces relations peuvent être standards ou construites via des champs personnalisés. La technologie Gonexa permettra simplement d'afficher les informations liées à votre contexte.

Create tables

STEP #1

Pour exemple
De nombreux cas d'usage sont possibles comme afficher les produits, les services et les options liées à mon opportunité commerciale ou les listes des contacts liées au comptes.

Add child objects to Salesforce
  • In your document template, go to the Gonexa Assistant component
  • Click on “+ Child object”
  • Select the Salesforce object linked to your context (ex: Opportunity products linked to the opportunity)
  • Rename the tag label correctly if you want to have several tables on the same child object

    Astuce
    Renommer l'étiquette de la balise permettra de différenciers vos tableaux et d'ajouter la bonne balise dans le bon tableau à la construction du modèle

  • Click on “Create”
  • Repeat the operation several times with a correctly named label each time (ex: Label #1 = Product, Label #2 = Service, Label #3 = Option”)

    Pour exemple
    Vous pouvez créer 3 objets enfants sur le même objets Salesforce comme Produits d'opportunités, avec l'un qui porte l'étiquette "Produit", le second l'étiquette "Service", et le troisième l'étiquette "Option"

  • We end this part by clicking on “Access tags” in order to facilitate the insertion of tags in the final document.

    Attention
    1 Objets enfant = 1 tableau dans le documents. Créez autants d'objets enfants que vous souhaiterez créer de tableau distinct dans le modèle de documents

Inserting tables in Word

Astuce
Cette étape se base sur des tableaux standards proposés par Word. Pour plus de simplicité, n'hésitez pas à utiliser nos Templates préconçus

  • 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

Attention
Les balises d'un objet enfants doivent impérativement être placées dans un tableau. Si elles sont en dehors, elles ne s'afficheront pas à la génération.

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 data

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.

Pour exemple
Ici, nous souhaitons filtrer uniquement la catégorie "Produit" dans le 1er tableau, les "Services" dans le 2ème et les "Options" dans le dernier. Nous utilisons 3 fois le même objet Salesforce mais avec des vues différentes.

Identification of the filter to be used

La connaissance de votre Salesforce est indispensable pour connaître le bon filtre à utiliser et qui sera celui alimenté par la bonne donnée.

  • 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 Gonexa Assistant component, edit the child object by clicking on the pencil
  • In the “Filter” section, add a record retrieval filter
  • Find the field to use for the filter

    Pour exemple
    Famille de produit = "Options"

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 data

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
Add the filter to the child object
  • Go back to the child object you want to sort
  • In the “Sort” section, specify the field you want to sort with
  • Choose sorting order from Ascending or Descending
  • Example: ascending sorting of the ProductCode field

Pour exemple
Un tri sur le champs ProductCode ascendant permettra de trier les produits

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

Grouping data

STEP #4
Group items according to a Salesforce criteria

Group all the elements of a child object that correspond to 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:

  • Go back to the child object you want to group
  • Choose the Salesforce field to group on. It can be an object based on the child object or on a parent object of the child object.

    Pour exemple
    Product2.Family

  • Name the field “Group Name” in any way you want.

From your document template, build your table using one of the following two methods.

Si vous ne souhaitez pas répéter les entêtes du tableau sur plusieurs tables, cette méthode est recommandée pour être la plus simple.

  • From your Word document template, create a table with one column and two rows, with the first row containing the name of the group.

    Pour exemple
    La première ligne du tableau contiendra la balise suivante {!Nom du groupe | Nom Api du champ sur lequel grouper} c'est à dire dans notre cas {!Groupe|Product2.Family}

  • In the 2nd row of the table, insert the entire table. (Header, columns, and rows) containing child objects
  • Adjust borders and columns to suit you using Word formatting.

    Download an example template

Si vous souhaitez gérer la répétition des entêtes du tableau sur plusieurs pages, vous devez impérativement utiliser cette méthode. Le tableau, dans sa globalité, sera répété en fonction du nombre de résultat qui correspond au critère et avec le nom de sa famille en entête.

  • From your Word document template, create a table with one column and three rows, from which, in the first line, you will fill in the grouping tag.

    Pour exemple
    La première ligne du tableau contiendra la balise suivante {!Nom du groupe | Nom Api du champ sur lequel grouper} c'est à dire dans notre cas {!Groupe|Product2.Family}

  • In the 2nd row of the table, split the cell according to the number of columns you want
  • In the 3rd row of the table, insert the table of your child object containing the child tags, adjusting the columns as well as the borders. You can also change the properties of the table by choosing the value “Around” as “Text wrap”.

    Word configuration vs Generation result

    Download an example template