Using Account Watch Attributes

  • Updated

How to Programmatically Access Account Watch Attributes

The watch_list node is only returned when a company in the watch list is identified by the API call. The data object returned for a visitor whose company is not in the Account Watch list will not contain the watch_list node, so be sure to make sure the node exists before attempting to parse Account Watch attributes.

Here is an example callback function that uses JavaScript to access an Account Watch attribute:

function myCallback(data) {
     if(data && !(typeof data.watch_list == "undefined")) {
          var acctStatus = data.watch_list.account_status || '';
          //Alternative/safer way to assign attributes (if Account Watch attributes contain dashes)
          var acctStatus = data['watch_list']['account-status'] || '';

Notice how this function checks to see if the data object is returned, checks if the watch_list object exists and then assigns a blank value to the acctStatus variable if the account_status attribute does not exist.

The watch_list node is a nested object that generally appears at the end of the returned data set. Keep this in mind if iterating through the returned data attributes.


    "company_name": "Advance Magazine Publishers Inc",
    "information_level": "Detailed",
    "audience": "Enterprise Business",
    "audience_segment": "Media & Entertainment",
    "ip": ""
    "watch_list": {
         "account_status" : "Customer"



Variable Names for Account Watch Attributes

The variable name of each attribute in the watch_list object is determined by the name of the attribute in the header row of the Account Watch tab of the Demandbase Customizations spreadsheet. In most cases, attribute names will be lowercase with spaces replaced by underscores.

You can view the attribute names by having your Customer Success Manager download your Account Watch file. Alternatively, call the IP Address API and override the query parameter with an IP address from a company in the watch list.


Add your company to the list of targeted accounts so that the watch_list object will be returned for internal users. This simplifies development by eliminating the need to know the IP address of a company in the list.


If you have information that you consider confidential, we recommend you obfuscate the value, using a convention that you determine to mask the value you need to track. For example, for the account_status example above, "Customer" might be substituted for with "1" and "Prospect" could be "2".

Was this article helpful?

2 out of 3 found this helpful