Skip to content

LO-060 [Advanced]: Automated Sandbox Mode for Lead Testing #397

Description

@Kuldeeep18

Description

When designing campaigns, sales representatives want to test the email sequences before sending them to actual clients. Currently, launching a campaign sends actual emails to the lead addresses. We need a "Sandbox Mode" switch in Campaign settings to redirect all emails to a test inbox.

User & Contributor Value

  • Contributors: Condition-based workflow dispatching, reading and applying campaign-level settings, and email redirection logic.
  • Users: Allows safely testing complex multi-step email flows with dummy leads without spamming real customers.

Code Locations

  • backend/campaigns/models.py
  • backend/campaigns/tasks.py

Implementation Guide

  1. Extend Settings Schema: Add a sandbox_mode checkbox parameter inside the campaign settings JSON field.
  2. Task Interception: In send_email_step task, check if campaign.settings.get('sandbox_mode') is True.
  3. Redirect Delivery: If enabled, override the recipient email (clead.lead.email) and send the email to the logged-in user's address instead, appending [TEST SANDBOX] to the subject line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    gssoc:approvedGSSoC 2026 approved base points (+50 pts)level:advancedDifficulty: Advanced (+55 pts)type:featureType: Feature (+10 pts)type:testingType: Testing (+10 pts)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions