Skip to main content

system.kanoa.inventory.getAssetBom(paramsDict)

Returns the fully flattened Bill-of-Materials for a specific installed asset instance, given its assetId inside paramsDict. Like getModelBom, this resolves any nested BOM structure into a single flat dataset. The resulting BOM reflects the asset's own overrides/extensions layered on top of (or in place of) its model-level BOM. This is a getter function and returns the dataset directly, not a (result, message) tuple.


Parameters

paramsDict Dictionary

- assetIdInteger

Returns

data pyDataset


Example

# Full flattened BOM for an asset
assetId = 3139
data = system.kanoa.inventory.getAssetBom({'assetId': assetId})
data = system.kanoa.utilities.convertDatasetToJSON(data)

for i, row in enumerate(data):
print 'Row %i'%i
for k,v in row.items():
print k,v

break #Just limiting to returning the columns from the first record for display purposes
>>>
Row 0
notes None
modelId None
partId 26
assetTypeName cell
positionCode None
positionName None
path Filler
assetId 3139
assetPath Kanoa Bottling Co\Tempe\Packaging Hall\Bottling Line 1\Filler
sourceModelNumber None
sourceModelDescription None
sourceManufacturerName None
partCategoryPath Bearings
uomCode EA
quantity 5.0
partPath Bearings\AAA111
uomId 1
sourceModelBomId None
depth 1
partDescription sklgmlkrgm
assetName Filler
uomName Each
partNumber AAA111
assetBomId 14
>>>