Last active
March 15, 2018 05:20
-
-
Save kristinaluxgroup/a271b621fc3d2b7540f1d35935db49eb to your computer and use it in GitHub Desktop.
Proposal: Same promo - different discount for new and existing customers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Same promo - different discount for new and existing customers | |
Proposal 1 | |
Promo setup: | |
1. We create a promo code - AMEX_SINGAPORE with a BIN range 111111-222222 | |
2. We create two other promo codes | |
AMEX_SINGAPORE_1 - to be used for existing customers - discount $100, same range | |
AMEX_SINGAPORE_2 - to be used for new customers - discount $200, same range | |
Scenario: | |
1. A customer with a credit card issued from AMEX Singapore goes to LE and types a promo code AMEX_SINGAPORE | |
2. A GET request is sent to the promo-svc (getCodeByName) | |
3. Promo-svc is getting the code from the db and checks if there is a range attached to it. | |
4. If there is a range, promo service makes a request to svc-order to get the purchases for the customer id (/api/orders?customer_id=ed9e3ef4-969f-4f08-ba4c-89878b7d5590) | |
5. The promo service now knows if the customer is new or existing | |
6. If it's an existing customer, promo service queries for AMEX_SINGAPORE_1 and returns the info for that info to LE | |
7. If it's a new customer, promo service queries AMEX_SINGAPORE_2 and returns the info for that info to LE | |
Proposal 2 | |
Promo setup: | |
1. There are new fields to the promo code | |
- has_different_values_for_existing_vs_new_customer_discounts - true/false | |
- promo_value_new_customers - integer | |
- promo_value_existing_customers - integer | |
Scenario: | |
1. A customer types the promo, CP asks promo service for data | |
2. Promo service checks if has_different_values_for_existing_vs_new_customer_discounts | |
3. If it is true it should query order service for the type of customer (new/existing) | |
4. I will return to CP only one promo value (promo_value_new_customers or promo_value_existing_customers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Promo setup:
existing_customer_discount
andnew_customer_discount
Scenario:
existing_customer_discount
andnew_customer_discount
.existing_customer_discount
new_customer_discount