Skip to content

Flow Patterns

Common flow patterns for typical email communication use cases. Each pattern includes the flow configuration JSON and template requirements.


Welcome Series

A multi-email onboarding sequence triggered when a new user signs up.

json
{
"name": "Welcome Series",
"trigger_event": "signup_completed",
"content_type": "transactional",
"steps": [
{
"type": "send_email",
"template_slug": "welcome-email",
"description": "Immediate welcome email with getting started guide"
},
{
"type": "wait",
"duration": "24h"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "first_action_completed",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "getting-started-tips",
"description": "Tips for getting value from the product"
},
{
"type": "wait",
"duration": "72h"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "first_action_completed",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "activation-nudge",
"description": "Final nudge to complete first action"
}
]
}

Key design decisions:

  • Check after each wait step whether the user has already activated. Stop sending if they have.
  • Space emails 24-72 hours apart to avoid overwhelming new users.
  • Each email should have a clear CTA that drives toward the activation goal.

Cart Abandonment

Remind users about items left in their cart. Triggered when a cart is created and cancelled when a purchase is completed.

json
{
"name": "Cart Abandonment Reminder",
"trigger_event": "cart_created",
"content_type": "promotional",
"steps": [
{
"type": "wait",
"duration": "1h"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "order_completed",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "cart-abandonment-reminder",
"description": "Remind about items in cart"
},
{
"type": "wait",
"duration": "24h"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "order_completed",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "cart-abandonment-discount",
"description": "Offer a discount to complete purchase"
}
]
}

Event payload example:

json
{
"event_name": "cart_created",
"external_id": "user_12345",
"attributes": {
"cart_id": "cart_abc123",
"items": [
{"name": "Widget Pro", "price": 49.99, "image_url": "https://..."}
],
"total": 49.99,
"cart_url": "https://store.example.com/cart/abc123"
}
}
Tip

Always check for the order_completed event before sending a reminder. If the user completed checkout during the wait period, skip the reminder.


Re-engagement Campaign

Win back inactive users who have not performed any action in the last 30 days.

json
{
"name": "Re-engagement",
"trigger_event": "inactivity_detected",
"segment_id": "seg_inactive_users",
"content_type": "promotional",
"steps": [
{
"type": "send_email",
"template_slug": "we-miss-you",
"description": "Initial re-engagement with product highlights"
},
{
"type": "wait",
"duration": "7d"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "login",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "special-offer",
"description": "Incentive to return"
}
]
}

Segment for inactive users:

json
{
"name": "Inactive Users (30+ days)",
"filters": {
"all": [
{"field": "subscription_status", "operator": "is", "value": "subscribed"},
{"field": "event", "operator": "has_not_executed", "value": "login"}
]
}
}
Note

The inactivity_detected event would be triggered by a Celery Beat scheduled task that scans for inactive users daily. This pattern combines scheduled detection with the flow engine for delivery.


Transactional Notification

Single-email notification for a business event (no wait steps, no conditions).

json
{
"name": "Claim Submitted Notification",
"trigger_event": "claim_submitted",
"content_type": "transactional",
"steps": [
{
"type": "send_email",
"template_slug": "claim-submitted-notification"
}
]
}

This is the simplest flow pattern. Every claim_submitted event triggers one email.

Template example (NLT):

html
<p>Hi `{the user's First Name, or "there"}`,</p>
 
<p>Your claim has been submitted successfully.</p>
 
<table>
<tr>
<td><strong>Reference:</strong></td>
<td>`{the Reference Number from the trigger event, required}`</td>
</tr>
<tr>
<td><strong>Type:</strong></td>
<td>`{the Claim Type from the trigger event}`</td>
</tr>
<tr>
<td><strong>Date:</strong></td>
<td>`{the Incident Date from the trigger event, as "long date"}`</td>
</tr>
</table>
 
<p><a href="`{the Claim Status URL from the trigger event}`">View Claim Status</a></p>

Multi-Step Follow-Up

A follow-up flow that sends a reminder if the user has not completed a required action.

json
{
"name": "Document Upload Reminder",
"trigger_event": "claim_submitted",
"trigger_conditions": {"requires_documents": true},
"content_type": "transactional",
"steps": [
{
"type": "send_email",
"template_slug": "document-upload-request"
},
{
"type": "wait",
"duration": "48h"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "documents_uploaded",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "document-upload-reminder"
},
{
"type": "wait",
"duration": "72h"
},
{
"type": "condition",
"check": {
"source": "latest_event",
"event_name": "documents_uploaded",
"exists": true
},
"on_true": "skip_to_end",
"on_false": "continue"
},
{
"type": "send_email",
"template_slug": "document-upload-final-reminder"
},
{
"type": "update_contact",
"set": {"needs_manual_follow_up": true}
}
]
}

Key design decisions:

  • Use trigger_conditions to filter only claims that require documents
  • Escalate urgency with each reminder
  • After the final reminder, update the contact with a flag for manual follow-up by the support team

Pattern Summary

PatternTriggerStepsContent Type
Welcome Seriessignup_completed3 emails with waits + conditionsTransactional
Cart Abandonmentcart_created2 emails with waits + purchase checkPromotional
Re-engagementinactivity_detected2 emails with wait + login checkPromotional
TransactionalBusiness event1 email, no waitsTransactional
Multi-Step Follow-UpBusiness event3 emails with waits + action checksTransactional