A Contact Form 7 inquiry may identify a person and an organization, but those details do not automatically establish which company record should own the relationship. A familiar email domain can belong to several subsidiaries, an agency can submit for a client, and an existing contact may already have a primary company.

Build a reviewed association policy before enabling automatic writes. This guide uses HubSpot’s documented contact, company and association model as a concrete example for a custom adapter. Other CRMs have different objects and connector capabilities. The procedure below is an implementation proposal, not a built-in CF7 connection.
Model the contact, company and inquiry separately
Start with three questions: which contact is involved, which organization the inquiry concerns, and what relationship should be stored between them. A company name typed into a field is a submitted claim. A CRM company ID identifies an existing destination record. An association connects records; copying a company name into a contact property does not necessarily create that relationship.
Keep the inquiry’s context even when you recognize the person. Someone who worked for one organization last year may now ask on behalf of another. Updating a primary-company link from a single unreviewed message can change how colleagues interpret the relationship. Our contact identity guide covers the separate question of locating the contact.
Inspect existing destination behavior first
HubSpot documents an automatic company-association setting based on the contact email domain and company domain. Its guide also describes cases involving submitted company properties and website information. Do not assume that disabling one domain-based setting removes every association path in a complex account.
Review the behavior of the actual connector, destination forms, workflows and existing integrations. The documented behavior of a HubSpot-hosted form does not automatically describe a third-party CF7 bridge. Record which component creates a company, creates a link, selects a primary relationship or merely stores text.
Use the destination’s current subscription and API documentation when evaluating labels and association limits. A connector action called “create contact” may expose only a subset of those capabilities. Verify the exact action you plan to use rather than inferring support from the destination platform’s broader API.
Treat domain matching as a candidate rule
In HubSpot’s documented automatic matching, multiple company records sharing a domain create an ambiguity: the contact is associated with only one, and the user cannot choose which through that automatic rule. The documentation also describes separate handling for subdomains and freemail addresses. Review these cases before letting a domain control assignment.
For a custom policy, use a trusted account reference or a previously reviewed mapping when available. Keep a domain lookup as a candidate-generation step. If it returns zero companies, retain the inquiry for review. If it returns several, retain the candidates without inventing a winner. A free email address alone provides little evidence about the organization represented.
Never trust an arbitrary company ID submitted by the browser as authorization to change that company’s records. Resolve and authorize the relationship in your adapter. Preserve the original submitted organization text separately so a reviewer can understand the request without treating it as verified destination identity.
Define the allowed relationship change
Write a small decision record before the API call: contact ID, proposed company ID, relationship label, evidence source, current associations and intended action. Use string-safe IDs. Describe whether the action adds a secondary relationship, requests review or changes the primary company.
HubSpot’s association API distinguishes unlabeled and labeled links, with association types tied to direction. Retrieve the relevant definitions for the selected API version. Do not copy an example type ID for the reverse direction or assume a custom label has the same ID in every account.
Apply a conservative default to an existing primary company: preserve it until the workflow has an explicit reason and authorization to change it. Adding a relationship and changing the primary relationship are different decisions. Keep the previous links and labels in the scoped change record so someone can inspect the exact effect.
Re-read relationships before and after writing
Between candidate selection and the write, another user may update the contact. Re-read the associations immediately before applying the reviewed action. If the relevant state changed, return the job to review instead of silently replacing a newer decision. Our concurrency guide explains this general stale-update risk.
After a successful API response, retrieve the relationship again and verify the destination IDs and label. Keep a separate status for contact creation and association completion. If the first succeeded and the second failed, retry the pending relationship operation under your recorded policy. Creating another contact to solve an association error produces a new problem.
Include the exact operation in recovery notes. “CRM sync failed” does not tell an operator whether a contact exists or whether a primary link changed. Preserve enough structured evidence to resume the intended step without copying entire customer messages into diagnostics.
Exercise ambiguous cases before rollout
Use synthetic records in an authorized test account. Include one company match, no company match, two companies with the same domain, a freemail contact, a contact with an existing primary company, and a person representing a different organization. Add a destination change between review and apply.
For each case, specify the expected contact, proposed company, relationship action and review state. Have the person responsible for lead follow-up inspect the result. Do not measure success only by the absence of an API error; the wrong association can be technically valid.
Compare destination options in our CRM workflow comparison. For submission statistics inside WordPress, review Svetlik Analytics for Contact Form 7, our free plugin. This site publishes it; the company-association policy here requires separate connector or adapter work.
