Questions regarding the capabilities of deep linking dynamic landing pages in HubSpot.
Need: Send an email out with a link to a dynamic landing page that populates each account that the email is associated with.
For example, an agency that has 4 separate accounts that they manage: we want to link out to a landing page that has 4 separate account names and have them deep link to their associated portal logins.
Need: Looking to pull in information from different objects to build the criteria into email copy. Would that be possible or would we need to create a unique object and populate those properties all within one object?
I suggest 1 of 2 ways, and both rely on programmable emails to get this done.
Create Lists for each account and store contacts who should be shown links to that account
You'll need to keep track of which Lists get which links, so you could store that either in a HubDB table or the programmable email module
Then in the email HubL, you'll get the user's list memberships and check them against your key to pull the correct link
Create a dropdown property for the different accounts - make the internal value match the key that needs to be passed to the URL
You'll need a workflow to handle the logic for determining the account that the contacts get tagged with
In the email HubL, grab this property from the contact record and add it to your link
The code for option 1 could look something like this:
{# Getting the User's List Memberships #}
{% set list_ids_array = request_contact.list_memberships %}
{# Getting all the HubDB rows and selecting for the ones with a list ID that exists in the list_ids_array
-- NOTE: the way it's written here assumes that the HubDB column contains a single ID as a text string or number
-- this will output an array of data for each row that has a list_id_column value that is in the contact's array from above
#}
{% set account_row_link = hubdb_table_rows(module.table_id)|selectattr("list_id_column", "in", list_ids_array)|first|attr("link") %}
Note: This assumes the following:
The programmable email module stores the table ID
The HubDB table has columns for a single List ID and a link
I suggest 1 of 2 ways, and both rely on programmable emails to get this done.
Create Lists for each account and store contacts who should be shown links to that account
You'll need to keep track of which Lists get which links, so you could store that either in a HubDB table or the programmable email module
Then in the email HubL, you'll get the user's list memberships and check them against your key to pull the correct link
Create a dropdown property for the different accounts - make the internal value match the key that needs to be passed to the URL
You'll need a workflow to handle the logic for determining the account that the contacts get tagged with
In the email HubL, grab this property from the contact record and add it to your link
The code for option 1 could look something like this:
{# Getting the User's List Memberships #}
{% set list_ids_array = request_contact.list_memberships %}
{# Getting all the HubDB rows and selecting for the ones with a list ID that exists in the list_ids_array
-- NOTE: the way it's written here assumes that the HubDB column contains a single ID as a text string or number
-- this will output an array of data for each row that has a list_id_column value that is in the contact's array from above
#}
{% set account_row_link = hubdb_table_rows(module.table_id)|selectattr("list_id_column", "in", list_ids_array)|first|attr("link") %}
Note: This assumes the following:
The programmable email module stores the table ID
The HubDB table has columns for a single List ID and a link
Hi, @NGraehling👋 Thanks for the interesting question. Can you tell us more about what you've already tried, even if it didn't work as expected?
Based on your question, my quick thoughts are: A.
Using Personalization tokens and storing the portal link as a value for a property
Using Smart Content on pages to control who sees specific information based on a property or list membership
B. Using a Custom Object – this could be useful if using properties on a single existing object won't work. It might add more complexity in managing associations between the custom object and your contacts.
I'd also like to invite some of our community experts to the conversation — hey @Jnix284@Phil_Vallender@mangelet, do you have any recent experience you can share with @NGraehling?