Skip to main content
Version: Next

User Bonus Eligibility and Transfer

The bonus-bff-service is designed to provide users with bonus points for the goals they have achieved. This process is facilitated by the third-party bonus transfer system, MC Bonus, which manages user enrollment and eligibility for the bonus program, as well as the transfer of bonus points.

This document describes the overall functionality of the be-bonus-bff-service and its interactions with the front-end (FE) and the MC Bonus system (third-party).

Flow diagram denoting the entire bonus flow (FE -> BONUS BFF -> MC Bonus system)

Flow diagram denoting the interaction between BONUS BFF and MC Bonus system.

Bonus configurations

Listed below are the MC bonus system related configurations that need to be configured in the Bonus BFF service for enabling the bonification feature for a given tenant:

  • MC bonus service endpoint - MC Bonus endpoint that returns the bonus eligibility of the user.
bonus.<tenantId>.MC_BONUS_SERVICE_ENDPOINT=https://mockapimgmt.azure-api.net/bonus/policies
  • MC bonus measures endpoint - MC Bonus endpoint that creates bonus measures and fetches created bonus measures.
bonus.<tenantId>.MC_BONUS_MEASURES_ENDPOINT=https://mockapimgmt.azure-api.net/bonus/measures
  • Health goal UUID - Unique UUID associated with each goal configured in CMS.
  • Measure ID - Environment variable key to be configured for each health goal in the format - bonus.HGUUID_healthGoalUUID
  • Measure Number - Environment variable value to be configured for each health goal - Unique number to be passed to MC bonus system while creating bonus measure.
bonus.HGUUID_b0e794b5-7f1b-4d6d-947e-1f190273386a=501
  • Other bonus related configurations used for internal logic.

    • MC_BONUS_POLICY_STATUS denotes the value of policy status that indicates bonus eligibility of the user. If the value matches with the policyStatus returned from MC bonus, it indicates that the user participates in the bonus program.

      bonus.<tenantId>.MC_BONUS_POLICY_STATUS=3
    • BONUS_MAX_TRANSFERABLE_PER_YEAR denotes the number of bonus transfer allowed for a user in a year.

      bonus.<tenantId>.BONUS_MAX_TRANSFERABLE_PER_YEAR=4
    • MONTH_LIMIT_FOR_PREVIOUS_YEAR_TRANSFER determine the eligibility of a user for transferring bonus points from the previous year.

      bonus.<tenantId>.MONTH_LIMIT_FOR_PREVIOUS_YEAR_TRANSFER=5
    • BONUS_VALIDATION_LIMIT determines the number of days (dayTolerance) to look back from the current date to filter health goals. If the property is not set or invalid, a default value of 365 days is used.

      bonus.<tenantId>.BONUS_VALIDATION_LIMIT = 10
    • BONUS_MEASURES_CONFIRMED_STATUS denotes the status code that represents a "confirmed" measure. It is used to filter measures with the confirmed status.

    bonus.<tenantId>.BONUS_MEASURES_CONFIRMED_STATUS = 3
    • BONUS_UNMAPPED_UUID_LIMIT denotes the limit (in days) for unmapped UUIDs. It is used to determine whether a transmitted goal's timestamp is too old to find a matching measure.
    bonus.<tenantId>.BONUS_UNMAPPED_UUID_LIMIT = 1

Note:

  • <tenantId> is a placeholder in the above example configuration values.
  • The values mentioned for the bonus service and measures endpoints are mock interface APIs for lower environment only.