[SaaS] Send introductory email about user overages after renewal
Problem to solve
SaaS customers are being surprised and taken off-guard by Quarterly Subscription reconciliations. Because self-service SaaS customers have not historically been charged true-ups, the QSR process and the fact that they have to pay for overages is totally new. See tickets from customers here.
Intended users
This issue is just for SaaS customers.
- Group Owners of a group who have just renewed (manually or auto-renewed) a subscription
- Only groups enrolled in quarterly subscription reconciliation. See exactly which use cases we're solving for in the Epic description.
Proposal
After a subscription has been renewed (manually or auto-renewed) for a group in GitLab, send an email to all group Owners 1 day after a subscription has been renewed to make them aware of how users are counted and how overages are handled.
We should send an email to all group Owners (not just the group Owner who purchased the subscription), because all group Owners should be aware of the overage behavior.
Design
Email copy
Subject line: Managing users in your subscription
Dear [customer],
Thank you for renewing your GitLab.com subscription! As you get started, we want to make sure you understand some important billing information.
Your subscription cost is based on the maximum number of seats you use during the billing period. If you reach the number of seats in your subscription, you can continue to add users, but GitLab bills you for the overage. These bills occur every quarter.
Read more about quarterly reconciliation in our product documentation.
If you have any questions about this process, please reach out. We are happy to assist.
Thank you for your business!
GitLab Billing Team
Implementation details
Creating the email template and a mailer
- Create a notification mailer file within app/mailers
- Create a method named
renewed_subscription_introductory - add a new template
renewed_subscription_introductory.html.hamlfor the new email and a corresponding plain text versionuser_overage_after_purchase.text.erbin notification_mailer - Create preview template for the new methods
Scheduling and sending email
- Schedule a sidekiq mailer next day after the new
order.start_dateas soon as the callback is received via Zuora for a renewed subscription. - Find customers matching order's zuora_account_id and use email column to send the mails.
Logging
- Add logs information explaining the steps being performed for future audit.