Represents a single row of sales performance data recorded against a sales data series, covering one participant and one reporting period. A record carries an amount plus up to fifteen custom fields (whose names and order are defined by the owning series) and up to five free-text tags, and is scoped to the organisation that collected the data. Records are entered manually, imported from CSV uploads, or created by integrations, and are later matched against other records, scored against targets, and used to allocate reward points; a record's rewards issued date is set once points have been generated from it. The class also exposes a large set of static finder and aggregate query methods (sum, average, minimum, maximum, count) used for reporting and leaderboards across a series.

Group: Database Entities

Implements: Serializable, Auditable


Properties

PropertyReturnsDescription
amountBigDecimalThe numeric value recorded for this sale, in the units defined by the owning series (for example a currency amount or a count). This is the value summed, averaged and compared against targets in reporting.
auditOrgOrganisationThe organisation that audit entries for changes to this record are recorded against, which is the collecting organisation.
collectorOrgOrganisationThe organisation that collected this sales data, which is the same organisation that owns the parent sales data series. Used to scope audit records and access control for this record.
dateEnteredDateDate and time the record was entered or imported into the system. This is distinct from the reporting period the record covers.
enteredByProfileThe profile who entered or imported this record, for audit purposes. This is not necessarily the participant the sale is attributed to.
field1StringThe value of custom field 1 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field10StringThe value of custom field 10 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field11StringThe value of custom field 11 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field12StringThe value of custom field 12 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field13StringThe value of custom field 13 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field14StringThe value of custom field 14 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field15StringThe value of custom field 15 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field2StringThe value of custom field 2 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field3StringThe value of custom field 3 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field4StringThe value of custom field 4 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field5StringThe value of custom field 5 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field6StringThe value of custom field 6 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field7StringThe value of custom field 7 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field8StringThe value of custom field 8 (of up to fifteen) for this record. Field names and order are defined by the owning series.
field9StringThe value of custom field 9 (of up to fifteen) for this record. Field names and order are defined by the owning series.
idlongThe database-assigned unique identifier for this record.
periodFromDateThe start of the reporting period that this sale occurred in. Most queries and reports for a series filter and order records by this field.
periodToDateThe end of the reporting period that this sale occurred in.
productSkuStringThe SKU code of the product this sale relates to, used to look up the matching product SKU record. May be null or blank if the record is not associated with a specific product.
rewardsIssuedDateDateThe date on which reward points were generated for this record, set once processing has allocated points from it.
salesByBaseEntityThe organisation or user that the sale is attributed to, used for leaderboards, targets and reward point allocation. May be a profile or a suborganisation depending on how the series is configured.
salesTeamOrganisationThe sales team organisation that the participant belongs to, if the sale should also be attributed to a team for team-level reporting and rewards.
seriesSalesDataSeriesThe sales data series that this record belongs to. The series defines the field names, frequency and target calculations that this record is measured against.
tag1StringThe free-text value of tag 1 (of up to five) on this record, used for ad-hoc categorisation and search.
tag2StringThe free-text value of tag 2 (of up to five) on this record, used for ad-hoc categorisation and search.
tag3StringThe free-text value of tag 3 (of up to five) on this record, used for ad-hoc categorisation and search.
tag4StringThe free-text value of tag 4 (of up to five) on this record, used for ad-hoc categorisation and search.
tag5StringThe free-text value of tag 5 (of up to five) on this record, used for ad-hoc categorisation and search.
tagsListList<String>The non-blank tags set on this record, in tag1 to tag5 order.

Methods

getDateEntered() · getId() · getProductSku() · setProductSku(String productSku) · getCollectorOrg() · setCollectorOrg(Organisation collectorOrg) · getSeries() · setSeries(SalesDataSeries series) · getAmount() · setAmount(BigDecimal amount) · setDateEntered(Date dateEntered) · getPeriodFrom() · setPeriodFrom(Date periodFrom) · getPeriodTo() · setPeriodTo(Date periodTo) · getEnteredBy() · setEnteredBy(Profile enteredBy) · getSalesBy() · setSalesBy(BaseEntity salesBy) · getSalesTeam() · setSalesTeam(Organisation salesTeam) · getRewardsIssuedDate() · setRewardsIssuedDate(Date rewardsIssuedDate) · getField1() · setField1(String field1) · getField2() · setField2(String field2) · getField3() · setField3(String field3) · getField4() · setField4(String field4) · getField5() · setField5(String field5) · getField6() · setField6(String field6) · getField7() · setField7(String field7) · getField8() · setField8(String field8) · getField9() · setField9(String field9) · getField10() · setField10(String s) · getField11() · setField11(String s) · getField12() · setField12(String field12) · getField13() · setField13(String field13) · getField14() · setField14(String field14) · getField15() · setField15(String field15) · getTag1() · setTag1(String tag1) · getTag2() · setTag2(String tag2) · getTag3() · setTag3(String tag3) · getTag4() · setTag4(String tag4) · getTag5() · setTag5(String tag5) · getAuditOrg() · fieldValue(String name) · fieldValue(int i) · setField(String fieldName, String s) · getTagsList() · findProductSku() · findPointsAllocation()

