Headquarters Hierarchy

Updated:

Overview

The headquarters hierarchy is returned as a sub-object by the IP Address API. These sub-objects return company profile information about the domestic and global headquarters of the identified company of a website visitor.

When to Use

Only enable the headquarters information when it is relevant to particular business objectives.

When Demandbase identifies the company of a website visitor, the headquarters hierarchy can provide additional company profile information about the ultimate global parent company as well as location information about the domestic headquarters of that company based on country of the visitor's IP address. The HQ hierarchy is only returned by the IP Address API.

How to Enable

Each level of headquarters hierarchy can be enabled independently upon request. Talk to your Customer Success Manager to have the desired hierarchy levels enabled.

Definition of HQ Levels/Locations

Name Sub-Object / Node Name Description
Headquarters hq Contains the same information as worldhq if a more specific location is not available. (Example IP address: 195.112.167.84). Refers to the HQ of a parent company if the identified company is a subsidiary.
Domestic Headquarters domestichq The company information of the headquarters located in country indicated by the visitor's IP address.
Global Headquarters worldhw The company information and location of the ultimate global parent company.

JavaScript Example

In JavaScript, there are two ways to parse attributes from the returned dataset. The "dot notation",myVar.foo is essentially equivalent to the "array notation", myVar['foo']. The variable names for each attribute in the sub-objects of the headquarters hierarchy are the same as the base object, so we simply add a reference to the sub-object before the attribute name.

In this this sample callback function data is the main object returned. Be sure to check for the presence of the sub-object (using if statements) and program defensively against potential empty attributes (using || ' ') as shown here.

   function myCallback(data) {
           if(typeof data.worldhq !== 'undefined') {
               //Array-like access is safest
               parentCompanyName = data['worldhq']['company_name'] || '';
           }
 
           if(typeof data.domestichq !== 'undefined') {
//dot notation is ok too domesticHQCity = data.domestichq.city || ''; }   }

Note: Within the Demandbase JavaScript API, all sub-objects are automatically flattened, so HQ hierarchy fields can be accessed directly without checking for the sub-object.  For example: data.worldhq_company_name

 

Sample Response

This is an example of a JSON response from the IP Address API. The three levels of the HQ hierarchy are returned as sub-objects (or child nodes in XML) within the response. The three sub-objects are defined as follows: hq, domestichq, and worldhq.

{
	hq: {
		company_name: "Lenovo Group Ltd",
		demandbase_sid: 4032548,
		marketing_alias: "Lenovo",
		industry: "Software & Technology",
		sub_industry: "Software Applications",
		employee_count: null,
		primary_sic: "5045",
		street_address: "23/F Lincoln Hse Taikoo Place",
		city: "Quarry Bay",
		state: null,
		zip: null,
		country: "HK",
		country_name: "Hong Kong",
		phone: "+852 2516 3838",
		stock_ticker: null,
		web_site: "lenovo.com",
		annual_sales: 29574438000,
		revenue_range: "Over $5B",
		employee_range: "Unknown",
		b2b: true,
		b2c: true,
		traffic: "Very High",
		latitude: 0,
		longitude: 0,
		fortune_1000: false,
		forbes_2000: false,
		hq_sid: 4032548,
		domestichq_sid: 4032548,
		worldhq_sid: 4032548
	},
	domestichq: {
		company_name: "Lenovo Inc",
		demandbase_sid: 862731,
		marketing_alias: "Lenovo",
		industry: "Software & Technology",
		sub_industry: "Computer & Mobile Devices",
		employee_count: null,
		primary_sic: "3571",
		street_address: "1009 Think Pl",
		city: "Morrisville",
		state: "NC",
		zip: "27560",
		country: "US",
		country_name: "United States",
		phone: "919-294-2500",
		stock_ticker: null,
		web_site: "lenovo.com",
		annual_sales: 29574438000,
		revenue_range: "Over $5B",
		employee_range: "Unknown",
		b2b: true,
		b2c: true,
		traffic: "Very High",
		latitude: 35.8584,
		longitude: -78.8396,
		fortune_1000: false,
		forbes_2000: false,
		hq_sid: 4032548,
		domestichq_sid: 862731,
		worldhq_sid: 4032548
	},
	worldhq: {
		company_name: "Lenovo Group Ltd",
		demandbase_sid: 4032548,
		marketing_alias: "Lenovo",
		industry: "Software & Technology",
		sub_industry: "Software Applications",
		employee_count: null,
		primary_sic: "5045",
		street_address: "23/F Lincoln Hse Taikoo Place",
		city: "Quarry Bay",
		state: null,
		zip: null,
		country: "HK",
		country_name: "Hong Kong",
		phone: "+852 2516 3838",
		stock_ticker: null,
		web_site: "lenovo.com",
		annual_sales: 29574438000,
		revenue_range: "Over $5B",
		employee_range: "Unknown",
		b2b: true,
		b2c: true,
		traffic: "Very High",
		latitude: 0,
		longitude: 0,
		fortune_1000: false,
		forbes_2000: false,
		hq_sid: 4032548,
		domestichq_sid: 4032548,
		worldhq_sid: 4032548
	},
	registry_company_name: "Lenovo",
	registry_city: "Morrisville",
	registry_state: "NC",
	registry_zip_code: "27560",
	registry_area_code: 919,
	registry_dma_code: 560,
	registry_country: "United States",
	registry_country_code: "US",
	registry_country_code3: "USA",
	registry_latitude: 35.86009979248047,
	registry_longitude: -78.83260345458984,
	company_name: "Lenovo Inc",
	demandbase_sid: 862731,
	marketing_alias: "Lenovo",
	industry: "Software & Technology",
	sub_industry: "Computer & Mobile Devices",
	employee_count: null,
	isp: false,
	primary_sic: "3571",
	street_address: "1009 Think Pl",
	city: "Morrisville",
	state: "NC",
	zip: "27560",
	country: "US",
	country_name: "United States",
	phone: "919-294-2500",
	stock_ticker: null,
	web_site: "lenovo.com",
	annual_sales: 29574438000,
	revenue_range: "Over $5B",
	employee_range: "Unknown",
	b2b: true,
	b2c: true,
	traffic: "Very High",
	latitude: 35.8584,
	longitude: -78.8396,
	fortune_1000: false,
	forbes_2000: false,
	hq_sid: 4032548,
	domestichq_sid: 862731,
	worldhq_sid: 4032548,
	information_level: "Detailed",
	audience: "Enterprise Business",
	audience_segment: "Software & Technology",
	ip: "173.203.14.223"
}
Was this article helpful?
0 out of 0 found this helpful