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

# Campaigns beta

# Campaigns Beta

The Campaigns Beta module provides an enhanced campaign management experience with advanced features for Telegram automation.

## Overview

Campaigns Beta is the next-generation campaign management interface, offering improved performance, advanced filtering, tag management, and a modern UI experience. It serves as the primary interface for creating and managing Telegram outreach campaigns.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/raysium/campaigns/placeholder-campaigns-beta.png" alt="Campaigns Beta Interface" />

## Key Features

### Advanced Filtering

The Beta interface provides powerful filtering capabilities:

* **Filter by Status**: All, Active, Paused, Draft, Completed, Scheduled
* **Filter by Sender**: Filter campaigns by Telegram account
* **Filter by Tags**: Filter by campaign tags for organization
* **Search**: Real-time search by campaign name

### View Modes

Toggle between different view modes:

* **Table View**: Detailed table with all campaign information
* **Grid View**: Card-based visualization with campaign summaries

### Tag Management

Organize campaigns with tags:

* Add multiple tags to campaigns
* Filter campaigns by tags
* Color-coded tag badges for easy identification

### Archive Functionality

Archive campaigns that are no longer active while preserving historical data:

* Archive any campaign (except already archived)
* View archived campaigns separately
* Restore archived campaigns when needed

## Campaign Editor

The Beta Campaign Editor provides a comprehensive interface with multiple tabs:

### Settings Tab

Configure campaign core settings:

* **Name & Description**: Campaign identification
* **Sender Account**: Telegram account to send messages from
* **Schedule**: Business hours configuration
* **Timezone**: Campaign-specific timezone
* **Rate Limits**: Override account rate limits
* **Behaviors**: Response handling, deal creation, and more

### Leads Tab

Manage campaign leads:

* View all leads assigned to the campaign
* Add new leads to the campaign
* Remove leads from the campaign
* Segment management integration

### Flow Tab

Visual flow builder for campaign automation - see detailed section below.

### Activity Tab

Monitor campaign execution in real-time:

* Live execution logs
* Message delivery status
* Response tracking
* Error reporting

### Analytics Tab

Detailed campaign performance metrics:

* KPIs (Contacts, Replies, Conversion Rate)
* Funnel visualization
* Response rate charts
* Time-based performance trends

## Flow Builder

The Flow Builder is the core of campaign automation. It uses a visual node-based interface to define message sequences.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/raysium/campaigns/placeholder-flow-builder.png" alt="Flow Builder Interface" />

### Node Types

#### Start Node

The entry point of the campaign flow. Defines when the campaign begins:

* **Immediate**: Start as soon as leads are added
* **Scheduled**: Start at a specific date/time

#### Send Message Node

Sends Telegram messages to leads with full customization:

* Text content with spintax support
* Tag placeholders (`{first_name}`, `{custom_field}`)
* Media attachments support
* A/B testing variations (A, B, C)

#### Wait Node

Adds delays between messages:

* **Duration-based**: Wait for specific time (hours/minutes)
* **Response-based**: Wait for lead response

#### Condition Node

Branch the flow based on criteria:

* Tag-based conditions
* Custom field conditions
* Response conditions

#### End Node

Marks the completion of a flow path:

* Successful completion
* No response handling

***

## Spintax: Message Variation

**Spintax** (spin syntax) is essential for campaign success. It allows you to create multiple message variations that the system randomly selects for each lead.

<Warning>
  **CRITICAL**: Accounts that send the same message repeatedly (without variation) are at HIGH RISK of being blocked by Telegram after approximately 8 messages. Always use spintax for message variation.
</Warning>

### Basic Spintax Syntax

Use curly braces with pipe separators to create variations:

```
{Hello|Hi|Hey} {there|friend|!} 
```

This creates 3 x 3 = 9 unique combinations:

* Hello there!
* Hello friend!
* Hello!
* Hi there!
* Hi friend!
* Hi!
* Hey there!
* Hey friend!
* Hey!

### Nested Spintax

Nest spintax for more complex variations:

