[Solution] Admin tool - Add Customer Tier Information
Document Status | Reviewed |
---|---|
Document Owner(s) | @Goncalves, Felipe |
Reviewers | @Raphael Ferreira Gomes @Ruani, Andrea @Garozzo de Sobral, Wellington @Franca, Helio @Augusto Romao, Vinicius @Caes, Guilherme |
- 1 Potential Solutions
- 2 Proposed Solution
- 3 Figma file
- 3.1 Development
- 3.1.1 Add Feature Flag
- 3.1.2 Backend:
- 3.1.2.1 Customer Tier and Market Tier
- 3.1.3 Frontend
- 3.1.3.1 Common Functions
- 3.1.3.2 Screen Customer
- 3.1 Development
- 4 POC
- 5 Acceptance Criteria
- 6 Potential Challenges
- 7 Cost
- 8 Configuration
- 9 Metrics
- 10 Delivery Plan
- 11 QA Plan
- 12 Call-outs
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.
The best solution is to present the tier data directly to the admin-app user. This information is already available in the Loyalty repository, and the admin-app can access it. With this approach, we aim to display the tier-related data for the customer, enabling the support user to respond to some inquiries promptly and efficiently.
Proposed Solution
Description of the proposed solution.
In this solution, we plan to create a new query in the Loyalty provider. With this single new query, we will retrieve tier information related to both the Customer and the Market. With this data, we will be able to display more details about the customer current level and points, along with market information that includes the period and the number of points required for the user to level up or maintain a higher level.
Figma file
Development
Add Feature Flag
Create an FF enable-customer-tier, this flag will be temporary.
In Sanity, there is already a flag to enable the Loyalty Tier, but this flag controls this feature in the WL-App. Therefore, for safety reasons, we will use the Sanity flag in conjunction with the LaunchDarkly flag. This way, if any issues arise in the Admin-app, we can disable only the LD flag without impacting Sanity and the WL-App.
Backend:
Customer Tier and Market Tier
We will need tier information on the customer screen, including details about the User Tier and the Market Tier. To address this, we will create a new function in the Loyalty Provider that will retrieve both pieces of information, allowing us to utilize them in any screen.
We can see it in this diagram bellow.
Frontend
Common Functions
Screen Customer
POC
https://github.com/rbilabs/intl-admin-app/pull/824
Acceptance Criteria
1 - Display Tier Information on Customer Screen
Given that the user accesses the Customer screens,
When the customer data is loaded,
Then the system should display the following information in Loyalty Panel:
Loyalty Points Balance
Current Loyalty Tier
This label changes if the user changes the Tier level
Loyalty Tier Period
Points earned in this Tier and how much need to change or maintain the Tier
This label changes if the user changes the Tier level
2 - 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
3 - Tier Market
Given some brand has the loyalty tier enable in Sanity,
Then we need to display the informations on Admin-app.
Potential Challenges
Cost
Configuration
LaunchDarkly
Create a new Feature Flag called enable-customer-tier on LD Intl Tech - Platform, this flag is temporary, and we will create a technical debt to remove this flag.
How configure the Customer Tier
To configure a customer tier in a market, we can follow this document.
To understand the architecture is this document.
Metrics
This metric can be obtained through the number of tickets opened for the support team, particularly considering the duration of the tickets and whether a resolution was achieved on the first contact. And we can reach out to the agent support stakeholders and gather their feedback. The goal of this requirement is to streamline access to the customer's tier information, enabling the support user to resolve tickets more efficiently.
Delivery Plan
The delivery will be separate in two parts:
Tier information on Customer Screen.
Tier information on Loyalty Transaction Screen, this screen we can see the Tier Point in each order. [Solution] Summary & historical data from Customer Tier in Loyalty Transaction
QA Plan
Test Scenario | Expected Result |
---|---|
if FF enable-customer-tier is disabled or enableLoyaltyTiers Flag Sanity is disabled | No Tier Information is showed |
if FF enable-customer-tier is enabled AND enableLoyaltyTiers Flag Sanity is enabled | Show Tier information and Balance points |
If the user is Tier_1 (Normal Tier) | Show first level information label, icon, period and destination points |
If the user is Tier_2 (Super Tier) | Show second level information label, icon, period and destination points |
If the user moves from level 1 to level 2 | Show second level information label, icon, period and destination points |
If the user moves from level 2 to level 1 | Show first level information label, icon, period and destination points |
If the deadline expires, or the level changes | Level points need to change to 0 |
Call-outs
All information related to the Tier, both for users and the market, is sourced from the loyalty system. Thus, all calculations, date periods, and levels originate from this system, and in the admin app, these data will only be displayed, without any calculations or alterations to the values. If any value is being returned incorrectly, the issue should be addressed in the loyalty repository with the loyalty team.