Contacts on a shared email domain won't associate to the right company? Here's what worked for us

If you sell into healthcare, the public sector, education or any group of organisations that share one email domain, you’ve likely bumped into a common data challenge:

The Problem: HubSpot associates contacts to companies by email domain. When every buyer uses the same domain (nhs. net, gov .uk, ac. uk or a parent group’s domain), form submissions either create no company association or land on the wrong record. Sales can’t see which organisation a lead belongs to, and company-level scoring and reporting break. For one client selling into the NHS, almost every lead arrived on nhs .net.

At Hatchi Digital, we built a custom form module that lets visitors pick their organisation from a controlled list, so every submission lands on the right company whatever the email domain.

Our first attempt was a workflow that matched the contact’s free-text company name to existing company names. It only worked on exact matches, and people type “St Mary’s”, “St. Marys Hospital” and “SMH” for the same place. The data needed to be clean at the point of entry, not fixed afterwards.

So we built a custom form module:

  1. A HubDB table holds the full list of NHS organisations, using the names that match the company records in HubSpot.
  2. A custom JavaScript autocomplete field on the form reads from that table. As the visitor types, they pick their organisation from the list.
  3. The selection fills an “Organisation name” contact property.
  4. A workflow copies that value into the standard Company name field, which drives the association to the right company.

Two gotchas cost us time in testing:

  • The new field had been set to “unique values only”, which broke the form. A shared organisation name can never be unique.
  • One form sat inside an A/B test, so the fix only appeared on one variant until we updated both.

It also has limits: it can’t run on meeting links or on the manual “create contact” form inside HubSpot, so those still need checking by hand.

Web form submissions now arrive with a standardised organisation name and associate to the right company, regardless of the shared domain. Because the value comes from a controlled list, company-level scoring and reporting are reliable again. The same pattern works for any shared domain: gmail. com, gov, ac. uk or a parent group domain.

If you’ve solved this for meeting links too, I’d love to hear how.

Hi @Pete-Cleary-Hatchi and Happy Wednesday!

Thanks for sharing this with the HubSpot Community! :blush:

HubSpot’s automatic company association relies indeed on email domains, which can be challenging when multiple organizations share the same domain (such as NHS, gov.uk, or ac.uk). Standardizing company information at the point of entry is a great way to improve accuracy and avoid matching issues later on.

This is a great example of how HubDB can help address challenges with shared email domains, especially by standardizing company information at the point of entry rather than trying to clean it up afterward.

For anyone interested in exploring a similar approach, here’s an article on creating HubDB tables.

Regarding meeting links and manual contact creation, there isn’t currently an equivalent native solution. Manual review or a post-creation workflow using standardized company information might work for this.

I’d also love to hear if anyone in the Community has found another approach for handling these scenarios! Hi @danmoyle, @Josh and @alyssamwilie do you have other suggestions, please?

Thanks again for sharing your experience and learnings!

Have a wonderful day!

Bérangère, HubSpot Community Manager

- For information, I’ll be out of the office from the 26th to the 30th of October included -

Very interesting solution to a common issue with parent<>child companies. Thanks for giving me something to think about @Pete-Cleary-Hatchi!