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 37 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 is to add new fields and mathematical calculations in the system to give this information to the customer support agent.
Example:

image-20240815-190442.pngimage-20240828-191041.png

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

Acceptance Criteria

1 - Display of Information on Screens

  • Given that the user accesses the Loyalty Transactions, Orders, and Recent Orders screens,

  • When the transactions are loaded,

  • Then the system should display the following information in order:

    • Initial Points

    • Points Earned (regular points and bonus points)

    • Points burned (displayed as a negative value, e.g., “-60”)

    • Transaction balance (points earned minus points used)

    • User's Final Points in that order.

2 - Display of Orders and Status

  • Given that the support agent accesses the orders screen and understands the meaning of each status,

  • When the screen is loaded,

  • Then all orders should be displayed, including all relevant statuses:

    • Claimed: Success status where points are credited or debited.

    • Confirmed: Order completed but not finalized (e.g., delivery not completed), where the points do not impact the user's total.

    • Void: Canceled order where the points do not impact the user's total.

3 - Feature Flag

  • Given that there is new data to be displayed,

  • When the feature flag is activated,

  • Then the new data should be displayed in the user interface.

  • And when the feature flag is deactivated, the new data should be hidden.

    • PS: This flag is temporary

4 - Points Calculation

  • Given that the points received, used, bonus, and final points are derived from the loyalty system,

  • When the transactions are processed,

  • Then no changes should be made to the existing calculations.

  • And we will not be responsible for correcting and/or altering loyalty rules.

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 the currentPoints for each user order. We can verify if this value is reflected on the src/components/intl-loyalty/points-balance.tsx (Layout Transaction) screen.

Frontend:

We can see the discussion about this in this thread: https://rbidigital.slack.com/archives/C067D4XK9D5/p1724350040702039

 Create a Feature Flag

Name suggestion: display-points-balance
Local: Intl Tech - Platform
Type: Temporary

 Technical debt remove a Feature Flag

Name suggestion: display-points-balance
Local: Intl Tech - Platform

The features on the screens can be consolidated into a single component for (Loyalty Transaction and Orders screen). The Details Order screen will be other task.

 Improve Loyalty Transactions Screen

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

  • Label “Balance“ to “Points Balance“

  • Label “Total“ to “Transaction balance“

  • Add “ - “ before “Points burned”

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

      • points used: 0

      • points used: -123

  • Add field “Initial points balance“

    • Calculate value: totalPoints - pointsEarned - poinstUsed

  • Add field “Final points balance“

  • Add “bonusPoints” on “pointsEarned”

image-20240828-191133.png

 Improve Recent Orders Screen

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

  • Attention - Some labels have changed, but Figma has not been updated:

    • Total Transaction Points → Transaction balance

    • Points Used → Points Burned

  • 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 “Points burned“

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

      • points used: 0

      • points used: -123

  • Add field “Transaction balance“

    • pointsEarned - pointsUsed consider bonusPoints as well

  • Add field “Final points balance“

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

image-20240821-173524.png

 Improve Order Details Screen

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

  • Attention - Some labels have changed, but Figma has not been updated:

    • Total Transaction Points → Transaction balance

    • Points Used → Points Burned

  • Add field “Initial points balance“

  • Add “ - “ before “Points burned”

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

      • points used: 0

      • points used: -123

  • Add filed “Transaction balance“

    • pointsEarned - pointsUsed consider bonusPoints as well

  • Label “Balance“ to “Final points balance“

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

image-20240821-173549.png

 Create new utils with functions to calculate transactions values

Local src/utils/…

  • 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.

The information contained in this section is already available and ready. It is provided for reference and awareness in case any changes are needed.

LaunchDarkly

Create and enable a new feature flag: display-points-balance, this flag is temporary and we will create a technical debt to remove this flag.

Configuration of Product Loyalty Points Price

If we need to use the reward points, we can select some products from the club menu. If the registered products are not available for your restaurant, we can make some adjustments in the DOP (FZ-Portal) to make them accessible. Please see the video below:

Screen Recording 2024-08-21 at 16.53.49.mov

After this, we need to refresh the whitelabel and use the rewards product.

Change points and number of uses

For existing products, we can change the number of points required to obtain them. 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 ha,s a status to inform if it needs to add, remove, or ignore the points.

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

image-20240816-194815.png

Exithe sting the CONFIRMED status as well, and this status is added for the orders that are 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.

Step

Expected Results

If the FF is enable

Show new fields on the screens:

  • Loyalty Transactions

  • Orders

  • Recent Orders

Existing orders with the status CLAIMED

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation must change the user's final points.

image-20240821-175950.png

Existing orders with the status CONFIRMED

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation must not change the user's final points.

After complete delivery this status change to CLAIMED or VOID

image-20240821-175634.png

Existing orders with the status VOID

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation must not change the user's final points.

image-20240826-130423.png

If the user has 2 or more order with CONFIRMED

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation must not change the user's final points.

After complete delivery this status change to CLAIMED or VOID

For each order, the initial and final points are the same because confirmed transactions do not accumulate points.

If the user has 2 or more order with CONFIRMED and change to VOID

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation must not change the user's final points.

The order change to VOID and don’t change the final poins

If the user has 2 or more order with CONFIRMED and change to CLAIMED

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation must not change the user's final points.

The order change to CLAIMED and change the final poins

If the user has 2 or more order with CONFIRMED and change one to CLAIMED and other to VOID

Show the order with earned values, used values, transactions, initial points, and final points.

In this status, the calculation should adjust the user's final points solely based on the value of the order that has been marked as claimed. The void should be completely disregarded, as its values are outdated.

Attention:

If the oldest order is successfully completed (CLAIMED) and the most recent one fails (VOID), the value of the CLAIMED order will impact the final points. However, the VOID order will not impact the points and will retain its initial and final values as outdated, since when an order is marked as VOID, it is not considered.

image-20240820-135926.png

image-20240820-140013.png

⚠️ Call-outs

Tip: Document here any improvement or discussion regarding the feature

  • No labels