Questions:
N/D
Technical Refinement
...
Create feature flag;
The first step to use the loyalty promo code at checkout will be to change the validation promo code flow.
On promo code component field, we will need to add a feature flag:
When this flag is enabled: The promo code flow will be LOYALTY OFFER
When this flag is disabled: The promo code flow will be CBA OFFER (current flow)
We will create a new hook to contain all the rules of this flow
We can use the same hook used to offer page flow.
intl-whitelabel-app/workspaces/frontend/src/state/loyalty/hooks/use-redeem-promo-codes.ts
...
After applied the whitelabel will do a call to backend to calculate the discount value:
First, it will call the PriceOrder mutation on intl-gateway or intl-graphql
...
How is the calculation done?
So basically, we need to send (via email, slack, etc.) to Winrest the offers sanityId.
They register these sanityId on their system and after that, always we use some offers with theses sanityId registered, Winrest will return the calculation offers correctly.
Example:
To use the offer Test: Test Discount Offer (Sanity DEV)
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;
Screenshots
N/A
POC
FRONTEND (WHITELABEL)
...