# Rewards Product blueprint
###### tags: `LandingPage` `Blueprint` `Summary` `Rewards Product`
## Business
A Rewards solution for out of box integration.
### One-line pitch
The integrated platform asks for the status of a given `reward-id` and sends events for the `reward-id` to balance of points be updated.
### Specifications
TBD - waiting data from Ruben
## Architecture
We think that this platform has to work in an on-demand way. So lambdas is our friend based the fact that we pay only by use. And we also can change the language in a function need basis. Ex: javascript is not an excellent language fo mathematics calculations. When we face some balance consolidation function, we can use python.
Another point that we have in mind is the communication and integration effort between this platform and its clients.
We are thinking in 2 distinctive ways to communicate those being a rest API and WebHooks.
### API
The rest API has a snapshot in the current time. So each time that the integrated client needs to know the total points, it ask for API.
Something to keep in mind:
It has endpoints for the configuration of its events and the outcome of those. So each client of the Rewards Product can have a particular way to convert events in points and in how to consume those points.
(This is not true in MVP, in this the configuration has to be hardcoded)
### Webhooks
The webhooks are the only source of change for the balances. All of our clients have their systems that already have considerable complexity. We don't want to clutter even more complexity to it. So for integration, the client only needs to send a message for an events endpoint. Then the message is processed and its result available in Entities of API.
If the client wants, we can provide a callback for the end of the process.
This callback act as a notification saying to him that we have an update.
## Pipeline flow
### Today
[add diagram]
### Our dream
[add diagram]
## aws services
- region: tbd
- services
- [runtime] Lambda
- [database] DynamoDB
- [queue] SQS
- [delivery] Codepipeline
- [delivery] Codedeploy
- [delivery] Codebuild