Challenge
Details for a challenge including its missions and rewards.
Name | Type | Description |
---|---|---|
id | UUID | Challenge identifier |
missions | List<Mission> | List of missions for the challenge |
reward | Reward given when challenge has been completed | |
prerequisiteId | UUID? | Identifier of the challenge that needs to be completed before this challenge is available to a user |
name | String | Challenge name |
description | String | Challenge description |
pictureName | String | Link to picture for the challenge screen in the frontend app (e.g. |
backgroundColor | String | Color used for the UI in the challenge screen in the frontend app (e.g. |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
Reward
Defined the reward given when a challenge is completed. Processor information can be found in https://safibank.atlassian.net/wiki/spaces/ITArch/pages/226394227/Processors+for+Rewards+and+Completion+Definitions#Reward-Processor
Name | Type | Description |
---|---|---|
id | UUID | Reward identifier |
rewardProcessorType | The type of processor to be used when claiming and deactivating a reward (e.g. | |
parameters | Map<String, Any> | The parameters of the processor which will be used to help claim/deactivate a reward (e.g. |
claimInterval | Map<String, Any> | The interval for claiming a reward before it is unable to be claimed. (e.g. |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
RewardProcessorType
(enum)
The different processors that can be used for claiming a certain reward.
BONUS_INTEREST
Sets bonus interest in a user’s account.
BONUS_TRANSACTIONS
Adds bonus transactions in a user’s subscription.
FREE_SUBSCRIPTION
Applies free subscription for a user.
Mission
Defines a mission under a challenge and the specification on how to complete them.
Name | Type | Description |
---|---|---|
id | UUID | Mission identifier |
completionDefinition | The technical specification that defines how a mission can be completed | |
name | String | Mission name |
description | String | Mission description |
linkToScreen | String | Link to frontend screen that relates to the mission task (e.g. |
autostartChallenge | Boolean | Whether this mission will activate a challenge automatically when the completionDefinition has been met |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
CompletionDefintion
The technical specification which defines how a mission is completed. Processor information can be found in https://safibank.atlassian.net/wiki/spaces/ITArch/pages/226394227/Processors+for+Rewards+and+Completion+Definitions#Parameter-Processor
Name | Type | Description |
---|---|---|
id | UUID | CompletionDefinition identifier |
processor | The type of processor to be used when checking if a mission has been completed (e.g. | |
processorParameters | Map<String, Any> | The parameters of the processor which will be used to help determine if a mission has been completed (e.g. |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
ProcessorType
(enum)
The different processors that are used for checking if a mission has been completed.
ALWAYS_TRUE
Considers a mission to be completed every time the processor is called.
Used for the onboarding challenge/mission, and is called on the user’s onboarded event.
COUNTER
Counts the number of times a user event occurred and compares it to the required
targetCount
for completion.
SUM_UP
Sums up a certain parameter of a user event and checks if it meets the
minValue
needed for completion.
CASH_IN
Checks if a user cash-in event reaches the
minValue
amount needed for completion.
TOP_UP
Checks if a user top-up event reaches the
minValue
amount needed for completion.
BILL_PAYMENT
Checks if a user bill-payment event reaches the
minValue
amount needed for completion.
CustomerEvent
Details of a customer event received from Kafka events from other services.
Name | Type | Description |
---|---|---|
id | UUID | CustomerEvent identifier |
customerId | UUID | Customer identifier |
eventType | The type of event received | |
parameters | Map<String, Any> | The parameters of the event received |
eventTimestamp | Instant | Event timestamp |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
EventType
(enum)
The types of user events that are used by the service for checking the completion of challenges/mission.
ONBOARDED
Listener:
CustomersCustomerOnboardedEventV1Listener
WITHDRAW_ATM
Listener:
CardsCardWithdrawalCreatedEventV1Listener
PAY_DEBIT_CARD
Listener:
CardsCardPaymentCreatedEventV1Listener
TOPUP_BANK
Listener:
TransactionsBankTopupTransactionOccurredEventV2Listener
TOPUP_CASH
Listener:
TransactionsOtcTopupTransactionOccurredEventV2Listener
TOPUP_DEBIT_CARD
Listener:
TransactionsDebitcardTopupTransactionOccurredEventV2Listener
TOPUP_EWALLET
Listener:
TransactionsEwalletTopupTransactionOccurredEventV2Listener
BILL_PAYMENT
Listener:
TransactionsBillPaymentTransactionEventV2Listener
CASH_IN
Listener:
TransactionsOtcTopupTransactionOccurredEventV2Listener
CustomerChallenge
Defines the challenge progress for a user.
Name | Type | Description |
---|---|---|
id | UUID | CustomerChallenge identifier |
challenge | The challenge this model relates to | |
customerId | UUID | Customer identifier |
activatedAt | Instant? | Activated timestamp |
deadlineAt | Instant? | The deadline timestamp for the user’s challenge |
status | Status of the user’s challenge | |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
ChallengeStatus
(enum)
The different statuses of a user’s challenge.
ACTIVATED
The challenge is activated for the user with a set deadline for completion.
FAILED
The deadline has been reached for the user’s challenge before the challenge was completed.
MISSIONS_COMPLETED
The challenge along with its missions have been completed and the challenge reward is available to be claimed.
REWARD_ACTIVATED
The reward for the challenge has been claimed.
CLOSED
The user’s challenge has been closed.
AVAILABLE
The Challenge is available for activating
Note: This is not persisted in the database and only used for providing the frontend with the challenges that are available to the user.
CustomerMission
Defines the mission progress for a user. Dictates whether a mission has been completed by a certain user.
Name | Type | Description |
---|---|---|
id | UUID | CustomerMission identifier |
mission | The mission this model relates to | |
customerChallenge | The customer challenge of this customer mission | |
finishedAt | Instant? | Finished/completion timestamp |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
CustomerReward
Defines the reward for a user which was granted by completing a challenge and its missions.
Name | Type | Description |
---|---|---|
id | UUID | CustomerReward identifier |
customerChallengeId | UUID | CustomerChallenge identifier |
reward | The reward this model relates to | |
claimUntil | Instant | When this reward will expire |
claimedAt | Instant? | When this reward was claimed |
activeUntil | Instant? | If the reward was claimed when it needs to be deactivated |
deactivatedAt | Instant? | When this reward was deactivated |
parameters | Map<String, Any> | Parameters for the user’s reward (such as accountId for bonus interest) |
customerRewardStatus | Defines the status of a user’s reward | |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
CustomerRewardStatus
(enum)
The status of a user’s reward. This is derived from the timestamps of the CustomerReward model and is not persisted in the database.
AVAILABLE
The reward is available for claiming.
ACTIVE
The reward has been claimed and is activated for the user’s account.
EXPIRED
The reward’s expiry has been reached and can not be claimed anymore.
DEACTIVATED
The reward’s duration has been met and has now been deactivated.