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

# Marketing Suite Overview

> BrokerOS includes a full omnichannel marketing engine: AI Voice, WhatsApp, SMS, Email, Carrier Telephony, and Ad Lead Sync.

The Marketing Suite enables brokerage firms to engage thousands of prospective buyers simultaneously across every communication channel they use: phone calls, WhatsApp, SMS, and email: all coordinated from a centralized command center.

***

## Omnichannel Channel Suite

BrokerOS connects native communications infrastructure directly to CRM lead and inventory databases:

> **[AI Voice & Telephony](https://brokeros.mintlify.site/marketing/voice/overview.md)**
>
> Dial thousands of leads with human-like AI voice agents on real phone lines via carrier bridges, qualifying prospect budgets and scheduling visits in real time.

> **[WhatsApp Business](https://brokeros.mintlify.site/marketing/whatsapp/overview.md)**
>
> Broadcast announcements, manage a multi-agent team inbox, build interactive chatbot flows, and run automated nurture drips via Meta Cloud API.

> **[SMS Campaigns](https://brokeros.mintlify.site/marketing/sms/overview.md)**
>
> Run high-throughput SMS broadcasts with live mobile preview mockups, branded short-link tracking, and two-way inbound conversation handling.

> **[Email Marketing](https://brokeros.mintlify.site/marketing/email/overview.md)**
>
> Design responsive HTML property launch newsletters, manage domain DNS authentication, and track engagement opens and link clicks in real time.

> **[Ad Lead Ingestion](https://brokeros.mintlify.site/marketing/ads/overview.md)**
>
> Automatically ingest leads from Meta, Facebook, Instagram, Google Search, and YouTube campaigns with sub-second CRM syncing and attribution tagging.

***

## Campaign Execution Architecture

Every campaign in BrokerOS follows an asynchronous lifecycle powered by BullMQ background workers:

```mermaid theme={null}
sequenceDiagram
    autonumber
    actor Marketer as Marketing Manager
    participant UI as Campaign Wizard
    participant API as Marketing API
    participant Queue as BullMQ Redis Queue
    participant Worker as Background Worker
    participant Provider as Carrier / Messaging Gateway
    actor Lead as Prospective Buyer

    Marketer->>UI: Select Audience (Project Leads or CSV)
    Marketer->>UI: Configure Message Content / Voice Agent
    Marketer->>UI: Click "Launch Campaign"
    UI->>API: POST /api/marketing/{channel}/campaigns
    API->>Queue: Enqueue Jobs (Rate-Limited Batches)
    API-->>UI: Return Immediate 202 Accepted Response
    UI-->>Marketer: Display Live Campaign Progress Dashboard
    Worker->>Queue: Dequeue Next Job Batch
    Worker->>Provider: Dispatch Call, WhatsApp, SMS, or Email
    Provider->>Lead: Deliver Outbound Message / Dial Call
    Provider-->>Worker: Webhook Status (Delivered / Answered)
    Worker->>API: Record Timeline Activity & Update Analytics
```

***

## Commercial Boundary and Project Scoping

Every marketing campaign is strictly scoped to an active property development:

* **Audience Protection**: The audience picker automatically limits selections to leads mapped to the selected project. This guarantees that internal brokerage campaigns (`isCpProject = false`) never inadvertently message Channel Partner investor databases (`isCpProject = true`).
* **Dynamic Variable Personalization**: Templates and AI voice prompts dynamically inject property-specific parameters, such as project name, starting price, RERA registration, and sales lounge address.

***

## Asynchronous Worker Processing

BrokerOS decouples campaign launching from API request lifecycles using dedicated BullMQ workers:

* **Non-Blocking Architecture**: Launching a campaign targeting 50,000 contacts enqueues jobs in milliseconds. You can safely close your browser or navigate to other CRM modules while background processors handle delivery.
* **Dedicated Queue Processors**:
  * `marketing-voice.processor.ts`: Normalizes lead variables and dispatches calls via carrier bridges.
  * `marketing-whatsapp.processor.ts`: Orchestrates template message dispatches and rate-limiting.
  * `marketing-sms.processor.ts`: Encodes GSM/Unicode messages and wraps trackable short links.
  * `marketing-email.processor.ts`: Renders responsive HTML templates and signs headers.
* **Rate-Limiting and Carrier Throttling**: Background processors respect carrier dialer concurrency limits and messaging gateway TPS (transactions per second) boundaries to protect phone number reputation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.