In HubSpot, you can create pages where users can view their own information when logged in. For example, the deals associated with their contact record.
Get a contact's data
To get a contact's data on your HubSpot CMS page, you can use the
crm_objects HubL functions. For security reasons, this can only be done on a password-protected or membership login page.
To get a contact's first and last name using the
crm_object function, you would write something like the following code, with the three parameters being the object type (
'contact'), the object ID (in this case retrieved from a logged-in member -
request.contact.contact_vid), and the object fields you'd like to retrieve (
Get a contact's associated deals
To get this contact's associated deals, you would use the
crm_associations HubL functions and write something like the following code, with the three parameters being the object ID (again, in this case, retrieved from a logged-in member-
request.contact.contact_vid), the object category (
'HUBSPOT_DEFINED'), the association type ID (in this case
4, "Contact to deal") and the object fields you'd like to retrieve (
The above two code snippets should render the following HTML when a user is logged in:
You can retrieve any data from other object types (
quote or custom if you have an Enterprise account) and their associations by using variations on the code above with the relevant parameters.