Defines a rule that scans a sales data series for sets of matching records and generates destination records representing each match. Typical uses are recognising a bundle of products sold together, or splitting one large sale between the roles that contributed to it. Record matchers run before points allocation sources, so the records they generate are then eligible for normal points allocation. Matchers in the same series run in the administrator controlled sort order, which matters because matchers detecting returns or reversals are conventionally placed first.
Group: Database Entities
Implements: Serializable, Auditable
Properties
| Property | Returns | Description |
|---|---|---|
| auditOrg | Organisation | The organisation audit entries for this matcher are recorded against, which is the organisation owning its source series. |
| createdBy | Profile | The profile of the administrator who created this matcher. |
| createdDate | Date | When this matcher was created. |
| dataSeries | SalesDataSeries | The series whose records this matcher scans for matches. Required, and it also decides which organisation the matcher belongs to. |
| dateRangeMonths | Integer | How many months back the matcher scans for candidate records. Null means no explicit value has been set, in which case the default of three months applies; read getEffectiveDateRangeMonths instead of this. |
| deletedBy | Profile | The profile of the administrator who soft deleted this matcher, or null if it has not been deleted. |
| deletedDate | Date | When this matcher was soft deleted. Null means it is still active; the finders skip any matcher with a value here, so a deleted matcher never runs but its history is kept. |
| destinationSeries | SalesDataSeries | The series that matched or generated records are created in. It may be the same series as the source, for example a role split which is more of the same kind of record, or a different series entirely, for example a bundle or up-sell. Prefer getEffectiveDestinationSeries when deciding where to write records, because this one is null when the source series is used. |
| effectiveDateRangeMonths | int | The scan window actually used, which is the configured number of months when one is set and otherwise the default of three months. |
| effectiveDestinationSeries | SalesDataSeries | The series records generated by this matcher are actually written to, which is the configured destination series when one is set and otherwise the source series. |
| id | long | Primary key of this record matcher, assigned when it is first saved. |
| matcherConfig | String | The settings for the chosen matcher type, held as a URL parameter encoded string. Its keys depend entirely on the matcher type, so read it through that type rather than parsing it by hand. |
| modifiedBy | Profile | The profile of the administrator who last changed this matcher. |
| modifiedDate | Date | When this matcher was last changed. |
| name | String | Path-safe identifier for this matcher, unique within the organisation among matchers that have not been deleted. Use it to look a matcher up; use the title for anything shown to a person. |
| notes | String | Free-text notes for administrators explaining what this matcher is for. Not shown to participants, and null if none were entered. |
| recordMatcherTypeId | String | Identifies which RecordMatcherType implementation runs this matcher, and so what kind of matching it does. It is chosen when the matcher is created and is not meant to change afterwards. |
| sortOrder | Integer | Position of this matcher in its series' processing sequence, lowest first. The order matters because a matcher can depend on records an earlier one generated, which is why reversal matchers are usually first. New matchers are given the next free position. |
| title | String | Free-text display label shown to administrators in the matcher list. It is not unique and is not safe to use as a lookup key. |
Methods
getId() · getName() · setName(String name) · getTitle() · setTitle(String title) · getNotes() · setNotes(String notes) · getDataSeries() · setDataSeries(SalesDataSeries dataSeries) · getDestinationSeries() · setDestinationSeries(SalesDataSeries destinationSeries) · getEffectiveDestinationSeries() · getRecordMatcherTypeId() · setRecordMatcherTypeId(String recordMatcherTypeId) · getMatcherConfig() · setMatcherConfig(String matcherConfig) · getDateRangeMonths() · setDateRangeMonths(Integer dateRangeMonths) · getEffectiveDateRangeMonths() · getSortOrder() · setSortOrder(Integer sortOrder) · getCreatedDate() · setCreatedDate(Date createdDate) · getCreatedBy() · setCreatedBy(Profile createdBy) · getModifiedDate() · setModifiedDate(Date modifiedDate) · getModifiedBy() · setModifiedBy(Profile modifiedBy) · getDeletedDate() · setDeletedDate(Date deletedDate) · getDeletedBy() · setDeletedBy(Profile deletedBy) · getAuditOrg()
getId()
Returns: long
Primary key of this record matcher, assigned when it is first saved.
getName()
Returns: String
Path-safe identifier for this matcher, unique within the organisation among matchers that have not been deleted. Use it to look a matcher up; use the title for anything shown to a person.
setName(String name)
Returns: void
Sets the path-safe unique name of this matcher.
| Parameter | Description |
|---|---|
name | the matcher's unique name |
getTitle()
Returns: String
Free-text display label shown to administrators in the matcher list. It is not unique and is not safe to use as a lookup key.
setTitle(String title)
Returns: void
Sets the display title shown to administrators.
| Parameter | Description |
|---|---|
title | the matcher's display title |
getNotes()
Returns: String
Free-text notes for administrators explaining what this matcher is for. Not shown to participants, and null if none were entered.
setNotes(String notes)
Returns: void
Sets the administrator notes for this matcher.
| Parameter | Description |
|---|---|
notes | the notes to record, or null |
getDataSeries()
Returns: SalesDataSeries
The series whose records this matcher scans for matches. Required, and it also decides which organisation the matcher belongs to.
setDataSeries(SalesDataSeries dataSeries)
Returns: void
Sets the series whose records this matcher scans.
| Parameter | Description |
|---|---|
dataSeries | the source sales data series |
getDestinationSeries()
Returns: SalesDataSeries
The series that matched or generated records are created in. It may be the same series as the source, for example a role split which is more of the same kind of record, or a different series entirely, for example a bundle or up-sell. Prefer getEffectiveDestinationSeries when deciding where to write records, because this one is null when the source series is used.
setDestinationSeries(SalesDataSeries destinationSeries)
Returns: void
Sets the series that matched or generated records are created in.
| Parameter | Description |
|---|---|
destinationSeries | the destination series, or null to write back to the source series |
getEffectiveDestinationSeries()
Returns: SalesDataSeries
The series records generated by this matcher are actually written to, which is the configured destination series when one is set and otherwise the source series.
getRecordMatcherTypeId()
Returns: String
Identifies which RecordMatcherType implementation runs this matcher, and so what kind of matching it does. It is chosen when the matcher is created and is not meant to change afterwards.
setRecordMatcherTypeId(String recordMatcherTypeId)
Returns: void
Sets which record matcher type implementation runs this matcher.
| Parameter | Description |
|---|---|
recordMatcherTypeId | the record matcher type identifier |
getMatcherConfig()
Returns: String
The settings for the chosen matcher type, held as a URL parameter encoded string. Its keys depend entirely on the matcher type, so read it through that type rather than parsing it by hand.
setMatcherConfig(String matcherConfig)
Returns: void
Sets the URL parameter encoded settings for the chosen matcher type.
| Parameter | Description |
|---|---|
matcherConfig | the encoded matcher configuration |
getDateRangeMonths()
Returns: Integer
How many months back the matcher scans for candidate records. Null means no explicit value has been set, in which case the default of three months applies; read getEffectiveDateRangeMonths instead of this.
setDateRangeMonths(Integer dateRangeMonths)
Returns: void
Sets how many months back the matcher scans for candidate records.
| Parameter | Description |
|---|---|
dateRangeMonths | the scan window in months, or null to use the default |
getEffectiveDateRangeMonths()
Returns: int
The scan window actually used, which is the configured number of months when one is set and otherwise the default of three months.
getSortOrder()
Returns: Integer
Position of this matcher in its series' processing sequence, lowest first. The order matters because a matcher can depend on records an earlier one generated, which is why reversal matchers are usually first. New matchers are given the next free position.
setSortOrder(Integer sortOrder)
Returns: void
Sets this matcher's position in its series' processing sequence.
| Parameter | Description |
|---|---|
sortOrder | the processing position, lowest running first |
getCreatedDate()
Returns: Date
When this matcher was created.
setCreatedDate(Date createdDate)
Returns: void
Sets when this matcher was created.
| Parameter | Description |
|---|---|
createdDate | the creation timestamp |
getCreatedBy()
Returns: Profile
The profile of the administrator who created this matcher.
setCreatedBy(Profile createdBy)
Returns: void
Sets the profile of the administrator who created this matcher.
| Parameter | Description |
|---|---|
createdBy | the creating profile |
getModifiedDate()
Returns: Date
When this matcher was last changed.
setModifiedDate(Date modifiedDate)
Returns: void
Sets when this matcher was last changed.
| Parameter | Description |
|---|---|
modifiedDate | the last modified timestamp |
getModifiedBy()
Returns: Profile
The profile of the administrator who last changed this matcher.
setModifiedBy(Profile modifiedBy)
Returns: void
Sets the profile of the administrator who last changed this matcher.
| Parameter | Description |
|---|---|
modifiedBy | the last modifying profile |
getDeletedDate()
Returns: Date
When this matcher was soft deleted. Null means it is still active; the finders skip any matcher with a value here, so a deleted matcher never runs but its history is kept.
setDeletedDate(Date deletedDate)
Returns: void
Sets the soft deletion timestamp for this matcher.
| Parameter | Description |
|---|---|
deletedDate | the deletion timestamp, or null to make it active again |
getDeletedBy()
Returns: Profile
The profile of the administrator who soft deleted this matcher, or null if it has not been deleted.
setDeletedBy(Profile deletedBy)
Returns: void
Sets the profile of the administrator who soft deleted this matcher.
| Parameter | Description |
|---|---|
deletedBy | the deleting profile, or null |
getAuditOrg()
Returns: Organisation
The organisation audit entries for this matcher are recorded against, which is the organisation owning its source series.