> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifuse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Broadcast campaigns

> Broadcast campaigns in Notifuse are mass email marketing initiatives that allow you to send targeted messages to a contact list. They provide powerful features for audience targeting with segment filters, A/B testing, UTM tracking, and flexible scheduling options to deliver the right message to the right people at the right time.

<img src="https://mintcdn.com/notifuse/Gw4P7NadUImyvZfw/assets/screenshots/broadcast.png?fit=max&auto=format&n=Gw4P7NadUImyvZfw&q=85&s=efcb2f3bb8f6badd55d9af3a391c6f89" alt="Broadcasts screenshot" width="3005" height="1934" data-path="assets/screenshots/broadcast.png" />

## Audience Targeting

Broadcast campaigns offer flexible audience targeting through a contact list combined with optional dynamic segments, allowing you to reach the right people with precision.

### Select a List

Each broadcast targets exactly one contact list:

* **Single List**: Choose one contact list as your base audience
* **Clear Attribution**: Message history and unsubscribes are tracked per list
* **Simple Model**: No duplicate handling needed since each contact appears once per list

**Example**: Send a product announcement to your "Newsletter Subscribers" list.

### Segment Filters

Apply dynamic segment filters to further refine your broadcast audience based on contact properties and behavior:

* **Property-Based Filtering**: Target contacts by `lifetime_value`, `orders_count`, location, or any custom fields
* **Behavioral Filtering**: Reach contacts based on email engagement (opens, clicks, bounces)
* **Combined Filters**: Use multiple segment conditions with AND/OR logic for precise targeting
* **Real-Time Updates**: Segment membership is evaluated at send time, ensuring accuracy
* **List + Segment**: Combine list selection with segment filters for maximum targeting precision

#### Segment Filter Examples

* **High-Value Customers**: Send to "All Customers" list + segment filter for `lifetime_value >= 1000`
* **Re-engagement**: Target "Newsletter" list + segment for contacts who haven't opened emails in 90 days
* **Geographic Campaigns**: Use "All Contacts" + segment filter for `country = "US"` AND `state = "California"`
* **Purchase Behavior**: Target segments with `orders_count >= 3` to reward loyal customers

**Important**: When both a list and segment filters are applied, only contacts that belong to the selected list AND match the segment criteria will receive the broadcast.

## A/B Testing

Optimize your campaigns by testing different variations with your audience.

### Test Setup

* **Sample Size**: Test variations on a percentage of your total recipients
* **Multiple Variations**: Create different subject lines, content, or templates
* **Control Groups**: Automatically split your test audience evenly

### Winner Selection

#### Manual Selection

* **Review Results**: Analyze performance metrics for each variation
* **Choose Winner**: Manually select the best-performing variation
* **Send to Remaining**: Deploy the winning variation to the rest of your audience

#### Automatic Selection

Configure automatic winner selection based on performance metrics:

**Open Rate Winner**

* **Metric**: Highest email open rate percentage
* **Time Period**: Set a specific duration (e.g., 2 hours, 24 hours)
* **Auto-Deploy**: Automatically send winning variation after the period

**Click Rate Winner**

* **Metric**: Highest click-through rate percentage
* **Time Period**: Set a specific duration for evaluation
* **Auto-Deploy**: Automatically send winning variation after the period

### A/B Testing Example

1. Create campaign with 2 subject line variations
2. Set test sample to 20% of your audience
3. Configure automatic winner selection based on open rate after 4 hours
4. System automatically sends winning variation to remaining 80%

<img src="https://mintcdn.com/notifuse/Lf7_O5_B8vDGrSYz/assets/screenshots/edit_broadcast.png?fit=max&auto=format&n=Lf7_O5_B8vDGrSYz&q=85&s=b0fd62bdafc4c753236c9c755bc46173" alt="Edit Broadcast screenshot" width="3080" height="1766" data-path="assets/screenshots/edit_broadcast.png" />

## UTM Tracking

### Automatic UTM Parameters

All external links in your email templates automatically receive UTM parameters for comprehensive tracking:

* **utm\_source**: Identifies the email source
* **utm\_medium**: Set to "email" for all broadcast campaigns
* **utm\_campaign**: Uses your campaign name for tracking
* **utm\_content**: Automatically set to the template ID for content identification

### Example UTM Implementation

**Original Link**: `https://yourwebsite.com/products`

**With UTM Parameters**:

```
https://yourwebsite.com/products?utm_source=notifuse&utm_medium=email&utm_campaign=summer_sale_2024
```

### Analytics Integration

* **Google Analytics**: Track email performance in your analytics dashboard
* **Campaign Attribution**: Understand which emails drive website traffic and conversions
* **ROI Measurement**: Calculate campaign effectiveness and return on investment

