Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

🛠️ Potential Solutions

Note: this section should be short and sweet, documenting notes about different solutions that were considered during ideation. Can just be a link to a whiteboard for example. Expected outcome: one solution is chosen and documented in more detail under Proposed Solution.

Enhance the process by incorporating additional details regarding transactions and include pre-calculated mathematical formulas.

Figma: https://www.figma.com/design/Ti8Qr6jeSEPaencIDyYfcJ/branch/TUewzfszNkgUDFemwkpmwV/Burger-King?node-id=1828-36267&t=jxqIxrDss4fghjtP-0

✅ Proposed Solution

Description of the proposed solution.

A proposed solution we will add new fields and mathematical calculates in the system to give this information to customer user agent.
Example:

image-20240815-190442.pngimage-20240815-190600.png

This form provides the agent with more detailed information; therefore, we need to modify certain parts of the code.

Acceptance Criteria

Development

Backend:

 Add the “current value points” on GQL to each order

File: src/remote/queries/fragments/intl-loyalty-transaction.ts
In const INTLLoyaltyTransactionFragmentForTimeline add:

transactionDetails {
  person {
    currentPoints
  }
}

DOD:

Return “currentPoints” in each order of user.

Frontend:

 Create a Feature Flag

Name suggestion: point-balance-information
Local: Intl Tech - Platform
Type: Temporary

 Improve Loyalty Transactions Screen

File: src/components/intl-loyalty/points-balance.tsx
Changes:

  • Label “Balance“ to “Points Balance“

  • Label “Total“ to “Total transaction points“

  • Add “ - “ before “Points used”

    • Add “-“ only in numbers greater than 0'

      • points used: 0

      • points used: -123

  • Add field “Initial points balance“

    • Calculate value: totalPoints - pointsEarned - poinstUsed

  • Add filed “Final points balance“

  • Add “bonusPoints” on “pointsEarned”

 Improve Recent Orders Screen

File: src/components/customer-orders/order-timeline-item.tsx
Changes:

  • Change from Line to Collapsible item - Points Balance

  • Label “Points“ to “Points Balance“

  • Label “Awarded“ to “Earned“

  • Label “Redeemed“ to “Used“

  • Add field “Initial points balance“

    • use transaction?.loyaltyTransaction?.pointsBalance

  • Add field “Points earned“

  • Add field “Poinst used“

    • Add “-“ only in numbers greater than 0'

      • points used: 0

      • points used: -123

  • Add field “Total transaction Points“

    • pointsEarned - pointsUsed consider bonusPoints as well

  • Add filed “Final points balance“

    • transaction?.loyaltyTransaction?.pointsBalance + (pointsEarned - pointsUsed) consider debits as well

 Improve Order Details Screen

File: src/components/points-details-card/index.tsx
Changes:

  • Add field “Initial points balance“

  • Add “ - “ before “Points used”

    • Add “-“ only in numbers greater than 0'

      • points used: 0

      • points used: -123

  • Add filed “Total transaction points“

    • pointsEarned - pointsUsed consider bonusPoints as well

  • Label “Balance“ to “Final points balance“

    • pointsBalance + (pointsEarned - pointsUsed) consider debits as well

 Create new functions to calculate transactions values

File src/utils/utils.ts

  • function to calculate initial points value

  • function to calculate earn points value (earn + bonus)

  • function to calcutate transaction points value (earn + bonus - used)

  • function to calculate final point value (balancePoints + (pointsEarned - pointsUsed) )

(warning) Potential Challenges

List here potential challenges that have come across the opportunity definition or from the potential solutions so far.

💰 Cost

Describe any additional cost this solution may imply.

🎛️ Configuration

Include here any configuration required (Sanity, LaunchDarkly flags, etc.) required to enable the solution.

LaunchDarkly

Create and enable a new feature flag: point-balance-information

Sanity

We need a product to utilize the points, but we are not sure how to configure it yet. However, we can use the existing products. For example, in DEV PLK ES, we can utilize the product [LOYALTY] Menú 8 alitas picantes mediano.
We can configure parameters such as the required points to use this product and the number of times it can be used per day.

image-20240816-163214.png

Status Order

The order has a status to inform if need to add, remove or ignore the points.

More details here /wiki/spaces/PBP/pages/4856185403

image-20240816-194815.png

Exist the CONFIRMED status as well, and this status is added for the orders that placed, but not finished, for example, a delivery order is placed, but it's in the delivering progress, not marked as delivered.
In this status the system doesn’t calculate the points.
More details here INMS-763 - Getting issue details... STATUS

We made some questions to loyalty-team in this thread https://rbidigital.slack.com/archives/C04FZ5HTH35/p1723558227000749

📈 Metrics

Describe the metrics that will be used to measure the solution’s success, as well as how to measure those KPIs.

🗓️ Delivery Plan

Link to the task or list of all the tasks required to deliver the solution, along with its progress.

🧑‍🚒 QA Plan

Testing scenarios. See example /wiki/spaces/EGMT/pages/4080861189.

⚠️ Call-outs

Tip: Document here any improvement or discussion regarding the feature

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.