-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proactively cancel inactive trials 3 days before end (#4553)
* Proactively cancel inactive trials 3 days before end * ✂️ * ✨ * Send email when canceling trial proactively * ✂️ * Log in Slack
- Loading branch information
Showing
5 changed files
with
138 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -189,3 +189,29 @@ export async function sendAdminDataDeletionEmail({ | |
}; | ||
return sendEmail(email, msg); | ||
} | ||
|
||
export async function sendProactiveTrialCancelledEmail( | ||
email: string | ||
): Promise<void> { | ||
const message = { | ||
from: { | ||
name: "Gabriel Hubert", | ||
email: "[email protected]", | ||
}, | ||
subject: "[Dust] Your Pro plan trial has been cancelled early", | ||
html: `<p>Hi,</p> | ||
<p>I'm Gabriel, a cofounder of Dust. Thanks for trying us out with a free trial of the Pro Plan.</p> | ||
<p>You've not used core features of the product (adding data sources, creating custom assistants) and you haven't used assistant conversations in the past 7 days. | ||
As a result, to avoid keeping your payment method on file while you may not intend to convert to our paid plan, we've cancelled your trial ahead of time and won't be charging you.</p> | ||
<p>If you did intend to continue on Dust, you can subscribe again. If you'd like to extend further, feel free to just email me.</p> | ||
<p>Thanks again for trying Dust out. If you have a second, please let me know if you have any thoughts about what we could do to improve Dust for your needs!</p> | ||
Gabriel`, | ||
}; | ||
|
||
return sendEmail(email, message); | ||
} |
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
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
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
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