Item
Overview
The Item object describes a product or service purchased as part of a transaction. It is used to inform the loyalty engine about what was bought, and supports features such as benefit calculation, reporting, segmentation, and reward logic.
When to Use This Object
Include an Item object in your transaction payload whenever:
- A purchasable product or service is being recorded
- You need to enable benefit or discount calculations per item
- Reporting or analysis requires categorization of line items
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
lineId | string | Yes | Unique identifier for the item line within the transaction |
code | string | Yes | Product or service code (SKU, PLU, or internal identifier) |
name | string | Yes | Descriptive name of the product or service |
departmentCode | string | Yes | Category or department identifier |
departmentName | string | Yes | Human-readable name of the category or department |
quantity | number | Yes | Number of units purchased |
grossAmount | number | Yes | Pre-discount price in smallest currency unit (e.g., cents or kuruş) |
netAmount | number | Yes | Final price after all discounts have been applied |
tags | string[] | No | Optional flags or labels for business logic (e.g., ["promo"]) |
action | string | No | Indicates the operation type (e.g., "sale", "return") |
Sample Payload
{
"lineId": "1",
"code": "LATTE001",
"name": "Latte",
"departmentCode": "DRINKS",
"departmentName": "Beverages",
"quantity": 1,
"grossAmount": 1500,
"netAmount": 1500,
"action": "sale",
"tags": ["coffee", "hot"]
}
Related Use Cases
- Submitting itemized transaction data via
/transaction - Associating benefits or discounts with specific items
- Enabling rule-based segmentation by category or tag