> For the complete documentation index, see [llms.txt](https://docs.popl.co/introduction/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.popl.co/introduction/integrations/hubspot-integration/hubspot-company-mapping.md).

# Hubspot Company Mapping

## Company Sync Logic

*How Popl determines if a new company should be created, matched, or linked when syncing to HubSpot.*

When **HubSpot Company Mapping** is enabled, Popl will also create or update a Company record in HubSpot at the same time it syncs a Contact. This runs after the Contact syncs, and searches for an existing Company before creating a new one to avoid duplicate Companies in your HubSpot.

### Before You Enable Company Mapping

Before turning on **HubSpot Company Mapping** in Popl, make sure the Popl app has permission to access Companies in your HubSpot account. Some HubSpot accounts restrict this by default, and the Company Mapping permission will not be available in Popl until access is granted on the HubSpot side.

In HubSpot, open your connected app's settings and allow access to Companies before continuing.

<figure><img src="https://3940976487-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhZY7WR46v9ngHXb5FbhZ%2Fuploads%2FyWLAlVAsdMndvaxAOmst%2Fimage.png?alt=media&amp;token=fcbeb514-d99c-4180-bd52-0eac98308761" alt=""><figcaption></figcaption></figure>

### How Popl Finds an Existing Company

Popl first checks for a Company with a matching domain. Your lead's website or email domain is reduced to its base domain (for example, `https://www.acme-corp.com/about` becomes `acme-corp.com`) and compared against each Company's domain in HubSpot. If a match is found, that Company is used.

If no domain match is found, Popl looks for a Company by name instead, using your lead's company name (or their email domain if no company name is set). This is a word-start match, not a fuzzy match, so close spellings or partial overlaps will not match. For example, "Acme" will match a Company named "Acme Corp," but it will not match "Macme."

**Link Existing Company if a Match Is Found:**

If a matching Company is found, Popl links it to the contact as their associated Company. No new Company is created.

**Create a New Company if No Match Is Found:**

If no matching Company is found, Popl creates a new Company record and links it to the contact. The one exception: if the lead has a public email domain (like gmail.com or outlook.com) and no company name is set, Popl will not create a Company.

Note: The Company Owner is set to match the Contact Owner for that record.

Note: If Popl is unable to create or update the Company for any reason, the Contact will still sync successfully. Company Mapping issues do not block Contact syncing.

### Need Help?

Contact Popl Support, our team is available to assist at <teams@popl.co>.

With 🤍 from Popl.
