Highlighted

Libraries | Profiles relationship

Bronze Contributor
Bronze Contributor

Hello; 

Similarly to the Permission Export feature in Tealium Custom Tools, is there something can automagically provide me with a list of profile and their associated / linked libraries? 

Thanks, 

Runa

5 REPLIES 5
Highlighted

Libraries | Profiles relationship

Tealium Expert
Tealium Expert

So, @mukherr, this will give you a quick view of which profiles inherit from which libraries, just paste it into the dev tools console in Chrome or similar while logged into TIQ:

var p = utui.profile.import._profiles;
var op = "";
for(var k in p){
  op += p[k].name;
  for(var i = 0; i < p[k].imports.length; i++){
    op += "\n  " + p[k].imports[i].name;
  }
  op += "\n\n";
}
console.log(op);

Alternatively, this will give you a CSV that contains all relationships to stick into a graph database:

var p = utui.profile.import._optionalLibraries;
var op = "Profile,Library";
for(var k in p){
  for(var i = 0; i < p[k].imports.length; i++){
    op += "\n" + p[k].imports[i].name + "," + p[k].name;
  }
}
console.log(op);

Explore the _profiles, _optionalLibraries and _requiredLibraries properties of the utui.profile.import object in the TIQ UI for more detail..

Libraries | Profiles relationship

Bronze Contributor
Bronze Contributor

could there be an issue of the s in import vs. imports, @UnknownJ. This does not seem to work for me,

Highlighted

Libraries | Profiles relationship

Bronze Contributor
Bronze Contributor

Also, as a stopgap, I did a JSON.stringify(utui.profile.import._profiles), which provided me a really ugly blob which I beautified outside. The JSON contains provides the Profiles and the subset of libs

Highlighted

Libraries | Profiles relationship

Bronze Contributor
Bronze Contributor

So it turns out that the reason why it wasn't working is because we have profiles with no libs (as we are still building our solution). By excluding the profile with no libs, we were able to pull the necessary data. 

Thanks

Highlighted

Libraries | Profiles relationship

Employee Emeritus

Ah good to know @mukherr. That's an interesting solution. Thank you for coming back and letting us and future readers know!

CC: @UnknownJ

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.