{% extends "admin/base.html" %} {% block title %}Lead Campaigns | Admin{% endblock %} {% block content %}

Outreach

Lead Campaigns

Generate per-lead tracking links for a vehicle, see who visited, and reply with AI-generated emails.

{{ counters.leads_loaded or 0 }} leads loaded · {{ counters.drafts_ready or 0 }} drafts ready · {{ counters.drafts_missing or 0 }} drafts missing · {{ counters.texts_missing or 0 }} texts missing {% if counters.gen_errors %} · {{ counters.gen_errors }} gen errors{% endif %} {% if counters.send_errors %} · {{ counters.send_errors }} send errors{% endif %} click any counter to see the leads behind it and act on them

Master reply prompt

Used by the AI to draft replies for every campaign. Reference the lead by name and the vehicle by year/make/model.

Create campaign

Paste leads (bulk import)

Paste leads from AutoTrader etc. Separate each lead with a blank line. First line = car + $price + CAS-#### stock number or the VIN (one of them required, anywhere in the block), then the message, then name, then phone (optional), then email. Each lead is assigned by exact CAS/VIN first; if neither is present, the title is looked up in the title → stock# reference (right) to auto-assign the car. Without a match it goes to "Unassigned Leads" for manual assignment.

Title → stock# reference (auto-assign lookup)

One mapping per line: Title $price|CAS-####. Shows all current mappings — add new rows at the bottom and Update. Duplicates are ignored; the most recent mapping wins, so to correct an entry just add a new line. When a pasted lead has no CAS/VIN, its title is looked up here to auto-assign the car.

{% for c in campaigns %} {% else %} {% endfor %}
Label Vehicle Links Visited Replies sent Drafts Errors To reply Texted Created Actions
{{ c.label or '—' }} {{ c.title_en or '—' }}
{{ c.public_stock_number or c.stock_number or '' }}
{{ c.link_count }} {{ c.visited_count }}/{{ c.link_count }} {{ c.sent_count }}/{{ c.link_count }} {{ c.drafted_count }} {% if c.error_count %}{{ c.error_count }}{% else %}—{% endif %} {{ c.missing_count }} {{ c.texted_count }}/{{ c.phone_count }} {{ (c.created_at or '')[:10] }}
Open
No campaigns yet. Create one above.
{% endblock %}