Allow Segmenting Reward Plans¶
TLDR¶
Enable customers to segment users into predefined groups and configure reward plans to target specific user groups.
My Role¶
Tech lead of the team that implemented this feature.
Context¶
Employee Referrals (ER) added support for user segmentation via predefined "user groups." Our customers could set up these groups, and then assign each of their users to one.
Details¶
We built a feature on top of this user segmentation. Essentially, we allowed customers to define rewarding rules that targeted specific user groups.
Challenges¶
-
The biggest challenge in this project was to iteratively build the new functionality while letting the previous functionality run without breaking.
For reference, here's the rollout plan I delineated in the technical design for this feature.
%%{init: {'theme':'forest'}}%%
timeline
title Reward Segmentation Rollout Timeline (events on prod)
All necessary tables and new columns are set up in the DB
A migration is run to copy existing values of reward plan currency to reward plan item currency
User property data is colocated into corresponding tables via Kafka
Reward plan creation/update logic starts saving currency on plan items
: only to faciliate work on qa/staging
Use new currency in reward creation
: Reward creation logic is changed to use currency from reward plan item
APIs 3, 4, 5, 6 are updated as per design
: Reward plan creation/update logic starts saving currency on plan items from the requests
FE is tweaked to support new versions of APIs 3, 4, 5, 6
: FT M
Nemesis management UI is added
: FT N
Reward creation logic is adapted to work with segmentation
QA testing (excluding deactivations and deletions)
Tenant property data is colocated into corresponding tables via Kafka
Deactivation of segmentation for a property (from nemesis) is handled
Deletion of a tenant property value that is in use (from nemesis) is handled
Deactivation of a tenant property that is in use (from nemesis) is handled
End to end QA testing
- The added processing for filtering items based on a user's user group needed to be fast.