Managing multiple level accounts

Overview

If you have multiple levels of accounts - parent accounts on top of child-accounts - you can pass this additional information to Pendo in the snippet.  

In addition, a separate Parent Account subscription setting must be enabled by a Pendo representative, and can be requested through success@pendo.io or through your Customer Success Manager

 

Important: before you implement this feature, please read the following information carefully to make sure this is the right set up for your organization: 

1. The structure of this change is not just adding on an additional object, linked to the account object. The accountId is replaced with a parentAccountId prepended to a childAccountId, in the format parentAccountId::childAccountId. This string is created from your accountId and parentAccountId designations in the snippet (example is at the end of this article). 

2. Because of this structure, if you decide to turn off the parent accounts and start passing in just the child account id, you will not be able to merge with the data that also had those same child account ids, if they were linked to parent accounts. You will end up creating a whole new set of account Ids. 

3. In the Pendo UI, by default, you will have a Visitors Page and an Accounts Page, which lists all your visitors and accounts respectively. With parent accounts turned on, when you navigate to the Accounts page in Pendo after Parent Accounts are enabled, you'll see it's actually defaulted to Parent Accounts, giving you limited visibility into account (mid level) metrics. We currently don't offer an in-app view of Accounts AND Parent Accounts with all metrics. You can always create account reports to drill down into Account-level metrics, but you won't get the same charts/graphs for Accounts in the Pendo UI.

4. And finally, this structure means that the dashboard widgets which are set to calculate on account based data, will pull in data for the combination of parentAccountId::childAccountId.

Snippet Structure

The structure of the snippet with multiple levels of accounts looks as follows:

<script>
  (function(apiKey){
    (function(p,e,n,d,o){var v,w,x,y,z;o=p[d]=p[d]||{};o._q=[];
      v=['initialize','identify','updateOptions','pageLoad'];for(w=0,x=v.length;w<x;++w)(function(m){
      o[m]=o[m]||function(){o._q[m===v[0]?'unshift':'push']([m].concat([].slice.call(arguments,0)));};})(v[w]);
      y=e.createElement(n);y.async=!0;y.src='https://cdn.pendo.io/agent/static/'+apiKey+'/pendo.js';
      z=e.getElementsByTagName(n)[0];z.parentNode.insertBefore(y,z);})(window,document,'script','pendo');

    // Call this whenever information about your visitors becomes available
    // Please use Strings, Numbers, or Bools for value types.
    pendo.initialize({

    visitor: {
      id:              'VISITOR-UNIQUE-ID'   // Required if user is logged in
      // email:        // Optional
      // role:         // Optional

      // You can add any additional visitor level key-values here,
      // as long as it's not one of the above reserved names.
    },

    account: {
      id:           'ACCOUNT-UNIQUE-ID' // Highly recommended
      // name:         // Optional
      // planLevel:    // Optional
      // planPrice:    // Optional
      // creationDate: // Optional

      // You can add any additional account level key-values here,
      // as long as it's not one of the above reserved names.
    },

    parentAccount: {
      id:           'PARENT-ACCOUNT-UNIQUE-ID'
      // name:         // Optional
      // You can add any additional master account level
      // key-values here.
    }
  })('<ACTUAL_API_KEY_HERE>');
</script>
Note: we recommend grabbing the install snippet from the install settings page within the app as it will already have the correct API key populated in the snippet. This is a generic snippet that needs to have the last line swapped out with your actual API key

Parent Accounts for Mobile

Parent accounts can work for mobile applications as well. 

  1. Just like for web applications, you first need to check the box for "Parent Accounts" under your Pendo Subscription Settings.
  2. When you set the account Id in the Pendo SDK initialization, use this special format to set a parent account ID as well: parentAccountId::accountId.

Limitation: At the moment, you cannot set metadata for the parent account through the mobile SDK.