Skip to main content

django-acquisitions

Tests codecov Documentation Status PyPI version

A minimal Django 4+ package for customer acquisition pipeline management. Track leads, manage contacts, automate outreach campaigns, and handle customer onboarding.

Features

  • Lead Management - Track potential customers through your acquisition pipeline
  • Contact Management - Multiple contacts per lead (decision makers, influencers, etc.)
  • Touchpoint Tracking - Record all outreach (calls, emails, SMS, meetings)
  • Outreach Campaigns - Automated multi-step sequences with email/SMS
  • Marketing Documents - Manage brochures, case studies, proposals
  • Seller Profiles - Internal profiles for automation preferences
  • Onboarding Handoff - Convert leads to customers with callbacks

Installation

pip install django-acquisitions

With optional dependencies:

# With Celery support for async tasks
pip install django-acquisitions[celery]

# With Twilio for SMS
pip install django-acquisitions[twilio]

# With Django REST Framework for API
pip install django-acquisitions[drf]

# All optional dependencies
pip install django-acquisitions[all]

Quick Start

  1. Add to INSTALLED_APPS:
INSTALLED_APPS = [
    # ...
    'acquisitions',
]
  1. Run migrations:
python manage.py migrate acquisitions
  1. Configure settings (optional):
# settings.py

# For multi-tenant (MST-style with django-organizations)
ACQUISITIONS_TENANT_MODEL = 'accounts.Account'

# For schema-per-tenant (MFT-style with django-tenants)
ACQUISITIONS_TENANT_MODEL = None  # Uses schema isolation

# Communication backends
ACQUISITIONS_EMAIL_BACKEND = 'acquisitions.backends.email.django_email.DjangoEmailBackend'
ACQUISITIONS_SMS_BACKEND = 'acquisitions.backends.sms.twilio.TwilioBackend'

# Twilio settings (if using Twilio backend)
TWILIO_ACCOUNT_SID = 'your-account-sid'
TWILIO_AUTH_TOKEN = 'your-auth-token'
TWILIO_FROM_NUMBER = '+1234567890'

# Celery settings
ACQUISITIONS_USE_CELERY = True

# Onboarding callback (called when lead converts to customer)
ACQUISITIONS_ONBOARDING_CALLBACK = 'myapp.services.create_customer_from_lead'

Models

Lead

The core model representing a potential customer:

from acquisitions.models import Lead

lead = Lead.objects.create(
    company_name='Acme Corp',
    email='contact@acme.com',
    status=Lead.Status.NEW,
    source=Lead.Source.WEBSITE,
)

LeadContact

Multiple contacts per lead:

from acquisitions.models import LeadContact

contact = LeadContact.objects.create(
    lead=lead,
    first_name='John',
    last_name='Doe',
    title='VP of Operations',
    role=LeadContact.Role.DECISION_MAKER,
    email='john@acme.com',
    is_primary=True,
)

Touchpoint

Track all interactions:

from acquisitions.models import Touchpoint
from django.utils import timezone

touchpoint = Touchpoint.objects.create(
    lead=lead,
    touchpoint_type=Touchpoint.TouchpointType.EMAIL,
    direction=Touchpoint.Direction.OUTBOUND,
    subject='Introduction to our services',
    occurred_at=timezone.now(),
    performed_by_id=request.user.id,
)

OutreachCampaign

Automated sequences:

from acquisitions.models import OutreachCampaign, CampaignStep

campaign = OutreachCampaign.objects.create(
    name='New Lead Nurture',
    status=OutreachCampaign.Status.ACTIVE,
)

CampaignStep.objects.create(
    campaign=campaign,
    step_order=1,
    step_type=CampaignStep.StepType.EMAIL,
    delay_days=0,
    subject_template='Welcome to {{ company_name }}!',
    body_template='Hi {{ contact.first_name }}, ...',
)

API Endpoints

When using with Django REST Framework:

# urls.py
from django.urls import path, include

urlpatterns = [
    path('api/acquisitions/', include('acquisitions.api.urls')),
]

Available endpoints:

  • GET/POST /api/acquisitions/leads/ - List/create leads
  • GET/PUT/DELETE /api/acquisitions/leads/{uuid}/ - Lead detail
  • POST /api/acquisitions/leads/{uuid}/convert/ - Convert to customer
  • POST /api/acquisitions/leads/{uuid}/enroll_campaign/ - Enroll in campaign
  • GET/POST /api/acquisitions/leads/{uuid}/contacts/ - Lead contacts
  • GET/POST /api/acquisitions/leads/{uuid}/touchpoints/ - Lead touchpoints
  • GET/POST /api/acquisitions/campaigns/ - Outreach campaigns
  • GET/POST /api/acquisitions/documents/ - Marketing documents

Celery Tasks

For automated outreach, add to your Celery beat schedule:

# celery.py or settings.py
CELERY_BEAT_SCHEDULE = {
    'process_acquisitions_outreach': {
        'task': 'acquisitions.tasks.outreach_tasks.process_scheduled_outreach',
        'schedule': crontab(minute='*/5'),  # Every 5 minutes
    },
}

Custom Models

Use abstract models to add custom fields:

# myapp/models.py
from acquisitions.abstract_models import AbstractLead
from myapp.models import Account

class Lead(AbstractLead):
    account = models.ForeignKey(Account, on_delete=models.CASCADE)
    custom_field = models.CharField(max_length=100)

    class Meta(AbstractLead.Meta):
        abstract = False

Then configure:

ACQUISITIONS_LEAD_MODEL = 'myapp.Lead'

License

BSD-3-Clause

Metadata

Release files for django-acquisitions 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-acquisitions 0.1.0
File Size Uploaded Provenance Actions
django_acquisitions-0.1.0.tar.gz 171.8 kB Without provenance Details for django_acquisitions-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-acquisitions 0.1.0
File Interpreter ABI Platform Actions
django_acquisitions-0.1.0-py3-none-any.whl Python 3 none any Details for django_acquisitions-0.1.0-py3-none-any.whl

Total release size: 219.8 kB

Release files / django_acquisitions-0.1.0.tar.gz

Download URL django_acquisitions-0.1.0.tar.gz
Size 171.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f78a86eda8e20ef7ad535fa45e07985354743aa70bb70649b659c41a28912d65
BLAKE2b-256 checksum
How to use checksums
0b9f18d9ba7eeb1ffd1493bbef065604d94569127c679dfbb01952d4bc750ef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / django_acquisitions-0.1.0-py3-none-any.whl

Download URL django_acquisitions-0.1.0-py3-none-any.whl
Size 48.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7ca901a572ed84b15b526f8a2f897e52886425640b5bfca2de827044ca2fa1c
BLAKE2b-256 checksum
How to use checksums
32f0cd5592dea7259d77813be074331ae97c363f61713b18a29dad2c0a5fa3d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for django-acquisitions 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page