```
{{Great|Amazing|Wonderful} news|Update}: {Your trial expires tomorrow|Don't lose your progress}!
```

### Common Spintax Patterns

#### Casual Greetings

```
{Hi|Hello|Hey|Good morning|Good afternoon} {there|{first_name}|friend}!
```

#### Call to Action Variations

```
{Learn more|Check it out|Read more|Get started} at {our website|this link|the page below}:
{yourlink.com|oursite.io|example.com}
```

#### Follow-up Variations

```
Just {checking in|following up|wanted to circle back} on my {previous|last} message...
```

### Placeholders

Combine spintax with dynamic placeholders:

```
{Hi|Hello|Hey} {first_name}! {Great|Excited} to {connect|chat|talk} with you about {your|the} {problem|challenge|need}.
```

Available placeholders:

| Placeholder           | Description              |
| --------------------- | ------------------------ |
| `{first_name}`        | Lead's first name        |
| `{last_name}`         | Lead's last name         |
| `{username}`          | Lead's Telegram username |
| `{phone_number}`      | Lead's phone number      |
| `{company_name}`      | Company name (if linked) |
| `{custom_field_name}` | Any custom field value   |

### Best Practices for Spintax

1. **Always Use Variation**: Never send identical messages
2. **Natural Language**: Variations should sound natural
3. **Meaningful Changes**: Vary content, not just words
4. **Test First**: Preview your spintax before launching
5. **Avoid Spam Patterns**: Don't overuse punctuation or caps

***

## AI Description Generator

The Flow Builder includes an AI-powered description generator to help you create effective campaign messages.

### How It Works

1. Click the **AI Assist** button in any message node
2. Describe your goal in plain English
3. AI generates multiple message variations using spintax
4. Select or modify the generated messages

### Example

**Input**: "Create a follow-up message for someone who attended our webinar"

**AI Output**:

```
{{Great|Wonderful|Excellent} to connect} {with you|following up} after the {webinar|presentation}!

{{I wanted to share|Check out} {the recording|these resources} {we mentioned|discussed}:
{link1.com|link2.com|link3.com}

{Let me know|Feel free to reach out} if you have {any questions|questions}!
```

### Tips for AI Generation

* Be specific about your goal
* Include context about the lead
* Specify tone (professional, casual, friendly)
* Mention any key points to include

***

## Risk Analyzer

The Risk Analyzer evaluates your campaign configuration and identifies potential issues that could lead to account blocks or low performance.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/raysium/campaigns/placeholder-risk-analyzer.png" alt="Risk Analyzer" />

### What It Checks

#### Message Variation Risk

| Risk Level | Description                                   |
| ---------- | --------------------------------------------- |
| High       | Same message sent to all leads (0% variation) |
| Medium     | Limited variation (\< 3 combinations)         |
| Low        | Good variation (5+ combinations)              |

#### Rate Limiting Risk

Evaluates if your rate limits are appropriate for the account age and health.

#### Content Risk

Flags potentially risky content:

* Excessive punctuation (!!!!)
* ALL CAPS
* Suspicious links
* Known spam triggers

#### Volume Risk

Checks if daily message volume is too high for the account's warmup status.

### Risk Score

Each campaign gets an overall risk score:

| Score  | Status      | Action Required          |
| ------ | ----------- | ------------------------ |
| 0-30   | ✅ Safe      | Launch confidently       |
| 31-60  | ⚠️ Moderate | Review warnings          |
| 61-100 | 🔴 High     | Fix issues before launch |

***

## Spam Fixer

The Spam Fixer automatically improves your message content to reduce spam triggers and improve deliverability.

### Features

#### Pattern Detection

Automatically detects and fixes:

* Excessive punctuation
* ALL CAPS text
* Suspicious URL patterns
* Common spam phrases
* Emoji overuse

#### Improvement Suggestions

Before launching, Spam Fixer suggests:

* Alternative phrasing
* Better spintax structure
* Natural language patterns
* Optimal message length

### Example Fixes

**Before (High Risk)**:

