Account Heirarchy Query

Sam Ogden
Tera Guru

Hi All,

On service Now we are using the Account Heirarchy model as some of our clients have multiple brands.

Client 1 has :

Brand A

Brand B

Brand C

Client 2 has no child brands

On our customer portals we have a script includes that finds the logged in users company and any child companies linked to it.   So if a user was a member of client 1 the would see client one + brands A-C and see all calls for these brands and be able to raise a ticket under any of those brands.

2 of our clients have no agreed a partnership on a new brand.   This would mean that for the particular band e.g. 'Brand D' people from Client 1 and people from Client 2 would need to see these tickets and raise tickets for this brand.   However people from client 2 would not be able to see or raise for brands A-C

What would be the best way to achieve this as from what I can tell in SN there is not the possibility in the Accounts module to add a child to multiple parents.

Thanks

Sam

1 ACCEPTED SOLUTION

Patrick Schult2
Giga Guru

As far as your parent/child path question for how to show the top company's child brands, I recommend you look at using the Account Path and Account Code fields on the Account table. Each Account has an automatically generated code, which gets placed into the Account Path value. Account Path tells you the hierarchy of the given Account.



The reason this is helpful is that you already know which company the logged in user belongs to, so you can therefore easily look at the top-most company via the Account Path. Then, because you have the top-most company's Account Code, you can turn around and do a simple query for any company that has code in its path. See the screenshots for an example.



Maybe look at setting up Partner access for the 2 companies that are related to each other. That sounds like an unusual situation but that sounds reasonable based on the information you provided already.


View solution in original post

6 REPLIES 6

Thanks for the docs link.



Just tried this in our DEV instance and seems like this can work.   And been able to amend my scripts to cater for this.



Just a quick question - it allows you to create any custom relationship you like between accounts or partners, is there any best practice around this?



Thanks



Sam


I think some of the base relationship types are specifically used in the base CSM scripts, so I would leave those alone, but otherwise just stick to your best judgment on creating the new relationship types.