XO.LITEM
Lookup a property of an inventory item by item code. Returns name, description, price, or status.
Syntax
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.
Get item price:
=XO.LITEM($A$2, "SERVICE-A", 2)Using absolute cell reference for org ID:
=XO.LITEM($A$2, "WIDGET-001", 0)Get item description:
=XO.LITEM(A2, "WIDGET-001", 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.
For a complete overview of building Xero reports in Excel — including how this function fits into a full workflow — see our complete Xero to Excel guide.