## Data Feeds

Data feeds allow you to fetch external data from your APIs and use it in your email templates. This enables dynamic, personalized content that goes beyond stored contact properties.

### Global Data Feed

The global data feed fetches data once before the broadcast starts and makes it available to all recipients.

#### Configuration

* **Enable Toggle**: Turn on to activate the global data feed
* **Feed URL**: The HTTPS endpoint that returns JSON data
* **Custom Headers**: Add authentication or custom headers (e.g., `Authorization: Bearer token123`)

#### How It Works

1. When the broadcast starts, Notifuse sends a POST request to your configured URL
2. The request body includes broadcast, list, and workspace information:

```json theme={null}
{
  "broadcast": {
    "id": "abc123",
    "name": "Summer Sale"
  },
  "list": {
    "id": "list456",
    "name": "Newsletter Subscribers"
  },
  "workspace": {
    "id": "ws789",
    "name": "My Company"
  }
}
```

3. Your API should return a JSON object with the data you want to use
4. The data is cached and available in templates as the `global_feed` variable

#### Template Usage

Access global feed data in your templates using the `global_feed` variable:

```liquid theme={null}
{% if global_feed.promotion %}
  <h2>{{ global_feed.promotion.title }}</h2>
  <p>{{ global_feed.promotion.description }}</p>
  <a href="{{ global_feed.promotion.url }}">Shop Now</a>
{% endif %}
```

#### Use Cases

* **Dynamic Promotions**: Fetch current sale information, discount codes, or featured products
* **Real-time Content**: Display live inventory counts, pricing, or availability
* **Centralized Data**: Pull content from a CMS or marketing platform

### Per-Recipient Data Feed

The per-recipient data feed fetches personalized data for each individual recipient before sending their email.

#### Configuration

* **Enable Toggle**: Turn on to activate the per-recipient data feed
* **Feed URL**: The HTTPS endpoint that returns JSON data (must use HTTPS)
* **Custom Headers**: Add authentication or custom headers

#### How It Works

1. Before sending each email, Notifuse sends a POST request to your configured URL
2. The request body includes contact, broadcast, list, and workspace information:

```json theme={null}
{
  "contact": {
    "email": "john@example.com",
    "external_id": "user_789",
    "timezone": "America/New_York",
    "language": "en",
    "first_name": "John",
    "last_name": "Doe",
    "full_name": "John Doe",
    "phone": "+1234567890",
    "address_line_1": "123 Main St",
    "address_line_2": "Apt 4B",
    "country": "US",
    "postcode": "10001",
    "state": "NY",
    "job_title": "Engineer",
    "custom_string_1": "value",
    "custom_number_1": 42,
    "custom_datetime_1": "2024-06-15T00:00:00Z",
    "custom_json_1": {"key": "value"},
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-06-01T14:00:00Z"
  },
  "broadcast": {
    "id": "abc123",
    "name": "Summer Sale"
  },
  "list": {
    "id": "list456",
    "name": "Newsletter Subscribers"
  },
  "workspace": {
    "id": "ws789",
    "name": "My Company"
  }
}
```

All contact fields are included when populated. Empty fields are omitted. Custom fields (`custom_string_1` through `custom_string_5`, `custom_number_1` through `custom_number_5`, `custom_datetime_1` through `custom_datetime_5`, `custom_json_1` through `custom_json_5`) are included when set on the contact.

3. Your API should return a JSON object with personalized data for that contact
4. The data is available in templates as the `recipient_feed` variable

#### Template Usage

Access per-recipient feed data using the `recipient_feed` variable:

```liquid theme={null}
{% if recipient_feed.recommendations %}
  <h3>Recommended for You</h3>
  {% for product in recipient_feed.recommendations %}
    <div>
      <img src="{{ product.image }}" alt="{{ product.name }}" />
      <p>{{ product.name }} - ${{ product.price }}</p>
    </div>
  {% endfor %}
{% endif %}
```

#### Use Cases

* **Product Recommendations**: Fetch personalized product suggestions based on purchase history
* **Account Information**: Display current subscription status, points balance, or loyalty tier
* **Dynamic Content**: Show content based on user preferences stored in your system

### Error Handling

#### Automatic Retry

If a per-recipient feed request fails, Notifuse automatically retries:

* **Retry Attempts**: 2 retries before marking as failed
* **Retry Delay**: 5 seconds between attempts
* **Graceful Degradation**: If all retries fail, the broadcast pauses automatically

#### Circuit Breaker

To protect your broadcast from cascading failures:

