feat: Added longterm retention check in template#4061
feat: Added longterm retention check in template#4061jobenjada merged 2 commits intoformbricks:mainfrom thefool76:main
Conversation
|
@thefool76 is attempting to deploy a commit to the formbricks Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughA new function named Changes
Possibly related PRs
Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- packages/lib/templates.ts (2 hunks)
🔇 Additional comments (2)
packages/lib/templates.ts (2)
5326-5458: Well-structured implementation with comprehensive retention assessment.The implementation provides a thorough assessment of user satisfaction and retention factors through a well-balanced mix of question types and topics.
5502-5502: LGTM: Clean integration into templates array.The new template is correctly integrated into the exports, maintaining consistency with the existing pattern.
| type: TSurveyQuestionTypeEnum.Rating, | ||
| range: 5, | ||
| scale: "star", | ||
| headline: { default: "How satisfied are you with our product overall?" }, | ||
| required: true, | ||
| lowerLabel: { default: "Not satisfied" }, | ||
| upperLabel: { default: "Very satisfied" }, | ||
| isColorCodingEnabled: true, |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Consider standardizing rating scales for consistency.
The template uses different rating scales (star, number, smiley) which might lead to inconsistent data analysis. Consider standardizing to use the same scale type for similar questions, particularly for satisfaction-related metrics.
Example standardization:
- scale: "star",
+ scale: "number",Also applies to: 5372-5379, 5404-5412, 5438-5445
| questions: [ | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.Rating, | ||
| range: 5, | ||
| scale: "star", | ||
| headline: { default: "How satisfied are you with our product overall?" }, | ||
| required: true, | ||
| lowerLabel: { default: "Not satisfied" }, | ||
| upperLabel: { default: "Very satisfied" }, | ||
| isColorCodingEnabled: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.OpenText, | ||
| headline: { default: "What do you find most valuable about our product?" }, | ||
| required: false, | ||
| placeholder: { default: "Describe the feature or benefit you value most..." }, | ||
| inputType: "text", | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.MultipleChoiceSingle, | ||
| shuffleOption: "none", | ||
| choices: [ | ||
| { id: createId(), label: { default: "Features" } }, | ||
| { id: createId(), label: { default: "Customer support" } }, | ||
| { id: createId(), label: { default: "User experience" } }, | ||
| { id: createId(), label: { default: "Pricing" } }, | ||
| { id: createId(), label: { default: "Reliability and uptime" } }, | ||
| ], | ||
| headline: { default: "Which aspect of our product do you find most essential to your experience?" }, | ||
| required: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.Rating, | ||
| range: 5, | ||
| scale: "number", | ||
| headline: { default: "How well does our product meet your expectations?" }, | ||
| required: true, | ||
| lowerLabel: { default: "Falls short" }, | ||
| upperLabel: { default: "Exceeds expectations" }, | ||
| isColorCodingEnabled: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.OpenText, | ||
| headline: { default: "What challenges or frustrations have you faced while using our product?" }, | ||
| required: false, | ||
| placeholder: { default: "Describe any challenges or improvements you’d like to see..." }, | ||
| inputType: "text", | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.MultipleChoiceSingle, | ||
| shuffleOption: "none", | ||
| choices: [ | ||
| { id: createId(), label: { default: "Very likely" } }, | ||
| { id: createId(), label: { default: "Somewhat likely" } }, | ||
| { id: createId(), label: { default: "Neutral" } }, | ||
| { id: createId(), label: { default: "Somewhat unlikely" } }, | ||
| { id: createId(), label: { default: "Very unlikely" } }, | ||
| ], | ||
| headline: { default: "How likely are you to recommend our product to others?" }, | ||
| required: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.Rating, | ||
| range: 10, | ||
| scale: "number", | ||
| headline: { default: "On a scale of 1-10, how would you rate our product's impact on your goals?" }, | ||
| required: true, | ||
| lowerLabel: { default: "Low impact" }, | ||
| upperLabel: { default: "High impact" }, | ||
| isColorCodingEnabled: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.MultipleChoiceMulti, | ||
| shuffleOption: "none", | ||
| choices: [ | ||
| { id: createId(), label: { default: "New features and improvements" } }, | ||
| { id: createId(), label: { default: "Enhanced customer support" } }, | ||
| { id: createId(), label: { default: "Better pricing options" } }, | ||
| { id: createId(), label: { default: "More integrations" } }, | ||
| { id: createId(), label: { default: "User experience refinements" } }, | ||
| ], | ||
| headline: { default: "What would make you more likely to remain a long-term user?" }, | ||
| required: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.OpenText, | ||
| headline: { default: "If you could change one thing about our product, what would it be?" }, | ||
| required: false, | ||
| placeholder: { default: "Share any changes or features you wish we’d consider..." }, | ||
| inputType: "text", | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.Rating, | ||
| range: 5, | ||
| scale: "smiley", | ||
| headline: { default: "How happy are you with our product updates and frequency?" }, | ||
| required: true, | ||
| lowerLabel: { default: "Not happy" }, | ||
| upperLabel: { default: "Very happy" }, | ||
| isColorCodingEnabled: true, | ||
| }, | ||
| { | ||
| id: createId(), | ||
| type: TSurveyQuestionTypeEnum.OpenText, | ||
| headline: { default: "Any additional feedback or comments?" }, | ||
| required: false, | ||
| placeholder: { default: "Share any thoughts or feedback that might help us improve..." }, | ||
| inputType: "text", | ||
| }, | ||
| ], |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Consider adding branching logic for deeper insights.
The survey could benefit from conditional branching logic to dive deeper into specific responses. For example, when users indicate low satisfaction, you could ask follow-up questions about specific pain points.
Example addition for the first satisfaction question:
{
id: createId(),
type: TSurveyQuestionTypeEnum.Rating,
range: 5,
scale: "number",
headline: { default: "How satisfied are you with our product overall?" },
required: true,
lowerLabel: { default: "Not satisfied" },
upperLabel: { default: "Very satisfied" },
isColorCodingEnabled: true,
+ logic: [
+ {
+ id: createId(),
+ conditions: {
+ id: createId(),
+ connector: "and",
+ conditions: [
+ {
+ id: createId(),
+ leftOperand: {
+ value: "currentQuestionId",
+ type: "question",
+ },
+ operator: "isLessThanOrEqual",
+ rightOperand: {
+ type: "static",
+ value: 2,
+ },
+ },
+ ],
+ },
+ actions: [
+ {
+ id: createId(),
+ objective: "jumpToQuestion",
+ target: "specificPainPointsQuestionId",
+ },
+ ],
+ },
+ ],
},Committable suggestion was skipped due to low confidence.
jobenjada
left a comment
There was a problem hiding this comment.
tweaked it a bit, thanks! :)
|
Awarding thefool76: 300 points 🕹️ Well done! Check out your new contribution on oss.gg/thefool76 |
Co-authored-by: Johannes <[email protected]>
What does this PR do?
I have added the longTerm Retention Check In template
Retention Insights: Pinpoints key retention factors and loyalty drivers, helping you understand what keeps users engaged long-term
for Saas product, any industry etc
Fixes # (issue)
Video Demo
Click here to watch
How should this be tested?
Checklist
Required
pnpm buildconsole.logsgit pull origin mainAppreciated
Summary by CodeRabbit
longTermRetentionCheckIn, to assess long-term user satisfaction and loyalty.