This cookbook provides a comprehensive guide for building sophisticated onboarding systems using Courier's notification orchestration platform. Instead of spending months building notification infrastructure from scratch, you can leverage these production-ready examples to create intelligent, multi-channel onboarding experiences that adapt to user behavior and drive activation.
Following this cookbook, you'll create an onboarding system that:
- Triggers automatically based on user events (signup, team invites, project creation)
- Sends multi-step sequences that adapt based on user progress and engagement
- Routes intelligently across email, SMS, push, in-app, and Slack channels
- Personalizes experiences for different user segments (enterprise, startup, trial)
- Escalates to humans when high-value accounts need help
- Tracks everything with built-in analytics and optimization capabilities
- Works everywhere with native support for web, iOS, and Android
# Install Courier SDK for Node.js
npm install @trycourier/courier
# For React frontend (Inbox component)
npm install @trycourier/react-provider @trycourier/react-inbox
# For mobile
npm install @trycourier/courier-react-native
# For Python projects
pip install trycourier
# For Ruby/Rails projects
gem install trycourierCreate a .env file with your Courier credentials:
COURIER_AUTH_TOKEN=your_courier_api_key
COURIER_CLIENT_KEY=your_client_key_for_frontend
COURIER_WEBHOOK_SECRET=your_webhook_secret
# Optional: Integration tokens
SLACK_TOKEN=your_slack_token
SEGMENT_WRITE_KEY=your_segment_key
MS_GRAPH_TOKEN=your_microsoft_graph_token- Initialize Courier (
setup_initialization.js)
import { CourierClient } from "@trycourier/courier";
const courier = CourierClient({
authorizationToken: process.env.COURIER_AUTH_TOKEN
});- Track user events (
event_driven_triggers.js)
const events = new OnboardingEvents(courier, userId, tenantId);
await events.userSignedUp(userData);- Display tasks in your app (
onboarding_tasks_frontend.jsx)
import { Inbox } from "@trycourier/react-inbox";
function OnboardingTasks() {
return <Inbox views={[{ id: "onboarding", label: "Setup Tasks" }]} />;
}| File | Purpose | Key Features |
|---|---|---|
setup_initialization.js |
SDK setup and configuration | Multi-tenant support, environment config |
event_driven_triggers.js |
Event tracking and automation triggers | User signup, team invites, project creation |
multi_step_sequences.js |
Complex automation workflows | Conditional logic, time delays, branching |
smart_channel_routing.js |
Multi-channel message routing | Fallback logic, priority routing, channel selection |
personalized_onboarding.js |
Adaptive user journeys | Role-based flows, behavior tracking |
| File | Purpose | Key Features |
|---|---|---|
onboarding_tasks_backend.js |
Server-side task creation | Task scheduling, progress tracking |
onboarding_tasks_frontend.jsx |
React UI components | Interactive checklists, progress bars |
| File | Purpose | Key Features |
|---|---|---|
slack_escalation.js |
Slack alerts for at-risk accounts | Risk scoring, automated alerts |
microsoft_teams_escalation.js |
Teams integration for enterprises | Adaptive cards, channel creation |
| File | Purpose | Key Features |
|---|---|---|
mobile_onboarding.jsx |
React Native implementation | Push notifications, native UI |
python_sdk_onboarding.py |
Python/Django integration | Async support, type hints |
ruby_sdk_onboarding.rb |
Ruby on Rails integration | ActiveRecord integration, Sidekiq support |
| File | Purpose | Key Features |
|---|---|---|
onboarding_analytics.js |
Performance tracking | Engagement metrics, funnel analysis |
testing_onboarding.js |
Test suite | Edge cases, performance testing |
| File | Purpose | Key Features |
|---|---|---|
segment_integration.js |
Segment CDP integration | Bidirectional sync, event mapping |
webhook_handler.js |
Real-time event processing | Signature verification, event routing |
| File | Purpose | Key Features |
|---|---|---|
user_preferences_management.js |
Preference center | Channel preferences, quiet hours |
multi_tenant_config.js |
Customer segmentation | Branded experiences, custom flows |
Start with the foundational files:
setup_initialization.js- Configure Courier SDKevent_driven_triggers.js- Set up event trackingonboarding_tasks_backend.js- Create initial tasks
Enhance with personalization:
personalized_onboarding.js- Add adaptive pathssmart_channel_routing.js- Implement channel logicmulti_step_sequences.js- Build automation flows
Build the user interface:
onboarding_tasks_frontend.jsx- Add React componentsmobile_onboarding.jsx- Mobile app support
Track and improve:
onboarding_analytics.js- Measure performancewebhook_handler.js- Real-time trackingtesting_onboarding.js- Test and validate flows
Advanced features:
multi_tenant_config.js- Segment customersuser_preferences_management.js- User controlslack_escalation.jsormicrosoft_teams_escalation.js- Human intervention
We welcome contributions! If you've built something cool with Courier's onboarding system:
- Fork this cookbook
- Add your example to the appropriate section
- Include comments and documentation
- Submit a pull request
This cookbook is provided as-is for educational purposes. Feel free to use and modify the code for your own projects.
Happy onboarding! 🚀