* **Failure Detection**: If feed requests consistently fail, the broadcast pauses
* **Manual Resume**: After fixing the issue, manually resume the broadcast from the UI
* **Skipped Recipients**: Failed recipients are marked in Message History Logs

### Performance Considerations

#### Global Feed

* **Single Request**: Only one API call per broadcast, regardless of audience size
* **Cached Data**: Data is fetched once and reused for all recipients
* **Recommended**: Use for data that's the same for all recipients

#### Per-Recipient Feed

* **Request Per Recipient**: One API call for each recipient in your audience
* **Processing Impact**: Can significantly slow down broadcast processing for large audiences
* **API Rate Limits**: Ensure your API can handle the request volume
* **Recommended**: Use only when truly personalized data is required

#### Best Practices

* **Fast API Responses**: Keep your feed endpoints fast (under 2 seconds)
* **Reliable Infrastructure**: Ensure high availability for your feed endpoints
* **Fallback Content**: Design templates to gracefully handle missing feed data
* **Test Before Sending**: Use the "Test" button to verify feed responses before launching

## Scheduling Options

### Manual Sending

* **Immediate Delivery**: Send your campaign right away
* **Review Before Send**: Final review and approval before deployment
* **Real-time Monitoring**: Track delivery and engagement as it happens

### Scheduled Sending

* **Date & Time Selection**: Choose specific delivery date and time
* **Timezone Awareness**: Respects your workspace timezone settings
* **Advance Planning**: Schedule campaigns days or weeks in advance
* **Modification Window**: Edit or cancel scheduled campaigns before send time

### Scheduling Best Practices

* **Optimal Timing**: Schedule for when your audience is most active
* **Time Zone Considerations**: Consider your audience's geographic distribution
* **Avoid Peak Times**: Prevent delivery during holidays or industry-specific busy periods

## Campaign Workflow

1. **Create Campaign**: Set name, description, and goals
2. **Select Audience**: Choose a target contact list and apply optional segment filters
3. **Choose Template**: Select and customize your email template
4. **Configure A/B Testing**: Set up variations and winner selection criteria (optional)
5. **Configure Data Feeds**: Set up global or per-recipient data feeds (optional)
6. **Review Settings**: Confirm audience size, UTM parameters, and schedule
7. **Send or Schedule**: Deploy immediately or schedule for later delivery
8. **Monitor Results**: Track delivery, opens, clicks, and conversions

## Transmission Failure Handling

### Circuit Breaker Protection

Notifuse includes built-in protection against email delivery issues through a circuit breaker mechanism:

* **Failure Threshold**: After 5 consecutive transmission failures, the circuit breaker automatically pauses the broadcast
* **Automatic Pause**: The broadcast status changes to "Paused" with a clear reason indicating the circuit breaker was triggered
* **Immediate Protection**: This prevents further failed attempts and protects your sender reputation

### Failed Message Behavior

When the circuit breaker triggers:

* **Failed Messages**: The 5 recipients that caused the failures are marked as "failed" in the Message History Logs
* **No Automatic Retry**: These failed messages will NOT be retried when the broadcast resumes
* **Permanent Failure**: The affected recipients will not receive the message for this campaign

### Manual Resume Required

* **Manual Intervention**: Broadcasts paused by the circuit breaker must be manually resumed from the UI
* **Root Cause Analysis**: Before resuming, investigate and resolve the underlying delivery issues
* **Fresh Start**: When resumed, the broadcast continues from where it left off, skipping the previously failed messages

### Common Failure Scenarios

Circuit breaker activation typically occurs due to:

* **Email Provider Issues**: Temporary outages or rate limit exceeded
* **Authentication Problems**: Invalid API keys or credentials
* **Configuration Errors**: Incorrect SMTP settings or provider configuration
* **Reputation Issues**: High bounce rates or spam complaints

### Recovery Steps

1. **Check Message History Logs** to identify the specific failure reasons
2. **Resolve the underlying issue** (fix credentials, contact provider, etc.)
3. **Resume the broadcast** manually from the campaign interface
4. **Monitor closely** to ensure successful delivery continues

## Best Practices

* **List Segmentation**: Use segment filters to target specific subsets of your list
* **A/B Testing**: Always test subject lines and content for better engagement
* **UTM Consistency**: Use consistent campaign naming for better analytics tracking
* **Data Feeds**: Use global feeds for shared data; reserve per-recipient feeds for truly personalized content
* **Schedule Strategically**: Time your sends for maximum audience engagement
* **Monitor Performance**: Review metrics to improve future campaigns
* **Provider Monitoring**: Keep an eye on your email provider status and limits
* **Test Campaigns**: Send test campaigns to verify configuration before large broadcasts
