Adding Variable Tokens to Your Template

Hubspot records contain data as properties and these properties are used to retrieve and display your data. Each property is a key-value pair. The key is an identifier shared by all records that contain that property. The value is the value unique to that specific record. So, all records of a particular object type will have the same keys (e.g. contacts will having "lastname", "firstname", "email", etc.), but their values will be unique (e.g. "John", "Rachel", "Andrew", etc.). In order to get your Hubspot data to merge with your Documint templates you will need to find the property names (keys) and paste them into your template. The Documint Hubspot extension contains an easy table where you can see and copy all your record's properties.

The Documint app can access property data for these objects:

  • Contacts

  • Companies

  • Deals

  • Tickets

  • Custom Objects

Viewing Properties

To search and view the available properties, just click the View Properties button near the bottom of the dashboard.

You can filter and view all properties for your object as well as the properties for associated objects.

The properties table also show the properties' types and group identifiers as well as if they are custom or Hubspot defined

Primary properties

Primary properties are properties that belong to the object type that is currently selected.

See Working with Custom Object Data on how to change the selected object.

Copy a proprety by highlighting it and pressing "Ctrl+C". Then paste it into your template.

Copy a token.
Paste it!

Association properties

Association properties are the properties for associated objects. For example: your selected object is contacts and its associations are contacts (other contacts), companies, deals, and tickets.

Because associations are lists/arrays of data for related records (see array data type), you can either display the values for associations by looping over each record, or you can just display data for a singe record from the list (This is useful when an associations list only contains a single associated record).

The Documint app does not currently provide association data for custom objects.

Displaying a single value

To display values from a single record use the following syntax in your template:

Notice: you can replace the 0 with any number if you know the position of the item you want to display.

Select "First item" from the "Use type" dropdown and then copy the associated object property you want to use.

Now just paste the property into you template.

Displaying all values for an associations list

Select "All items" from the "Use type" dropdown and copy the association list name that appears at the top of the properties table.

Notice the association list token is not wrapped in curly braces.

In your Documint template, select the parent element that will be repeated for each item in the list then click "Edit logic"

Paste the associated list name into the "List variable" field.

Copy one of the associated object's properties from the Documint app.

Paste it inside the repeating element in your template.

You're all set to generate your document!

Last updated