Insert items related to your main context in the form of tables
We're going to go through 3 simple steps to achieve this:
Prerequisites
✓ Have a template ready with the main object configured
✓ Choose a use case where the main object has related items (e.g., Opportunity, Quote, Account...)
What is a Gonexa "Child object"?
A table corresponds to an associated list in Salesforce. For example, if I am on an account, the contacts are children of that account. If I am on an opportunity, the opportunity products are children of the opportunity.
These relationships can be standard or built via custom fields. Gonexa technology simply allows you to display information related to your context.
For example
Many use cases are possible, such as displaying products, services, and options linked to a sales opportunity, or lists of contacts linked to accounts.

Tip
Renaming the tag label will help you distinguish between your tables and ensure you add the correct tag to the right table when building your template.

For example
You can create 3 child objects on the same Salesforce object, such as Opportunity Products, with one labeled "Product", the second "Service", and the third "Option".
Note
1 Child object = 1 table in the document. Create as many child objects as you wish to have distinct tables in your document template.
Tip
This step is based on standard Word tables. For simplicity, feel free to use our pre-designed templates

Note
Tags for a child object must be placed inside a table. If they are outside, they will not appear when the document is generated.
To make it easier to understand, you can download the template shown during the demonstration below:
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.
For example
Here, we want to filter only the "Product" category in the 1st table, "Services" in the 2nd, and "Options" in the last. We are using the same Salesforce object 3 times, but with different views.
A good understanding of your Salesforce setup is essential to identify the correct filter to use, ensuring it is populated with the right data.
For example
Product Family = "Options"

This step is optional since it will simply improve the organization of the data in your table a bit at the time of generation.
For example
Sorting by the ProductCode field in ascending order will sort the products

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:
For example
Product2.Family

From your document template, build your table using one of the following two methods.
If you do not need to repeat table headers across multiple tables, this method is recommended as it is the simplest.
For example
The first row of the table will contain the following tag {!Group name | API name of the field to group by}, which in our case is {!Group|Product2.Family}

Download an example template
If you want to manage table header repetition across multiple pages, you must use this method. The entire table will be repeated based on the number of results that match the criteria, with the family name in the header.
For example
The first row of the table will contain the following tag {!Group name | API name of the field to group by}, which in our case is {!Group|Product2.Family}
Word configuration vs Generation result

Download an example template
