Builds a new recognition topic for the current tenant organisation. Obtained from newTopicBuilder on the recognition manager. Set the data series the topic scores from, the points bucket and any period promotion it awards, and how participants are selected, then call build to save the topic. Build fails if the organisation already has a topic with the same name, or if an invalid regression mode was set.
Group: Builders
Properties
| Property | Returns | Description |
|---|---|---|
| orgLevelAwards | RecognitionTopicBuilder | Marks the topic as awarding at organisation level, so levels and badges are earned by organisations rather than by individual profiles. |
Methods
name(String name) · title(String title) · dataSeries(SalesDataSeries dataSeries) · pointsBucket(Reward pointsBucket) · participantSelectors(String participantSelectors) · autoCalculate(boolean autoCalculate) · periodPromotion(Reward periodPromotion) · metricId(String metricId) · isOrgLevelAwards() · elearningPath(String elearningPath) · regressionMode(String regressionMode) · build()
name(String name)
Returns: RecognitionTopicBuilder
Sets the unique, path-safe name identifying the topic within the organisation. Build fails if the organisation already has a topic with this name.
| Parameter | Description |
|---|---|
name | the topic's name |
title(String title)
Returns: RecognitionTopicBuilder
Sets the display title shown for the topic in the UI.
| Parameter | Description |
|---|---|
title | the topic's display title |
dataSeries(SalesDataSeries dataSeries)
Returns: RecognitionTopicBuilder
Sets the sales data series the topic scores participants from.
| Parameter | Description |
|---|---|
dataSeries | the data series to score from |
pointsBucket(Reward pointsBucket)
Returns: RecognitionTopicBuilder
Sets the points bucket that points earned from this topic's levels and badges are credited to.
| Parameter | Description |
|---|---|
pointsBucket | the points bucket to credit |
participantSelectors(String participantSelectors)
Returns: RecognitionTopicBuilder
Sets the selectors that decide which profiles or organisations take part in the topic.
| Parameter | Description |
|---|---|
participantSelectors | the participant selectors configuration |
autoCalculate(boolean autoCalculate)
Returns: RecognitionTopicBuilder
Sets whether the topic recalculates participant achievements automatically rather than only when calculation is triggered manually. Only true has an effect; false leaves the default calculation mode.
| Parameter | Description |
|---|---|
autoCalculate | true to calculate automatically |
periodPromotion(Reward periodPromotion)
Returns: RecognitionTopicBuilder
Sets the promotion awarded for each recognition period, which also switches the topic to periodic dating and creates its first period when build runs.
| Parameter | Description |
|---|---|
periodPromotion | the promotion awarded per period |
metricId(String metricId)
Returns: RecognitionTopicBuilder
Sets the id of the metric whose value the topic scores participants against, as an alternative to a sales data series.
| Parameter | Description |
|---|---|
metricId | the metric id to score from |
isOrgLevelAwards()
Returns: RecognitionTopicBuilder
Marks the topic as awarding at organisation level, so levels and badges are earned by organisations rather than by individual profiles.
elearningPath(String elearningPath)
Returns: RecognitionTopicBuilder
Sets the path of the elearning course associated with the topic.
| Parameter | Description |
|---|---|
elearningPath | the elearning course path |
regressionMode(String regressionMode)
Returns: RecognitionTopicBuilder
Sets whether participants can drop back down a level once achieved, and whether points are taken back when they do. Must be one of RecognitionTopic.REGRESSION_BI_DIRECTIONAL or RecognitionTopic.REGRESSION_BI_DIRECTIONAL_LOSE_PTS; build throws IllegalArgumentException for any other non-blank value.
| Parameter | Description |
|---|---|
regressionMode | the regression mode |
build()
Returns: RecognitionTopic
Validates the regression mode, checks no topic with the same name already exists in the current tenant organisation, then creates and saves the topic with the configured properties. When a period promotion is set, the topic is switched to periodic dating and its first recognition period is created.