đź”— Reference associated objects
When HubSpot objects are associated with each other (e.g., a deal with multiple contacts), ChiliDocs allows you to reference a specific association in your template.
âś… Default behavior
If you use a placeholder like
[contact.firstname]on a deal, ChiliDocs automatically pulls data from an associated contact.This works even without specifying an association label.
âś… Specific association with a label
To reference a specific associated record, put the label in parentheses:
[contact(Primary).firstname][contact(Billing Contact).email][company(Partner).name]– company with the label Partner
The syntax works for every object.
âś… Multiple labels with priority
Separate several labels with commas. ChiliDocs uses the first label that actually has a record, in the order you specify:
[company(Primary, Treuhand, Partner).name]– tries Primary first, then Treuhand, then Partner
âś… Get the latest record with latest
The pseudo-label latest returns the most recently modified associated record:
[deal(latest).dealname]– the most recent of all associated deals[contact(Klassenlehrer, Primary, latest).email]– first the label is chosen that actually has records (Klassenlehrer first, otherwise Primary); within that group the most recent one is picked
Position and case of latest don't matter. Inside tables, latest is ignored (tables always return the whole group).
➡️ Related articles