Versions Compared

Key

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

...

As CBA promo code is deprecated, : https://rbidigital.slack.com/archives/C04FZ5HTH35/p1693855082030399

We will need to change the frontend flow to send loyaltyId instead of cognitoId.

Currently on method: onSubmitPromoCode calls the mutation: promotionValidatePromoCodeMutation that send cognitoId

...

There is a mutation redeemMutation that send the loyaltyId, so we will add this mutation with something condition to send loyaltyId (to markets that wants to use promo code at checkout, or to market that don’t use and impact other markets). This condition can be a flag on sanity maybe.

...

There is another attention point:

Is possible on voucherify, configure a promo code with expiryDate undefined, but on backend validate it and can receive a error, so if will need to use a “infinity“ expiryDate, that don’t have end date finish, so we will change a validate date loyalty flow.

currency code:

...

We will change this condition to validate the expiry date just there is a valide date.

After this changes on frontend and backend:

  • OBS:. This test was done, mocking de codes and apis responses, using apollo studio:

Calling LoyaltyValidatePromoCode

request:

Code Block
{
  "input": {
    "code": "8B9IKPQK",
    "loyaltyId": "ec5cec01-b41b-509b-9111-310ab5a18154",
    "shouldRedeem": true
  }
}
Code Block
{
  "data": {
    "loyaltyValidatePromoCode": {
      "code": "8B9IKPQK",
      "configId": "7bf2c11c-ec68-4d44-abd3-597b3967fcef",
      "isRedeemed": true,
      "isValid": true,
      "message": "",
      "personalizedOfferId": null,
      "reason": null,
      "shouldRedeem": null
    }
  }
}

Configuration Promo code

For show the feature on checkout:

...