In order to create something like this, you'll need to create a Network and create a service that has JavaScript similar to the below functionality.
Example Network Structure:

Example Javascript:
var connections;
connections = Networks['AcmeVending'].GetNetworkConnectionsWithTemplate();
var params = {
dataShapeName : "ExampleNetwork",
infoTableName : "AssetHierarchy"
};
var assets = Resources['InfoTableFunctions'].CreateInfoTableFromDataShape(params);
var connection;
for each(connection in connections.rows) {
var data = new Object();
data.to = connection.to;
data.from = connection.from;
data.connectionType = connection.connectionType;
var thing = Things[connection.to];
if (thing.StatusCode != 0) {
data.description = thing.description;
data.location = thing.Location;
if (connection.thingTemplate == 'Site') {
data.inService = "";
data.zoom = 16;
} else if (connection.thingTemplate == 'Corp') {
data.inService = "";
data.zoom = 6;
} else if (connection.thingTemplate == 'Region') {
data.inService = "";
data.zoom = 9;
} else {
data.outOfStockPct = thing.PercentTimeOutOfStock;
data.inServicePct = thing.PercentTimeInService;
data.complaints = thing.TotalComplaints;
data.salesVgoal = thing.SalesVsGoal;
data.inService = thing.InService;
data.zoom = 18;
}
data.assetType = connection.thingTemplate + ":" + data.inService;
assets.AddRow(data);
}
}
var result = assets;