Skip to main content

Apply Discounts

SUMMARY:

  • The primary goal of this update is to keep annual subscribers from churning when their subscription is about to renew at the regular price. (Many users get a yearly plan with a 40% or 50% discount, then they are shocked when the subscription renews at double the price after a year)
  • We want to make sure that only specific discounts are applied to the user’s subscription renewal (for example, if we are running any other random promo that the user has not had to opt into, the discount should not be applied to their next renewal)
  • We want this new system to be modular enough that we _can _also use it for applying discounts on monthly renewals, if we ever want to do that.

SPECS:

Scenario: Discount is categorized as being valid on new or existing subscription

Given a discount is created or updated in the subscription discounts table

Then the new column User should have a value of new (only applied to new subscriptions) or renewal** **(only applied to existing subscriptions)

Scenario: Admin creates or updates discount on /subscription_discounts

Given a POWr admin creates a new discountor updates an existing one on https://www.powr.io/subscription_discounts

Then the admin should see a dropdown for “Applied to existing or new subscription?” that contains the options new and renewal

And the selection is saved to the new discount in subscription_discounts.subscription_eligibility

Scenario: Apply discount on existing yearly upgrade

Given a user has an existing pro_subscription (Starter, Pro, or Business)

When the user has a discount active in their account

And that discount has a value of _renewal _in the subscription_eligibility column

Then the next subscription renewal should have a promo_price that reflects the discount amount

And the promo_end date should be equal to renewal date + monthly_trial_length, yearly_trial_length, or biennially_trial_length depending on the subscription_type of the pro_subscription

(For example, a user claims a renewal discount on a yearly subscription on Dec 1 2019. The `renewal date is Jan 1 2020. The promo_end date should then be Dec 30 2020)

Scenario: Don’t apply renewal discount on new subscription

Given a user has an existing pro_subscription (Starter, Pro, or Business)

And the user has a discount active in their account

And that discount has a value of _renewal _in the subscription_eligibility column

When the user purchases a new subscription

Then the discount should not be applied to the new subscription

Scenario: User gets a second discount on the same subscription

Given a user purchased a pro_subscription with a discount

When the user claims a renewal discount on the upcoming renewal

Then the existing promo_price and promo_end date will be overwritten

And the record of the old discount still exists in a new db table called user_notification_pro_subscriptions

And that table contains the following columns:

alt_text ** **

Scenario: App Subscriptions - no changes

Given a user has an active app_subscription

Then the user should never be eligible to apply a discount to their renewal payment

Scenario: Redeeming renewal discounts

Given a user has NO active yearly pro_subscription

Then the user should never see any discounts that are eligible to be used for the next renewal

(The discount should only be made available via click (within an email or text) and should only ever be shown to users with a yearly subscription)

Scenario: Admin redeems renewal discount on behalf of user

Given a POWr admin enables a user notification for a user via https://www.powr.io/admin/tech_support_helper?search_by_user=pilarsterne%40gmail.com#messages

When the admin selects a subscription discount that has a subscription_eligibility of “renewal”

Then a modal should open that lists all of the user’s active pro_subscriptions

And each subscription should have an “Activate” button next to it

And clicking on the button will apply the discount on the next renewal for that subscription

Scenario: User requests discount on renewal via customer support

Given a user contacts POWr support and asks for a discount on their upcoming renewal

When the POWr admin opens /admin/tech_support_helper for that user’s account

Then the admin should be able to select the renewal discounts from the dropdown in the Discounts tab

And the discount will be activated in the user’s account

And the discount will automatically be applied to the next renewal payment

Notes from Praneeta:

  • Think about negative discounts
  • Ensure Praneeta reviews this