Questions:
N/D
Technical Refinement
...
Expand | |||||
---|---|---|---|---|---|
| |||||
The code above was developed in the PoC and is a new code. Attention points:
OBS.: It’s possible we need to apply the offer in another context too.
With this update, the frontend is prepared to apply the promo code to loyalty. |
...
Expand | |||||
---|---|---|---|---|---|
| |||||
Important: We don’t have the POC to this task |
Expand | |||||
---|---|---|---|---|---|
| |||||
|
intl-partners-service (backend)
...
We will need to send the sanityId:
a6f3eace-435e-49ea-9a79-e173f6172dcc
to Winrest via some means of communication this information;They will register this ID on their system;
When the intl-partners-service calls the Winrest API, the integration will know how much will be the discount;
The discount is always on the total value of the cart;
Solution proposal
Currently, we already sent the sanityId offer to the backend (
intl-partners-service
);Then, we need to send the discount information to Winrest;
With the
sanityId
that we have, we will find the discount values bygetOffers(sanityId: string)
path:
intl-partners-service/src/modules/orders/cart-total.service.ts
We will add a new attribute
orderDiscounts
on the webhookIWebhookPriceOrder
payload;
Acceptance criteria
We can’t impact the other markets;
If there is an offer applied on the “input cart“, we need to send the discount to Winrest;
Tasks:
Expand | |||||
---|---|---|---|---|---|
| |||||
|
...