getDateEntered()

Returns: Date

Date and time the record was entered or imported into the system. This is distinct from the reporting period the record covers.

getId()

Returns: long

The database-assigned unique identifier for this record.

getProductSku()

Returns: String

The SKU code of the product this sale relates to, used to look up the matching product SKU record. May be null or blank if the record is not associated with a specific product.

setProductSku(String productSku)

Returns: void

Sets the SKU code of the product this sale relates to.

ParameterDescription
productSkuthe product SKU code to set

getCollectorOrg()

Returns: Organisation

The organisation that collected this sales data, which is the same organisation that owns the parent sales data series. Used to scope audit records and access control for this record.

setCollectorOrg(Organisation collectorOrg)

Returns: void

Sets the organisation that collected this sales data.

ParameterDescription
collectorOrgthe collecting organisation to set

getSeries()

Returns: SalesDataSeries

The sales data series that this record belongs to. The series defines the field names, frequency and target calculations that this record is measured against.

setSeries(SalesDataSeries series)

Returns: void

Sets the sales data series that this record belongs to.

ParameterDescription
seriesthe owning sales data series to set

getAmount()

Returns: BigDecimal

The numeric value recorded for this sale, in the units defined by the owning series (for example a currency amount or a count). This is the value summed, averaged and compared against targets in reporting.

setAmount(BigDecimal amount)

Returns: void

Sets the numeric value recorded for this sale.

ParameterDescription
amountthe amount to set

setDateEntered(Date dateEntered)

Returns: void

Sets the date and time the record was entered or imported.

ParameterDescription
dateEnteredthe entered date to set

getPeriodFrom()

Returns: Date

The start of the reporting period that this sale occurred in. Most queries and reports for a series filter and order records by this field.

setPeriodFrom(Date periodFrom)

Returns: void

Sets the start of the reporting period that this sale occurred in.

ParameterDescription
periodFromthe period start date to set

getPeriodTo()

Returns: Date

The end of the reporting period that this sale occurred in.

setPeriodTo(Date periodTo)

Returns: void

Sets the end of the reporting period that this sale occurred in.

ParameterDescription
periodTothe period end date to set

getEnteredBy()

Returns: Profile

The profile who entered or imported this record, for audit purposes. This is not necessarily the participant the sale is attributed to.

setEnteredBy(Profile enteredBy)

Returns: void

Sets the profile who entered or imported this record.

ParameterDescription
enteredBythe entering profile to set

getSalesBy()

Returns: BaseEntity

The organisation or user that the sale is attributed to, used for leaderboards, targets and reward point allocation. May be a profile or a suborganisation depending on how the series is configured.

setSalesBy(BaseEntity salesBy)

Returns: void

Sets the organisation or user that the sale is attributed to.

ParameterDescription
salesBythe entity to attribute the sale to

getSalesTeam()

Returns: Organisation

The sales team organisation that the participant belongs to, if the sale should also be attributed to a team for team-level reporting and rewards.

setSalesTeam(Organisation salesTeam)

Returns: void

Sets the sales team organisation that the participant belongs to.

ParameterDescription
salesTeamthe sales team organisation to set

getRewardsIssuedDate()

Returns: Date

The date on which reward points were generated for this record, set once processing has allocated points from it.

setRewardsIssuedDate(Date rewardsIssuedDate)

Returns: void

Sets the date on which reward points were generated for this record.

ParameterDescription
rewardsIssuedDatethe rewards-issued date to set

getField1()

Returns: String

The value of custom field 1 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField1(String field1)

Returns: void

Sets the value of custom field 1 for this record.

ParameterDescription
field1the value to set

getField2()

Returns: String

The value of custom field 2 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField2(String field2)

Returns: void

Sets the value of custom field 2 for this record.

ParameterDescription
field2the value to set

getField3()

Returns: String

The value of custom field 3 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField3(String field3)

Returns: void

Sets the value of custom field 3 for this record.

ParameterDescription
field3the value to set

