Task Breakdown (WIP)
Milestones based on Product: Milestones (draft)
These technical workstreams support Product goals:
Epic: EXP-81180 - TO BE DISCUSSED with Alok
PES to ZMP Event Ingestion Pipeline
Epic: EXP-81184
Loyalty Profile Section In ZMP
EXP-81183
Repo: https://gitlab.infr.zglbl.net/rgemmail/loyalty-poc
Open Questions:
1. Person → Attributes
Relationship: One-to-Many (1:N)
One person can have many attributes
Attributes are key-value pairs (JSON map)
No fixed limit
→ Do we have a whitelist of attributes from loyalty to be updated OR we update ALL. Collision?
Do we build on the existing Python event-consumers project?
Benefits:
Infra is all there
Existing opinonated patterns
Faster path to solution as decisions are already made
CI/Pipelines
Thrift Client exists
Internal Zeta team member support
Deployable
Cons:
Team familiarity
Countered by following existing patterns
Countered by Vibe coding 😛
?
Task Decomposition
Loyalty consumer
Boostrap Spring Boot service (Not required for python impl)
Docker compose to spin up local Kafka for dev
Test Fixtures: some .json files we can push in for testing
Generate People Service Thrift Java client (Not required for python impl)
Figure out how to build thrift client to talk to person service
Externalize configuration (Kafka, PeopleService endpoint, mapping)
Implement PES Kafka consumer
Consumer code to connect to kafka and consume (make sure async to avoid perf issues)
Deserialize event schema
Extract:
customer_idevent type
relevant payload
Add structured logging
Implement static customer_id -> site_id mapping
Create
AccountMappingResolverabstractionImplement config-based mapping
Handle missing mappings (DLQ? Error?)
Working with ID Resolution contracts
Translate Loyalty event and apply PeopleService update
Map Loyalty payload → People update model [Confirm if they want first class property for tiers, metric]
Call PeopleService update using resolved
bsinHandle retries for transient failures
Work to ID resolution contract
Implement ID resolution using People Thrift API
Merging (discovery how will we handle?)
Build Thrift wrapper
Handle error (retryable failures, non-retryable in DLQ)
ZMP Loyalty UI
Local dev setup
Spin up fe-app, fe-server and connect to preprod bme-app
Discovery
Confirm existing person API call already includes loyalty data.
Identify where that data lives in the response.
Confirm no new backend changes are needed.
Add statsig feature flag
fe-app
Add new “Loyalty” tab in UI
Reuse existing person data (assumption: no new API call but confirm)
Render based on the Epic details.
We need Figma for this
Empty state
Render when toggle is off? No tab at all