Child objects allow you to include related record data in your merge templates. Display line items on invoices, contacts on account summaries, or any parent-child relationship in your Salesforce org. This guide covers how to configure child object mappings and display them in your documents.
Navigate to Settings → Child Objects to map related objects for your template. Each child object mapping requires the following configuration:
Select the child object that will be merged with the parent object, in a table, list, or as a single record.
Choose the lookup or master-detail field that connects the child to the parent object.
Use 1, 2, or 3 to determine the prefix (C1, C2, C3) used to reference this child object in the template builder.
Check this box if only one record from this child object should be included in the merge.
When mapping a child object, you must choose between multiple records or a single record. This choice affects how you can display the data in your template.
Includes all matching child records. Display in tables or lists that repeat for each record.
Includes only one child record. Reference fields directly without tables or lists.
Important: Single record child objects cannot be used in child record tables or lists. Their fields can only be placed directly in the document body using the CX prefix syntax.
Each child object is assigned a prefix based on its Object Order setting. Use this prefix when referencing child object fields in your template.
{C1.ProductName}, {C1.Quantity}, {C1.TotalPrice}{C2.FirstName}, {C2.Email}, {C2.Phone}{C3.CommentBody}, {C3.CreatedDate}Multiple record child objects can be displayed in two formats: tables or lists. Choose the format that best fits your document design.
Display child records in a structured grid with headers and columns. Ideal for line items, pricing breakdowns, and any data that benefits from column alignment.
Tables automatically generate one row per child record. The header row defines your columns, and the data row serves as a template that repeats for each record.
| Product | Quantity | Unit Price | Total |
|---|---|---|---|
| Enterprise License | 5 | $1,200.00 | $6,000.00 |
| Implementation Services | 1 | $3,500.00 | $3,500.00 |
| Training Package | 2 | $750.00 | $1,500.00 |
Table Requirement: All header cells in a child table must contain CX merge fields. Empty header cells or headers with static text only will cause the merge to fail. Each column header should reference the field that will appear in that column.
Display child records as flowing text paragraphs or formatted blocks. Better suited for narrative documents, letters, or when data doesn't fit neatly into columns.
Lists repeat your template block once per child record, allowing for more flexible formatting than tables.
Reference child object fields using the CX prefix followed by the field API name.
Open your template and navigate to Settings → Child Objects
Click Add Child Object and select the child object API name from the dropdown
Choose the relationship field that links the child to your template's parent object
Set the Object Order (1, 2, or 3) to assign the CX prefix for this child object
Check Single Record if you only want one child record included; leave unchecked for multiple records
Save the mapping, then use the CX prefix to add fields to your template in tables, lists, or the document body
Tip: You can map up to three child objects per template (C1, C2, C3). Plan your Object Order assignments based on how frequently you'll reference each child object in your document.