# system.kanoa.inventory.addModelBomItem(bomInfo, userId)

Adds a new Bill-of-Materials (BOM) line item to an equipment model, or updates an existing one when `modelBomId` is supplied inside `bomInfo`. 
A model BOM entry describes a single component position within the model's catalog-level structure, either a raw part (`partId`) 
or a nested child model (`childModelId`), along with the quantity and unit of measure required at that position. Because `partId` 
and `childModelId` are mutually exclusive, each BOM item represents either a purchased/stocked part or a sub-assembly modeled as its own equipment model, never both.

---
### Parameters
**bomInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - childModelId</td><td>Integer</td><td>Not required, mutually exclusive with partId</td></tr>	
 	<tr><td> - enabled</td><td>Boolean</td><td>Not required</td></tr>	
 	<tr><td> - modelBomId</td><td>Integer</td><td>Not required, pass to update</td></tr>	
 	<tr><td> - modelId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - notes</td><td>String</td><td>Not required</td></tr>	
 	<tr><td> - parentBomId</td><td>Integer</td><td>Not required</td></tr>	
 	<tr><td> - partId</td><td>Integer</td><td>Not required, mutually exclusive with childModelId</td></tr>	
 	<tr><td> - positionCode</td><td>String</td><td>Not required</td></tr>	
 	<tr><td> - positionName</td><td>String</td><td>Not required</td></tr>	
 	<tr><td> - quantity</td><td>Float</td><td></td></tr>	
 	<tr><td> - uomId</td><td>Integer</td><td></td></tr>	
	</tbody>
</table>

**userId** `Integer`:Id of the user executing the function<br />

---
### Returns
**modelBomId** `Integer`<br />
**message** `String` None if success<br />

---
### Example
```python
bomInfo = {
	            'modelId': 1042,
	            'partId': 8891,
	            'quantity': 2.0,
	            'uomId': 1,
	            'positionCode': 'P1-A',
	            'positionName': 'Drive Shaft Bearing',
	            'enabled': True,
	            'notes': 'Standard replacement bearing for this position'
            }
userId = system.kanoa.security.getIDPUserId({'userName': 'SYSTEM'})
modelBomId, message = system.kanoa.inventory.addModelBomItem(bomInfo, userId)
print modelBomId, message
```
