> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.swellsystem.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Crisp Events and Automated Campaigns

# Crisp Events and Automated Campaigns

The application pushes user events to Crisp via the REST API. These events appear in the user's profile in Crisp and can trigger **automated campaigns** (emails or chat messages).

## Events We Push

| Event | When | Color | Use Case |
|-------|------|-------|----------|
| `user:signup` | New user registration | Green | Welcome email, onboarding tips |
| `user:subscription:started` | New subscription or plan change | Green | Thank-you email, setup tips |
| `user:subscription:canceled` | User cancels (access until period end) | Orange | Retention/挽留 campaign, offer to stay |
| `user:subscription:churned` | Subscription period ended (churned) | Red | Win-back campaign |
| `user:onboarding:completed` | User finished guided onboarding | Green | Next-steps, feature highlights |
| `user:import:completed` | CSV import finished | Green | Tips, follow-up |

## Event Data

Each event includes optional `data` (plan, tenant_name, module, stats, etc.) visible in Crisp. Use this for personalization in campaigns.

## Setting Up Automated Campaigns in Crisp

1. Go to **Crisp Dashboard** → ** campaigns** → **New Campaign** → **Automated Campaign**
2. Enter the **event name** (e.g. `user:subscription:canceled`) as the trigger
3. Write your email or chat message
4. Activate the campaign

**Requirements:**

- Custom Email Domain or Custom SMTP verified in Crisp
- Event names must match exactly (case-sensitive)

## Example Campaigns

- **user:subscription:canceled** → "We're sorry to see you go" email with挽留 offer or link to talk to support
- **user:subscription:churned** → Win-back email 7–14 days after churn
- **user:signup** → Welcome email with getting-started link
- **user:onboarding:completed** → Tips and feature highlights
- **user:import:completed** → Tips on using imports, next steps

## Support Team Context

When a user opens a chat or emails support, Crisp shows:

- **User data** (synced on each page load): plan, subscription status, trial days, tenant info, etc.
- **Session tags**: plan-*, status-*, trial, onboarded, etc.
- **Event timeline**: All pushed events with timestamps and data

Use this to provide contextual support (e.g. "I see you just completed an import of 50 contacts..." or "I notice your trial is expiring in 3 days").
