Submit cancellation data from your custom cancel flow.
// Submit a cancel flow responseawait windback.submitCancelFlow({ customerEmail: "jane@example.com", cancelReason: "Too expensive for our team", feedbackText: "Love the product but budget is tight", selectedOffer: "downgrade", // optional: if they accepted a retention offer});// Report just the cancel reasonawait windback.reportCancelReason({ customerEmail: "jane@example.com", reason: "switching_competitor",});
Create Churn Events
Manually create churn events when not using webhooks.
await windback.createRecoveryTemplate({ name: "Win-back discount", subject: "We'd love to have you back, {{name}}", body: "Hi {{name}},\n\nWe noticed you recently canceled...", strategy: "discount",});