Django customer acquisition pipeline for managing leads, outreach, and onboarding
Project description
django-acquisitions
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
- Add to
INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'acquisitions',
]
- Run migrations:
python manage.py migrate acquisitions
- 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 leadsGET/PUT/DELETE /api/acquisitions/leads/{uuid}/- Lead detailPOST /api/acquisitions/leads/{uuid}/convert/- Convert to customerPOST /api/acquisitions/leads/{uuid}/enroll_campaign/- Enroll in campaignGET/POST /api/acquisitions/leads/{uuid}/contacts/- Lead contactsGET/POST /api/acquisitions/leads/{uuid}/touchpoints/- Lead touchpointsGET/POST /api/acquisitions/campaigns/- Outreach campaignsGET/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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_acquisitions-0.1.0.tar.gz.
File metadata
- Download URL: django_acquisitions-0.1.0.tar.gz
- Upload date:
- Size: 171.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f78a86eda8e20ef7ad535fa45e07985354743aa70bb70649b659c41a28912d65
|
|
| MD5 |
ecf4b79d9b11ff1728d52799b2746dfe
|
|
| BLAKE2b-256 |
0b9f18d9ba7eeb1ffd1493bbef065604d94569127c679dfbb01952d4bc750ef7
|
File details
Details for the file django_acquisitions-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_acquisitions-0.1.0-py3-none-any.whl
- Upload date:
- Size: 48.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7ca901a572ed84b15b526f8a2f897e52886425640b5bfca2de827044ca2fa1c
|
|
| MD5 |
2d296feac5f0c091968065236473ad6b
|
|
| BLAKE2b-256 |
32f0cd5592dea7259d77813be074331ae97c363f61713b18a29dad2c0a5fa3d7
|