APIs & Integrations

No aplicable

Not able to set company name (and other properties) via Identify JavaScript

Hi there,

I’m trying to pass data from our web application into HubSpot via the Javascript Identify command. I’m successfully passing in firstname, lastname, email and phone, but when I try and pass in the company name I’m having no luck at all.

I’ve read elsewhere in the Forums that the domain name is a unique identifier for a company, and sure enough the email domain for my tests is being set as the company website/URL, however, the company name is empty.

Here’s my JavaScript code. As you can see, I’ve used trial and error to find the syntax which will drop it in to no avail.

var _hsq = window._hsq = window._hsq || [];
_hsq.push([‘setPath’, ‘/view_prospect_list’]);
_hsq.push([“identify”,{
email: “bbb-geoff.mcqueen@accelo.co.za”,
firstname: “Geoff”,
lastname: “McQueen”,
company_name: “company_name DEV Accelo”,
companyname: “companyname: DEV Accelo”,
company: “company: DEV Accelo”,
name: “name: DEV Accelo”,
phone: “+1 800.425.7315 x101”,
}]);

(pls forgive the bullsh*t smartquotes in the post above - I'm using proper ones)

Here’s a screenshot of the same contact being created - I’ll include one for the top to show some things going into the right place, and one below for the Company area which isn’t pretty. Link to view if you’re a HubSpotter with access to our account is link.

If we can’t pass in company details (given the B2B nature of our product/service) we’re going to have a really big challenge using HubSpot.

0 Me gusta
1 Respuesta 1
Derek_Gervais
Exmiembro de HubSpot
Exmiembro de HubSpot

Not able to set company name (and other properties) via Identify JavaScript

Hi @GeoffMcQueen,

The identify method can be used to pass contact information & create contact records, but it cannot pass information into other associated records (e.g. companies/deals). The auto create/associate functionality is what's creating these company records & associating them with the test contacts, but that process is distinct from the identify method.

If you must use the identify method to pass company information, you could implement a workaround using a workflow and custom/existing contact properties. For example: If you needed to pass the company name into a contact's associated company record, you could pass the value into the default 'Company name' contact property. Then, the contact could be enrolled in a workflow that copied the value from the 'Company name' contact property into the 'Name' company property. This could work for most any company property, so long as there was a corresponding contact property that you could pass values into from the identify call. Other solutions would involve using methods other than identify, like the companies API.

0 Me gusta