Santekno
Projects/Recommendation MVC — Data-Driven Voucher Creation
Tokopedia logoPart of Tokopedia · Senior Software Engineer, Promotion Team
Backend / APILive

Recommendation MVC — Data-Driven Voucher Creation

Led a feature on the merchant voucher platform that creates vouchers from recommendation data, delivering recommendation and participation-thematic capabilities together with a voucher label surfaced through the notifications channel.

2023-mvc-recommendation · main
# E-Commerce / Promotion & Discounts
$ go -X POST /2023-mvc-recommendation/v1/sync
→ 201 Created
{ "status": "ok" }
publish 2023-mvc-recommendation.synced
Role
Senior Backend Engineer
Timeline
2023
Team
4
Domain
E-Commerce / Promotion & Discounts
Stack
9 tech
Status
Live
01

Overview

The Recommendation MVC project introduced data-driven voucher creation on the merchant voucher platform, using curated recommendation data to drive which vouchers get created and how they are grouped into a participation-thematic capability. As the technical lead, I owned the design and delivery end to end and coordinated integration with the product team, a data analyst, and the notifications team so a voucher label could be surfaced to end users through the notifications channel.

A backend has no screens, so its "UI" is the operational surface: the recommendation-to-voucher API contract, the thematic participation flow, and the notification label dashboards.

API contract — recommendation-driven voucher creation
Ops view — thematic participation configuration
Grafana — voucher label delivery & recommendation health
03

Problem & Solution

Problem

The merchant voucher platform previously relied on manual configuration for voucher creation and had no first-class path to consume recommendation signals or expose a voucher label through notifications. Without a data-driven creation flow and a shared integration contract across the three collaborating teams, recommendation and participation-thematic use cases would remain one-off scripts rather than a repeatable platform capability.

Solution

I designed the recommendation-to-voucher flow end to end: an ingestion contract for recommendation data, normalized eligibility and targeting fields agreed with a data analyst, and a data-driven creation path that produces vouchers on the merchant voucher platform. On top of that, I delivered the participation-thematic capability as a first-class lifecycle state so themed campaigns reuse the same creation flow, and wired up the voucher label payload so it can be surfaced to end users through the notifications channel owned by the notifications team. Interface contracts, PRD/TRD alignment with the product team, and a shared payload definition with the notifications team kept the integration coherent across three teams.

04

Workflow

Three actors interact with the service; the diagrams are written in English to stay consistent across both languages.

flowchart diagram

curated signals

create vouchers

thematic participation

publish label

voucher label

metrics

Recommendation Data Source

Merchant Voucher Service

Voucher Tables

Thematic Participation Module

Notifications Service

End User

Prometheus / Grafana

Use case interaction
sequence diagram
End UserNotifications ServiceThematic Participation ModuleMerchant Voucher ServiceRecommendation Data SourceEnd UserNotifications ServiceThematic Participation ModuleMerchant Voucher ServiceRecommendation Data Sourcedeliver recommendation signalsresolve eligibility & targetingcreate voucher (data-driven)register thematic participationpublish voucher labelsurface voucher label
Sequence flow — recommendation to voucher label
05

Architecture

flowchart diagram

rpc

metrics

Recommendation Data Source

Merchant Voucher Service · Go

Voucher & Recommendation Tables

Redis Cache

Thematic Participation Module

Notifications Service

Promotion Service

Prometheus / Grafana

System architecture
Architecture notes

A merchant voucher service in Go consumes recommendation signals from an upstream recommendation data source, normalizes them into eligibility and targeting fields, and creates vouchers backed by a Managed RDS with a Redis cache for hot recommendation lookups. A thematic participation module reuses the same creation flow to register themed campaign groupings. When a voucher is created, the service publishes a voucher label to a notifications service, which delivers it to the end user. RPC and HTTP contracts bound each team's interface, and Prometheus and Grafana track recommendation freshness, creation success, and label delivery.

state diagram

data-driven creation

thematic participation set

label published

notifications delivered

voucher live to buyer

buyer redeems

validity ended

recommended

created

thematic

labeled

notified

active

redeemed

expired

Recommendation-driven voucher lifecycle
06

Features

Recommendation-Driven Creation
  • Recommendation data ingestion and normalization
  • Data-driven voucher creation flow
  • Eligibility and targeting from recommendation signals
Thematic Participation
  • Participation-thematic voucher capability
  • Themed campaign grouping and configuration
  • Reusable thematic templates for creation
Label and Notification
  • Voucher label metadata surfaced to end users
  • Integration with the notifications channel
  • Cross-team API contracts and payload alignment
07

Tech Stack

language
Go
framework
RPC framework
protocol
gRPCRPCHTTP
database
Managed RDS
cache
Redis
observability
PrometheusGrafana
08

Engineering Challenges

01
Turning recommendation data into voucher creation

The merchant voucher platform had to consume curated recommendation signals and turn them into real voucher creations without hard-coding data assumptions or drifting from what analytics produced. Fix: a clean ingestion contract, normalized eligibility fields, and a data-driven creation flow so recommendation updates would flow into vouchers safely and repeatably.

02
Integrating three collaborating teams

The feature spanned the product team, a data analyst, and the notifications team, each with different interfaces and delivery cadences. Fix: shared interface contracts per boundary, a single source of truth for recommendation fields with the data analyst, and periodic PRD/TRD alignment with the product team so the voucher label and notification path landed together.

03
Shipping recommendation and thematic together

Recommendation-driven creation and the participation-thematic capability had overlapping lifecycle states and could easily fragment into two disjoint code paths. Fix: a unified voucher lifecycle model with thematic participation as a first-class state so both capabilities went live in the same release without duplicated logic.

09

Outcomes

data-driven
voucher creation
3
teams integrated
live
recommendation & thematic delivered
10

Lessons Learned

Framing this work as a platform capability instead of a one-off script paid off: with a single data-driven creation flow, both recommendation and participation-thematic use cases went live together, and the voucher label integrated cleanly with the notifications channel across 3 teams. Getting the interface contracts right — with the product team, a data analyst, and the notifications team — mattered as much as the code, because a data-driven feature is only as good as the data pipeline and the surfaces that consume its output.

11

Related Santekno Tutorials

Interested in working together?

Order, payment, or high-traffic event pipelines — let's talk architecture and trade-offs.