# Lead Source Cleanup — Step-by-Step

**Goal:** Clean up the 62 lead sources in HCP so reports stop double-counting and the marketing team can read attribution clearly.

Prepared by Michael Scott Lopez · June 8, 2026

---

## What needs to happen

### A. Trim trailing whitespace on 7 sources

These sources have a trailing space that makes them silently duplicate their "clean" version in every report. Open each one in HCP and remove the trailing space:

| Bad (current) | Good (rename to) |
|---|---|
| `Previous Customer ` | `Previous Customer` |
| `Trane Dealer Locater ` | `Trane Dealer Locator` *(also fix the typo)* |
| `Building Advertisement ` | `Building Advertisement` |
| `Seguin Rodeo ` | `Seguin Rodeo` |
| `Streaming ` | `Streaming` |
| `Radio Advertisement ` | `Radio Advertisement` |
| `Spectrum Advertisement ` | `Spectrum Advertisement` |

### B. Delete or rename 4 informal sources

These look like person names rather than channels:

| Current | Recommended action |
|---|---|
| `greg` | Delete (or rename to `Referral - greg` and tag with employee name) |
| `josh lead` | Delete (or rename to `Referral - josh`) |
| `JP's Mom` | Delete (rename customer record to track who referred her) |
| `Justin Martinez` | Delete (move to a customer-level note: "referred by Justin Martinez") |

### C. Consolidate Call Room agents (decide one of two paths)

**Current:** 9 separate sources, one per call room agent (3,964 jobs / $2.08M lumped under "Call Room" but split across agents):

```
Call Room (Alexis)     Call Room (Brandi)     Call Room (Crystal)
Call Room (Shayla)     Call Room (Alisha)     Call Room (Marcela)
Call Room (Michell)    Call Room (Emily)      Call Room (Anthony)
```

**Path 1 (recommended) — Merge under one source, tag the agent:**
- Create new lead source: `Call Room`
- Move all 9 agent variants to point to this source
- Create 9 employee Tags: `agent-alexis`, `agent-brandi`, etc.
- Apply the corresponding agent tag to each new job created by that agent
- Reports now show: marketing channel = Call Room, agent leaderboard = via the tag

**Path 2 — Keep agent-level lead sources but add a parent grouping:**
- HCP doesn't natively support nested lead sources
- Workaround: prefix all 9 with `CallRoom-` to make them sortable/groupable in CSV exports
- Add a "channel" custom field on each job (HCP supports custom fields on the MAX plan)

### D. Clean up numbered campaign variants

| Current | Recommended |
|---|---|
| `TUNEUP4` | Delete or rename to `Tune Up Email Campaign Spring 2024` |
| `TUNEUP6` | Delete or rename to `Tune Up Email Campaign Fall 2024` |

If these were short-lived campaigns, just delete them — no future jobs will use them.

---

## How to do it in HCP (UI steps)

1. Log into Housecall Pro as admin
2. Settings → Lead Sources
3. For each row above:
   - Click the source name
   - Edit it (rename or merge with existing)
   - Save
4. For deletes: click the trash icon. HCP will ask if you want to reassign existing jobs to a different source. **Always pick a target source** (don't leave them as "Unspecified") — typically reassign to the "clean" version of the same source.

---

## API-based bulk cleanup (alternative, faster)

If you want to do this via the API instead of the UI (only the MAX plan or higher supports lead-source writes via API — check first):

```bash
# 1. Pull current lead sources to confirm IDs
curl -s -H "Authorization: Bearer $KEY" \
  "https://api.housecallpro.com/lead_sources?page_size=200" > current_sources.json

# 2. For each rename, PATCH the lead source name
curl -s -X PATCH \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Previous Customer"}' \
  "https://api.housecallpro.com/lead_sources/lsrc_XXXX"
```

⚠️ **Test the PATCH on one source first** with a low-traffic source before running it across all 7. The current API key (`datacue`) is read-only — you'll need a writeable key for this, scoped narrowly to `lead_sources`.

---

## Post-cleanup verification

After cleanup, re-pull the audit and check:

1. Lead Sources directory should have ~50 entries (down from 62)
2. The "Previous Customer" and "Previous Customer " duplicate should merge into one row in all reports
3. The 9 Call Room variants should consolidate to 1 source = `Call Room` (or remain 9 with `CallRoom-` prefix if Path 2)
4. The 4 informal sources should be gone or properly relabeled

Total elapsed time for the cleanup: **about 1 hour** at the keyboard.

---

*Prepared by Michael Scott Lopez for Cowboy's Air Conditioning & Heating*