```
!!! ATTENTION !!! CLICK HERE NOW!!! {link.com|LINK.COM} - LIMITED TIME OFFER!!! DON'T MISS OUT!!!
```

**After (Low Risk)**:

```
{Just wanted to share|Here's} {a helpful resource|some information} {for you|you might find useful}:
{link1.com|link2.com|example.io}

{Let me know|Feel free to ask} if you have {any questions|questions}!
```

***

## Segment Integration

Campaigns can target leads through segments, with two modes of operation:

### Snapshot Mode

When you add a segment to a campaign, a **snapshot** is taken at that moment.

* Leads are copied to the campaign at launch time
* New leads added to the segment later are NOT included
* Original leads removed from segment are still in campaign
* Best for: Running a campaign once with a specific set of leads

### Sync Mode (Recommended)

The campaign stays synchronized with the segment.

* New leads added to the segment are automatically added
* Leads removed from the segment are removed from campaign
* Real-time updates
* Best for: Ongoing campaigns with dynamic lead lists

<img src="https://mintlify.s3.us-west-1.amazonaws.com/raysium/campaigns/placeholder-segment-sync.png" alt="Segment Sync Options" />

### How to Configure

1. In the **Leads Tab** of campaign editor
2. Click **Add Segment**
3. Select your segment
4. Choose mode:
   * **Snapshot**: Take a snapshot now
   * **Sync**: Keep synchronized

<Warning>
  Sync mode means removing leads from the segment will also remove them from active campaigns. Use carefully.
</Warning>

***

## Bulk Operations

Perform actions on multiple campaigns at once:

* **Bulk Enable**: Activate multiple campaigns
* **Bulk Disable**: Deactivate campaigns
* **Bulk Start**: Launch multiple campaigns
* **Bulk Stop**: Stop active campaigns
* **Bulk Delete**: Remove campaigns (soft delete)
* **Bulk Archive**: Archive campaigns

## Campaign Statuses

| Status    | Description                        |
| --------- | ---------------------------------- |
| Draft     | Created but not launched           |
| Active    | Running and processing leads       |
| Paused    | Temporarily stopped                |
| Completed | All leads processed                |
| Cancelled | Manually stopped before completion |
| Scheduled | Set to start at future date        |

## Circuit Breaker Integration

Campaigns Beta integrates with the circuit breaker system to protect your Telegram accounts:

* **Automatic Pause**: Campaigns pause when account issues are detected
* **Account Health Display**: Visual indicators for account status
* **Recovery Handling**: Guided recovery when accounts are blocked

<img src="https://mintlify.s3.us-west-1.amazonaws.com/raysium/campaigns/placeholder-circuit-breaker.png" alt="Circuit Breaker Banner" />

## API Endpoints

```http theme={null}
GET    /campaign-flows/list          - List campaigns
POST   /campaign-flows/create       - Create campaign
GET    /campaign-flows/{id}          - Get campaign details
PUT    /campaign-flows/{id}          - Update campaign
DELETE /campaign-flows/{id}          - Delete campaign
POST   /campaign-flows/{id}/start    - Launch campaign
POST   /campaign-flows/{id}/pause    - Pause campaign
POST   /campaign-flows/{id}/stop     - Stop campaign
POST   /campaign-flows/bulk/*        - Bulk operations
```

## Best Practices

1. **Always Use Spintax**: Never send identical messages - risk of ban after \~8 messages
2. **Start with Draft**: Create campaigns in Draft mode first
3. **Use Risk Analyzer**: Run Risk Analyzer before launching
4. **Apply Spam Fixer**: Let it optimize your messages
5. **Test with Small Groups**: Test with a small lead subset before full rollout
6. **Monitor Activity**: Watch the Activity tab during initial runs
7. **Use Tags**: Organize campaigns with consistent tagging
8. **Configure Rate Limits**: Match rate limits to account age and health
9. **Use Sync Mode**: Prefer segment sync for dynamic lead lists
10. **Review AI Suggestions**: Use AI Description Generator for message ideas
