Associating Branch Contacts to the Company Object In HubSpot
Branches are like tiny trees. They carry the likeness of the tree they’re connected to and hold the leaves that keep it alive. Company departments are exactly the same way. That’s why they’re often called branches themselves.
This leads me to an interesting use case I found on the HubSpot forums. A user had branches set up in his instance as custom objects and associated to a company record.
The issue? The contacts for each branch of the company were associated with the branch records themselves and not the company object. He wanted a way to associate the contacts to the company all at once without the tedium of doing it manually.
Right then and there I knew that Associ8 would be just what he needed. So I opened up HubSpot and got cooking.
How to associate all contacts for a branch to the main company record in HubSpot
I knew from the get go that the job would require at least two different workflows. Fortunately, neither of them were long or complicated. I just needed two additional properties:
- Company ID Branch Property: When a branch object gets created for a company, the company’s Record ID will be copied over to this property.
- Company ID Contact Property: We’ll need to copy the Branch’s Company ID over to this property in order to make the Contact - Company association.
With my new properties set up, I got to work on the workflows. I needed one that would copy a branch’s Company ID to any of its associated contacts’ Company ID.
1. Start by making a Branch based workflow.
2. We only want a branch to enter this workflow if it has a Company ID. So we’ll set the enrollment trigger to Company ID is known.
3. We also want this workflow to rerun in case any new contacts are added to the branch. So make sure to click on the re-enrollment tab and turn it on.
4. We don’t want this workflow to run all day everyday. So click the + button beneath the workflow trigger and add a Delay action.
5. Set the Delay type to Days of the week. Select which days you would like the workflow to run on (I picked all weekdays for this example).
6. For Time of day select Specific time and set the time to 6:00 AM. Then click Save. This will make it so that the branch will only go through this workflow on weekdays at 6:00 AM.
7. Click the + button beneath the delay and add a Copy property value action.
8. For Property or value to copy from select Company ID.
9. For the Target object select Contact.
10. Leave Association to object as All contacts.
11. For Property to copy “Company ID” to select Company ID.
12. Click Save and that’s the first workflow done! One to go.
What this workflow will do is check once per day to see if any new contacts have been added to the branch. If a new contact has been added, the branch’s Company ID will be copied over to the contact’s Company ID.
Now it’s time to associate those contacts to their company!
1. Start by creating a Company based workflow.
2. Set the enrollment trigger to Record ID is known.
3. We want this workflow to run daily just like the previous one. So make sure to turn re-enrollment on the same as you did before!
4. Click the + button beneath the enrollment trigger and add a Delay action.
5. We’ll set the delay to be every weekday like we did for the previous workflow. Only we’ll set the Specific time to be 7:00 AM (One hour after the first workflow runs). This will give our other workflow time to work its magic!
6. Click the + button (you know the drill) and add an Associ8 - Company action.
7. For the Associated Object Type select Contact.
8. For the Associated Object Property select Company ID.
9. For the Search Value select the Record ID company token.
10. Click Save and you’re done!
What this workflow will do is associate the company to any contacts whose Company IDs match its Record ID. If you’re new to Associ8 and find this confusing, don’t worry! There’s a blog post that goes over how the app works here.
Now whenever a new contact is added to a branch, our automations will associate it to the company it belongs to! Sparing you the headache of having to do it manually. It will run daily, so you never have to worry about whether or not your associations are up to date!
If you enjoyed this post, why not share it with your friends? And if you want to see what else the app can do, check out this blog post on How the Associ8 Summary Works!