API considerations for account hierarchies

Please refer to hierarchy fundamentals and data objects for more information.

Syntax for account hierarchies

If your account structure uses a multi-level hierarchy, all of the data that will be sent to Totango will use the same syntax as in the general HTTP API or JavaScript Collector guides, with a few small exceptions (highlighted in yellow).

A parent ID must be explicitly defined; however, not every call into Totango needs to include the parent ID. (Most integration use cases define parent ID from a set of jobs outside the scope of the API.) Do not bring over the parent ID unless explicitly intending to do so via API.

Parent Account

  • Account ID: Required
  • Name: Required. This requirement is only to establish name; there is no need to send this in subsequent calls, unless the name changes.

All other attributes optional.

Parent-sub account (child)

  • Account ID: Required
  • Name: Required. This requirement is only establish name; there is no need to send this in subsequent calls, unless the name changes.
  • Parent ID: Required. Account ID of the parent account.  Syntax: sdr_o.parent_id. This requirement is only to establish the parent; there is no need to send this in subsequent calls, unless the parent changes.

All other attributes optional.

Product account

  • Account ID: Refer to products and account types for choosing the Product Account ID.
  • Name: Optional, depending on settings.
  • Parent ID: Required. Account ID of the parent account.  Syntax: sdr_o.parent_id. This requirement is only to establish the parent; there is no need to send this in subsequent calls, unless the parent changes.
  • Product ID: Required. This requirement is only to establish the product; there is no need to send this in subsequent calls.

All other attributes optional.

Examples

Let's refer to the following example:

Assume that all account IDs are the same as the names mentioned in the diagram.

HTTP API

Refer to HTTP API for more information.

Send attribute Industry to parent account

https://sdr.totango.com/pixel.gif/?sdr_s=SP-0000-11&sdr_o=GHQ&sdr_o.Industry=Industrial

Send attribute Success Manager to child account

https://sdr.totango.com/pixel.gif/?sdr_s=SP-0000-11&sdr_o=Protractor&sdr_o.Success%20Manager=John%20Doe&sdr_o.parent_id=GHQ

Send attribute Contract Value to product account

https://sdr.totango.com/pixel.gif/?sdr_s=SP-0000-11&sdr_o=100_Denticon&sdr_o.Contract%20Value=30000&sdr_o.parent_id=Protractor&sdr_o.product_id=B

*Note that all levels require that you send data only to that level. You cannot send data about the Child Account via the Product Account or vice versa.

HTTP API for activity tracking in a hierarchy

Your activity tracking will always flow in at the product account level. Here is an example of how to send this data:

https://sdr.totango.com/pixel.gif/?sdr_s=SP-0000-11&sdr_o=100_Denticon&sdr_u=someone@somewhere.com&sdr_a=Login&sdr_m=Application

You can also intermix product account attributes within the tracking call:

https://sdr.totango.com/pixel.gif/?sdr_s=SP-0000-11&sdr_o=Protractor_B&sdr_u=someone@somewhere.com&sdr_a=Login&sdr_m=Application&sdr_o.Contract%20Value=30000&sdr_o.parent_id=Protractor&sdr_o.product_id=B

JavaScript Collector

Refer to JavaScript Collector for more information.

var totango_options = {
  service_id: "SP-0000-01",                     // your unique Totango service id. Don't change this.
region: "eu1", // Add this line for EU service only.
user: { id: "james.dragmire@yahoo.com", // User ID name: "James Dragmire", // Name of User }, account: { id: "782246", // Account ID parent_id: "239487654", // parent_id name: "Microsoft", // account_name status: "Paying", // OPTIONAL: status of the account "Free", "Paying", .. "Create Date": "2011-12-20T19:25:58.0Z" // OPTIONAL: date the account was created }, product: { id: "Office 360" // product_id }, };

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request