getField4()

Returns: String

The value of custom field 4 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField4(String field4)

Returns: void

Sets the value of custom field 4 for this record.

ParameterDescription
field4the value to set

getField5()

Returns: String

The value of custom field 5 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField5(String field5)

Returns: void

Sets the value of custom field 5 for this record.

ParameterDescription
field5the value to set

getField6()

Returns: String

The value of custom field 6 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField6(String field6)

Returns: void

Sets the value of custom field 6 for this record.

ParameterDescription
field6the value to set

getField7()

Returns: String

The value of custom field 7 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField7(String field7)

Returns: void

Sets the value of custom field 7 for this record.

ParameterDescription
field7the value to set

getField8()

Returns: String

The value of custom field 8 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField8(String field8)

Returns: void

Sets the value of custom field 8 for this record.

ParameterDescription
field8the value to set

getField9()

Returns: String

The value of custom field 9 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField9(String field9)

Returns: void

Sets the value of custom field 9 for this record.

ParameterDescription
field9the value to set

getField10()

Returns: String

The value of custom field 10 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField10(String s)

Returns: void

Sets the value of custom field 10 for this record.

ParameterDescription
sthe value to set

getField11()

Returns: String

The value of custom field 11 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField11(String s)

Returns: void

Sets the value of custom field 11 for this record.

ParameterDescription
sthe value to set

getField12()

Returns: String

The value of custom field 12 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField12(String field12)

Returns: void

Sets the value of custom field 12 for this record.

ParameterDescription
field12the value to set

getField13()

Returns: String

The value of custom field 13 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField13(String field13)

Returns: void

Sets the value of custom field 13 for this record.

ParameterDescription
field13the value to set

getField14()

Returns: String

The value of custom field 14 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField14(String field14)

Returns: void

Sets the value of custom field 14 for this record.

ParameterDescription
field14the value to set

getField15()

Returns: String

The value of custom field 15 (of up to fifteen) for this record. Field names and order are defined by the owning series.

setField15(String field15)

Returns: void

Sets the value of custom field 15 for this record.

ParameterDescription
field15the value to set

getTag1()

Returns: String

The free-text value of tag 1 (of up to five) on this record, used for ad-hoc categorisation and search.

setTag1(String tag1)

Returns: void

Sets the free-text value of tag 1 on this record.

ParameterDescription
tag1the value to set

getTag2()

Returns: String

The free-text value of tag 2 (of up to five) on this record, used for ad-hoc categorisation and search.

setTag2(String tag2)

Returns: void

Sets the free-text value of tag 2 on this record.

ParameterDescription
tag2the value to set

getTag3()

Returns: String

The free-text value of tag 3 (of up to five) on this record, used for ad-hoc categorisation and search.

setTag3(String tag3)

Returns: void

Sets the free-text value of tag 3 on this record.

ParameterDescription
tag3the value to set

getTag4()

Returns: String

The free-text value of tag 4 (of up to five) on this record, used for ad-hoc categorisation and search.

setTag4(String tag4)

Returns: void

Sets the free-text value of tag 4 on this record.

ParameterDescription
tag4the value to set

getTag5()

Returns: String

The free-text value of tag 5 (of up to five) on this record, used for ad-hoc categorisation and search.

setTag5(String tag5)

Returns: void

Sets the free-text value of tag 5 on this record.

ParameterDescription
tag5the value to set

getAuditOrg()

Returns: Organisation

The organisation that audit entries for changes to this record are recorded against, which is the collecting organisation.

fieldValue(String name)

Returns: String

Looks up the value of the field on this record whose column corresponds to the named field in the owning series' field definitions.

ParameterDescription
namethe field name as defined on the owning series

fieldValue(int i)

Returns: String

Looks up the value of the field at the given position (1 to 15) on this record.

ParameterDescription
ithe 1-based field position to look up

setField(String fieldName, String s)

Returns: void

Sets the value of the field on this record identified by name or by "fieldN" position, where N is the field's 1-based ordinal. Does nothing if the field name cannot be resolved.

ParameterDescription
fieldNamethe field name as defined on the owning series, or a literal "fieldN" position such as "field3"
sthe value to set

getTagsList()

Returns: List<String>

The non-blank tags set on this record, in tag1 to tag5 order.

findProductSku()

Returns: ProductSku

Looks up the product SKU record matching this record's product SKU code within the owning series' organisation. Performs a database lookup.

findPointsAllocation()

Returns: List<PointsAllocation>

Finds the reward points allocations that have been generated from this record. Performs a database lookup.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.