Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Questions:

...

  • 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

...

Expand
titleExample code
Code Block
languagetypescript
useEffect(() => {
  if (!loading && !orderErrors) {
    dispatch(actions.loyalty.setSelectedOffer(null));
    dispatch(actions.loyalty.setAppliedOffers([]));
    dispatch(actions.loyalty.setCmsOffers([]));
  }
}, [dispatch, loading, orderErrors]);

Back-end

After applied applying the whitelabel Whitelabel will do a call to the backend to calculate the discount value:

...

They register these sanityId on their system and after that, always we use some offers with theses these sanityId registered, Winrest will return the calculation offers correctly.

...

Solution proposal

  • Currently, we already sent to the backend (intl-partners-service) the offer information;

  • We need to send this information to Winrest

Screenshots

  • N/A

POC

...