A product in an organisation's catalogue: anything that can be ordered or redeemed, such as physical goods, vouchers or calendar bookings. A product belongs to one organisation, may be sourced from a supplier organisation, and may have variants, held as ProductSku rows built from the combinations of its ProductParameter options. Categorisation goes through ProductInCategory join rows rather than a direct list of categories. Products are soft deleted, so nearly every query excludes rows with a deletedDate or deletedBy set, and a soft delete also renames the product so its name can be reused.
Group: Database Entities
Implements: Serializable, Auditable, Translatable
Properties
| Property | Returns | Description |
|---|---|---|
| assetId | String | Identifier of an asset library record this product is linked to, tying a catalogue product back to a managed asset. Null when the product is not linked to an asset. |
| auditOrg | Organisation | The organisation that this product's audit entries are recorded against, which is always the organisation that owns the product. |
| baseCost | BigDecimal | The base cost of the product, which is added to by any selected variations with non-null costs and multiplied by quantity. May be null, in which case pricing falls back to the SKU cost. |
| brand | Category | The category record used as this product's brand. Optional, so it is null when no brand has been assigned. |
| brief | String | Short summary of the product, for listings and tiles where the full description is too long. Holds up to 20000 characters and may be null. |
| canOrder | Boolean | Whether the product may currently be ordered. Null means no explicit choice has been recorded for the product. |
| canOrderQuantity | boolean | Whether a shopper may choose a quantity greater than one when ordering this product. |
| createdDate | Date | When the product record was created. |
| deletedBy | Profile | The profile that soft deleted this product. Null on a live product, and also null when the product was deleted anonymously, so treat the deleted date as the reliable test for deletion. |
| deletedDate | Date | When the product was soft deleted. Null on a live product. Most product queries exclude rows where this is set. |
| endDate | Date | Date after which the product is no longer available. Stored as a date with no time part, and null when there is no end restriction. |
| field1 | String | Free-text custom field 1 on the product. The platform gives it no meaning of its own; each app decides what to store in it. |
| field2 | String | Free-text custom field 2 on the product. The platform gives it no meaning of its own; each app decides what to store in it. |
| field3 | String | Free-text custom field 3 on the product. The platform gives it no meaning of its own; each app decides what to store in it. |
| freightCost | BigDecimal | Optional shipping cost, added to the base cost when the product is ordered. Null when no freight is charged. |
| id | long | Database identifier for this product, unique across the platform and stable for the life of the row. |
| images | List<ItemImage> | The images attached to this product, unwrapped from their link rows and in link order. Runs a query on each call, so hold the result rather than calling it repeatedly. |
| name | String | Portable, path-safe code for the product, intended to be unique within the organisation and used as the lookup key in URLs and imports. This is usually the product code or SKU. A soft delete rewrites it by appending a deleted marker and the deletion time, so the original name can be reused. |
| notes | String | The long description, or content, field for the product, typically the HTML shown on the product detail page. Holds up to 20000 characters and may be null. |
| orderColumns | String | Comma separated list of the extra column names to capture on an order line for this product. Call orderColumns for the same value already split and trimmed into a list. |
| position | Integer | Manual sort order for this product in listings that order by position. Null when the product has not been explicitly positioned. |
| productImages | List<ProductImage> | The image link rows for this product. These are not held on the product row, so every call runs a query against the current session; hold the result rather than calling it inside a loop. |
| productInCategorys | List<ProductInCategory> | The join rows linking this product to the categories it appears in. Read getCategory on each row to reach the category itself, or call findCategoriesInAdmin to get the categories directly. Lazily loaded, and null on a product that has never been categorised. |
| productInStores | List<ProductInEComStore> | The e-commerce store listings this product appears in. Runs a query on each call. |
| productParameters | List<ProductParameter> | The variant dimensions defined for this product, such as size or colour. Each parameter carries its own options, and a ProductSku is one combination of those options. Null on a product with no variants. |
| productSkus | List<ProductSku> | Every SKU variant of this product, soft deleted ones included. Call productSkus instead when you only want the live variants. Lazily loaded, and null on a product that has never had SKUs. |
| relatedAppId | String | If this product relates to something outside the catalogue, such as a calendar booking or a voucher, this is the id of the app that handles the related entity. Null for a plain catalogue product. |
| relatedItemId | String | The identifier of the related item within the app named by getRelatedAppId. It is stored as a string and the owning app decides how it is populated and interpreted. Null for a plain catalogue product. |
| repeating | boolean | Whether this is a repeating product, which is true when both a repeat multiple and repeat units have been set. Derived on each call rather than stored. |
| repeatMultiple | Integer | How many repeat units make up one repeat interval, for example 2 with repeat units of w meaning every two weeks. Null on a one-off product. |
| repeatUnits | String | The unit of the repeat interval: d for day, w for week, m for month or y for year. Null on a one-off product. |
| rrp | BigDecimal | Optional recommended retail price, held so a store can show it alongside the actual price. It is not used in any cost calculation. |
| sourceId | String | The key under which this product's translations are stored, which is the product's name rather than its id. Renaming a product therefore orphans its existing translations. |
| sourceType | String | The type name under which this product's translations are stored, which is always Product. |
| startDate | Date | Date on which the product becomes available. Stored as a date with no time part, and null when there is no start restriction. |
| status | String | Free-text status label for the product. The platform does not constrain or interpret the values; the app that sets the status decides what they mean. |
| supplier | Organisation | The organisation that supplies this product, used to filter and group a catalogue by supplier. Optional, so it is null for products with no supplier recorded. |
| title | String | Free-text display label for the product, entered by an administrator and shown to shoppers. It is not unique and not path-safe, so use the name when you need a stable lookup key. |
| webName | String | Alternative path-safe name used to address this product on a website, so the public URL can differ from the internal name. Null when the product is addressed by its name. |
Methods
getId() · getTitle() · isCanOrderQuantity() · isCanOrder() · getName() · getNotes() · getBrief() · getStatus() · getDeletedBy() · getDeletedDate() · getCreatedDate() · getStartDate() · getEndDate() · getSupplier() · getProductInCategorys() · getBrand() · getProductSkus() · getProductParameters() · getBaseCost() · getFreightCost() · getRrp() · getOrderColumns() · getRelatedAppId() · getRelatedItemId() · getWebName() · getAssetId() · getRepeatMultiple() · getRepeatUnits() · getField1() · getField2() · getField3() · orderColumns() · findImage(String name) · image(Long l) · findParameter(String variantTypeCode) · hasCategory(Category c) · hasCategory(String catName) · getProductInCategory(Category c) · getAuditOrg() · findProductSku(Long id) · getSourceType() · getSourceId() · getPosition() · attributeValues(String attName) · productSkus() · findProductSku(String skuCode) · isRepeating() · getProductImages() · getImages() · getProductInStores() · findCategoriesInAdmin(Organisation adminOrg)
getId()
Returns: long
Database identifier for this product, unique across the platform and stable for the life of the row.
getTitle()
Returns: String
Free-text display label for the product, entered by an administrator and shown to shoppers. It is not unique and not path-safe, so use the name when you need a stable lookup key.
isCanOrderQuantity()
Returns: boolean
Whether a shopper may choose a quantity greater than one when ordering this product.
isCanOrder()
Returns: Boolean
Whether the product may currently be ordered. Null means no explicit choice has been recorded for the product.
getName()
Returns: String
Portable, path-safe code for the product, intended to be unique within the organisation and used as the lookup key in URLs and imports. This is usually the product code or SKU. A soft delete rewrites it by appending a deleted marker and the deletion time, so the original name can be reused.
getNotes()
Returns: String
The long description, or content, field for the product, typically the HTML shown on the product detail page. Holds up to 20000 characters and may be null.
getBrief()
Returns: String
Short summary of the product, for listings and tiles where the full description is too long. Holds up to 20000 characters and may be null.
getStatus()
Returns: String
Free-text status label for the product. The platform does not constrain or interpret the values; the app that sets the status decides what they mean.
getDeletedBy()
Returns: Profile
The profile that soft deleted this product. Null on a live product, and also null when the product was deleted anonymously, so treat the deleted date as the reliable test for deletion.
getDeletedDate()
Returns: Date
When the product was soft deleted. Null on a live product. Most product queries exclude rows where this is set.
getCreatedDate()
Returns: Date
When the product record was created.
getStartDate()
Returns: Date
Date on which the product becomes available. Stored as a date with no time part, and null when there is no start restriction.
getEndDate()
Returns: Date
Date after which the product is no longer available. Stored as a date with no time part, and null when there is no end restriction.
getSupplier()
Returns: Organisation
The organisation that supplies this product, used to filter and group a catalogue by supplier. Optional, so it is null for products with no supplier recorded.
getProductInCategorys()
Returns: List<ProductInCategory>
The join rows linking this product to the categories it appears in. Read getCategory on each row to reach the category itself, or call findCategoriesInAdmin to get the categories directly. Lazily loaded, and null on a product that has never been categorised.
getBrand()
Returns: Category
The category record used as this product's brand. Optional, so it is null when no brand has been assigned.
getProductSkus()
Returns: List<ProductSku>
Every SKU variant of this product, soft deleted ones included. Call productSkus instead when you only want the live variants. Lazily loaded, and null on a product that has never had SKUs.
getProductParameters()
Returns: List<ProductParameter>
The variant dimensions defined for this product, such as size or colour. Each parameter carries its own options, and a ProductSku is one combination of those options. Null on a product with no variants.
getBaseCost()
Returns: BigDecimal
The base cost of the product, which is added to by any selected variations with non-null costs and multiplied by quantity. May be null, in which case pricing falls back to the SKU cost.
getFreightCost()
Returns: BigDecimal
Optional shipping cost, added to the base cost when the product is ordered. Null when no freight is charged.
getRrp()
Returns: BigDecimal
Optional recommended retail price, held so a store can show it alongside the actual price. It is not used in any cost calculation.
getOrderColumns()
Returns: String
Comma separated list of the extra column names to capture on an order line for this product. Call orderColumns for the same value already split and trimmed into a list.
getRelatedAppId()
Returns: String
If this product relates to something outside the catalogue, such as a calendar booking or a voucher, this is the id of the app that handles the related entity. Null for a plain catalogue product.
getRelatedItemId()
Returns: String
The identifier of the related item within the app named by getRelatedAppId. It is stored as a string and the owning app decides how it is populated and interpreted. Null for a plain catalogue product.
getWebName()
Returns: String
Alternative path-safe name used to address this product on a website, so the public URL can differ from the internal name. Null when the product is addressed by its name.
getAssetId()
Returns: String
Identifier of an asset library record this product is linked to, tying a catalogue product back to a managed asset. Null when the product is not linked to an asset.
getRepeatMultiple()
Returns: Integer
How many repeat units make up one repeat interval, for example 2 with repeat units of w meaning every two weeks. Null on a one-off product.
getRepeatUnits()
Returns: String
The unit of the repeat interval: d for day, w for week, m for month or y for year. Null on a one-off product.
getField1()
Returns: String
Free-text custom field 1 on the product. The platform gives it no meaning of its own; each app decides what to store in it.
getField2()
Returns: String
Free-text custom field 2 on the product. The platform gives it no meaning of its own; each app decides what to store in it.
getField3()
Returns: String
Free-text custom field 3 on the product. The platform gives it no meaning of its own; each app decides what to store in it.
orderColumns()
Returns: List<String>
The extra order line column names for this product, taken from the comma separated orderColumns value and trimmed. Returns an empty list when none are configured.
findImage(String name)
Returns: ItemImage
Finds an image attached to this product by name. Loads the product's images with a query, then matches the name exactly and case sensitively.
| Parameter | Description |
|---|---|
name | the image name to match exactly |
image(Long l)
Returns: ItemImage
Finds an image attached to this product by its id. Loads the product's images with a query and returns the first one with a matching id.
| Parameter | Description |
|---|---|
l | the image id to look for |
findParameter(String variantTypeCode)
Returns: ProductParameter
Finds one of the product's variant parameters by name, matched case insensitively. A leading param- prefix on the code is stripped before matching, so both the prefixed and bare forms work.
| Parameter | Description |
|---|---|
variantTypeCode | the parameter name, with or without a param- prefix |
hasCategory(Category c)
Returns: boolean
Whether this product is in the given category, compared by category id. Reads the already loaded category links and does not run a query.
| Parameter | Description |
|---|---|
c | the category to test for |
hasCategory(String catName)
Returns: boolean
Whether this product is in a category with the given name, matched exactly and case sensitively against the category's name, not its title.
| Parameter | Description |
|---|---|
catName | the category name to test for |
getProductInCategory(Category c)
Returns: ProductInCategory
Returns the join row that links this product to the given category, matched by category id.
| Parameter | Description |
|---|---|
c | the category to look up |
getAuditOrg()
Returns: Organisation
The organisation that this product's audit entries are recorded against, which is always the organisation that owns the product.
findProductSku(Long id)
Returns: ProductSku
Finds one of the product's live SKUs by id. Soft deleted SKUs are not considered, so a deleted SKU is reported as missing.
| Parameter | Description |
|---|---|
id | the SKU id to look for |
getSourceType()
Returns: String
The type name under which this product's translations are stored, which is always Product.
getSourceId()
Returns: String
The key under which this product's translations are stored, which is the product's name rather than its id. Renaming a product therefore orphans its existing translations.
getPosition()
Returns: Integer
Manual sort order for this product in listings that order by position. Null when the product has not been explicitly positioned.
attributeValues(String attName)
Returns: List<String>
Lists the distinct values that this product's SKUs use for one variant parameter, for example every colour the product comes in. Returns an empty list when the product has no SKUs or no parameter of that name.
| Parameter | Description |
|---|---|
attName | the parameter name, resolved the same way as findParameter |
productSkus()
Returns: List<ProductSku>
The product's live SKUs, being those with no deletedBy set. Use this rather than getProductSkus whenever you are showing variants to a shopper, since getProductSkus also returns deleted ones.
findProductSku(String skuCode)
Returns: ProductSku
Finds one of the product's SKUs by its code, matching the SKU name exactly. SKUs with a deleted date set are skipped.
| Parameter | Description |
|---|---|
skuCode | the SKU name to match |
isRepeating()
Returns: boolean
Whether this is a repeating product, which is true when both a repeat multiple and repeat units have been set. Derived on each call rather than stored.
getProductImages()
Returns: List<ProductImage>
The image link rows for this product. These are not held on the product row, so every call runs a query against the current session; hold the result rather than calling it inside a loop.
getImages()
Returns: List<ItemImage>
The images attached to this product, unwrapped from their link rows and in link order. Runs a query on each call, so hold the result rather than calling it repeatedly.
getProductInStores()
Returns: List<ProductInEComStore>
The e-commerce store listings this product appears in. Runs a query on each call.
findCategoriesInAdmin(Organisation adminOrg)
Returns: List<Category>
Lists the categories this product is in that belong to the given organisation, so an administrator only sees categories from their own organisation. Returns an empty list when the product has no categories.
| Parameter | Description |
|---|---|
adminOrg | the organisation whose categories should be returned |