# system.kanoa.item.linkItemStates(linkInfo, userId)

Links assetIds with itemStateIds, itemStateClassIds, itemIds and itemClassIds. linkInfo keys are required

---
### Parameters
**linkInfo** `Dictionary`<br />
<table class='dictionaryKeyTable'>
	<tbody>
 	<tr><td> - assetId</td><td>Integer</td><td></td></tr>	
 	<tr><td> - itemClassId</td><td>Integer</td><td>Can be None if itemId is provided</td></tr>	
 	<tr><td> - itemId</td><td>Integer</td><td>Can be None if itemClassId is provided</td></tr>	
 	<tr><td> - itemStateClassId</td><td>intCan</td><td>Can be None if itemStateId is provided</td></tr>	
 	<tr><td> - itemStateId</td><td>Integer</td><td>Can be None if itemStateClassId is provided</td></tr>	
	</tbody>
</table>

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

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

---
### Example
```python
userId = 1
paramsDict = {'assetId': 5, 'itemStateId': None, 'itemStateClassId': 7, 'itemId': None, 'itemClassId': 47, 'enabled': True}
itemStateLinkId, msg = system.kanoa.item.linkItemStates(paramsDict, userId)
```
