Back to Functions
XO.LITEM
Lookup a property of an inventory item by item code. Returns name, description, price, or status.
Syntax
=XO.LITEM(org_id, item_code, property)
Parameters
| Parameter | Required | Description |
|---|---|---|
| org_id | Yes | Organization ID from XO.ORG() |
| item_code | Yes | Item code. Case-insensitive match — 'widget-001' matches 'WIDGET-001'. |
| property | Yes | Property to return (0-3) |
Property Options
| Code | Property | Description |
|---|---|---|
| 0 | name | Item name |
| 1 | description | Item description |
| 2 | price | Sales unit price |
| 3 | status | Item status (ACTIVE, INACTIVE). Derived from Xero's IsSold and IsPurchased flags — an item is ACTIVE if sold or purchased, INACTIVE otherwise. |
Examples
Get item name:
=XO.LITEM(A2, "WIDGET-001", 0)Returns the name of item WIDGET-001.
Standard Widget
Get item price:
=XO.LITEM($A$2, "SERVICE-A", 2)Using absolute cell reference for org ID:
=XO.LITEM($A$2, "WIDGET-001", 0)Use $A$2 to lock the org ID reference when copying the formula across rows.
Get item description:
=XO.LITEM(A2, "WIDGET-001", 1)Returns the description text for the item (property 1).
About the Status Property
The Status value (ACTIVE/INACTIVE) is derived from Xero's IsSold and IsPurchasedflags — it's not a native Xero field. An item is ACTIVE if it's marked as sold or purchased, INACTIVE otherwise.
Troubleshooting
If you see an error, check the troubleshooting guide. XO Report shows readable guidance messages for connection issues (not caught by IFERROR) and standard Excel errors (#VALUE!, #N/A) for data problems — hover over the cell to see the specific message.