# Lead Source Report: assistant instructions

> ListedKit report template, version 1.0.0, last tested 2026-11-17. Web page: https://www.listedkit.com/resources/report-templates/lead-source-report
>
> Give this file to your AI assistant along with access to your data. It tells the assistant how to build the report. It does not change any records.

**Question:** Which CRM sources produced closed transactions, and what related revenue and attributable costs can we identify?

**For:** Broker owners, Team leaders, Operations leaders who manage lead spend

## Objective

This template has your assistant start from the transactions that closed in a period, trace each one back to its lead source in your CRM, and add the commission income and source costs recorded in your accounting. The result shows closings, booked commission income, and identified costs for each source, with every unmatched record kept visible.

The decision this supports: Which lead sources are worth a closer look before you renew, increase, or cut spending on them.

## Questions to answer

1. How many transactions that closed in the period came from each CRM lead source?
2. How much commission income did the accounting records book for those closings, by source?
3. Which costs in the accounting records can be tied to each source, either per transaction (such as referral fees) or for the period (such as ad spend)?
4. How long did those deals take from first CRM record to closing, by source?
5. Which closings, contacts, and accounting entries could not be matched, and why?

## Ground rules

1. Read only. Do not create, edit, or delete any record in ListedKit, the CRM, accounting software, or any other system, and do not email, text, or message anyone.
2. Use only data you can actually see. If something you need is unavailable, say exactly what is missing and continue with what you have. Never fill a gap with an estimate or a made-up value.
3. Before you build the report, confirm the inputs with the user: reporting period, team scope, which systems are connected or attached, and anything you cannot reach. Inputs the user already gave in their message count as confirmed. If something is still unclear and the user is not available, apply this template's default rule and list the open question at the end of the report.
4. State the period, the records included, and the records excluded, with counts, at the top of the report.
5. Round money to the cent in working, whole dollars in the report, shares to whole percentages, and medians to whole days, rounding halves up. Show every metric with its definition, and keep missing, duplicate, and unmatched records visible in their own section rather than dropping them quietly.
6. Keep three things apart: observations (what the data shows), interpretations (what it might mean), and proposed actions (what the owner could look into). The owner makes the decision.
7. Cite the source of each number: the system or file, and the record IDs or rows where practical.
8. Do not describe sale price, transaction value, or gross commission as profit. Revenue figures come from the accounting records and are labeled by what they are.

## Inputs to confirm with the user before you start

- Reporting period: start and end dates (and the comparison period, if the report has one).
- Team scope: the whole business, a team, or named agents.
- Systems: ListedKit transactions (required), CRM (required), Accounting (required). For each, ask whether it is connected to you or supplied as a file, and confirm you can read it.
- Anything the user already knows is missing or unreliable in the data.

## Data and required fields

### ListedKit transactions (required)

Connect ListedKit to your assistant with the ListedKit MCP, then sign in and choose your workspace. The assistant can then read the transactions your account can open. Without the connection, supply a transaction spreadsheet with the columns below.

Sample file: `transactions.csv`

| Column | Meaning | Required |
| --- | --- | --- |
| `transaction_id` | Unique ID for the transaction. Used to remove duplicates. | Yes |
| `agent` | Agent on the file. | Yes |
| `status` | active, pending, closed, or cancelled. | Yes |
| `actual_close_date` | Date the transaction closed (YYYY-MM-DD). | Yes |
| `client_email` | Client email. First choice for matching to the CRM. | Yes |
| `client_name` | Client name. Backup match with the agent. | Yes |
| `property_address` | Used to match accounting entries when there is no transaction reference. | Yes |

### CRM (required)

Connect your CRM to your assistant separately, if your assistant offers a connection for it, or export contacts to a CSV. The ListedKit MCP does not include CRM access.

Sample file: `crm-contacts.csv`

| Column | Meaning | Required |
| --- | --- | --- |
| `contact_id` | Unique contact ID. | Yes |
| `name` | Contact name. | Yes |
| `email` | Contact email. | Yes |
| `source` | Lead source as recorded in the CRM. | Yes |
| `assigned_agent` | Agent assigned to the contact. Must use the same agent names as the transactions. | Yes |
| `created_date` | Date the contact was created. | Yes |

### Accounting (required)

Connect your accounting software to your assistant separately, if your assistant offers a connection for it, or export a general ledger or transaction detail report to CSV. The ListedKit MCP does not include accounting access.

Sample file: `accounting.csv`

| Column | Meaning | Required |
| --- | --- | --- |
| `entry_id` | Unique entry ID. | Yes |
| `date` | Entry date. | Yes |
| `type` | income or expense. | Yes |
| `account` | Account name, such as Commission income or Referral fees paid. | Yes |
| `amount` | Amount in dollars. | Yes |
| `memo` | Description. Often includes the property address. | Yes |
| `transaction_ref` | Transaction ID, if your bookkeeper records it. | No |
| `class` | Lead source tag on marketing and referral costs (a class, tag, or category in your accounting software). | No |

## Matching rules

- Transaction to CRM: match on client email, ignoring case. If no email match, match on client name (ignoring case and punctuation) when the CRM contact's assigned agent is the same as the transaction agent, and label it a name match for the user to confirm. Otherwise leave the transaction unmatched.
- If more than one CRM contact matches, use the earliest-created one and report the other sources.
- Accounting to transaction: match on transaction_ref when present. Otherwise match on the property address in the memo after lowercasing, removing punctuation, and shortening street suffixes (Street to St, Avenue to Ave, Lane to Ln, Drive to Dr, Court to Ct, Road to Rd). Do not match on amount alone.
- Agent commission payouts are not lead source costs. Report their total separately so it is clear they were left out.
- Never move a record between sources to make totals look complete. Unmatched records stay in their own rows.

## Metric definitions

- **Closing:** A transaction with status closed and an actual close date in the period, counted once.
- **Lead source:** The source on the matched CRM contact. Email matches and name matches both count toward the source totals; name matches are labeled for the user to confirm. When a client has more than one CRM record, use the source on the earliest-created record (first touch) and report the conflict.
- **Booked commission income:** Commission income entries in the accounting records matched to the closing, at any date up to the export. This is gross commission income to the business before agent splits. It is not profit.
- **Transaction costs:** Expense entries tagged with a lead source and matched to a specific closing in the period, such as a referral fee paid on that deal, whatever the entry date. Tagged entries matched to a transaction that closed outside the period are left out and listed.
- **Period costs:** Expense entries tagged with a lead source, dated in the period, and not tied to a single transaction, such as monthly ad spend.
- **Identified costs:** Transaction costs plus period costs. Only costs the books tie to a source; agent time, untagged spend, and costs outside the period are not included.
- **Identified cost per closing:** Identified costs divided by closings for that source. Not shown when no costs are identified.
- **Days from first CRM record to close:** Median days between the matched contact's created date and the actual close date, rounded to a whole day.
- **Agent payouts excluded:** Agent commission payout entries matched to the closings counted. Reported as a total so it is clear they are not in source costs.

## Steps

1. Confirm the period, team scope, and the three data sources. If CRM or accounting data is not available, say which questions you can still answer (for example, closings by source without revenue) and which you cannot.
2. For connected systems, retrieve only the records needed: transactions closed in the period, CRM contacts, and accounting entries from the start of the period through today. Tell the user if any system limits how much history you can read.
3. Check required columns or fields in each source and name any that are missing.
4. Remove duplicate transactions and keep closings in the period.
5. Match each closing to the CRM using the matching rules. Record the method for each match (email, name and agent, or none).
6. Match commission income entries to closings. List closings with no income entry and income entries in the period with no closing.
7. Find expense entries with a lead source tag. Assign those matched to a closing as transaction costs, and those dated in the period without a transaction match as period costs.
8. Calculate closings, booked commission income, identified costs, identified cost per closing, and median days from first CRM record to close for each source. Keep an unmatched row for closings with no CRM source.
9. Write the report in the structure below.

## Missing, duplicate, incomplete, and unmatched records

| Situation | What to do |
| --- | --- |
| Closing with no CRM match | Put it in a "Source not found in CRM" row with its income. Do not assign a source. |
| Name-only match | Use it, label it, and list it for the user to confirm. |
| Client with two CRM records and different sources | Use the earliest-created record and list the conflict. |
| Closing with no commission income booked | Count the closing, show income as not found, and list it. Do not substitute the gross commission from the transaction record. |
| Income entry with no matching transaction | List it under unmatched income. Do not assign it to a source. |
| Costs with no lead source tag | Leave them out of source costs and say so. Ask whether any should be tagged. |
| Spend and closings from different periods | Say so plainly. Leads that close this quarter often came from earlier spending, so period costs and period closings are not a matched pair. |
| Agent names differ between systems | Ask the user for a mapping before you use name matching. |

## Report structure

1. Scope: period, team scope, systems and files used, closings counted, and how many were matched by email, by name and agent, or not at all.
2. Results by source: closings, booked commission income, transaction costs, period costs, identified costs, identified cost per closing, median days from first CRM record to close.
3. Unmatched and uncertain records: closings with no CRM match, name-only matches, source conflicts, closings with no income booked, income with no closing, and the agent payout total excluded from costs.
4. Observations, interpretations, and proposed actions, as three separate lists.
5. Sources: the system, file, and fields behind each column.
6. Follow-up questions for the owner.

Label observations, interpretations, and proposed actions as separate lists. Each observation should cite its source.

## Follow-up questions to offer

- Should we look at the leads each source created in an earlier period, to line up spend with the closings it produced?
- Are there lead costs paid outside the accounting system, such as a portal invoice paid by an agent?
- Which untagged marketing costs should carry a lead source tag going forward?
- Do you want this split by agent, to see whether a source works better for some agents than others?

## Known limitations

- The report can only be as accurate as the lead source recorded in the CRM and the tags in the accounting records.
- Identified costs are not the full cost of a source. Commission income is not profit.
- ListedKit provides the transaction data only. CRM and accounting data need their own connection in your assistant, or an export you supply, and the assistant does the matching using the rules in this template.
- Matching on email and name will miss some clients and can occasionally match the wrong one. Review the uncertain matches.

## Example output

This example was produced from the sample files with the rules above. Use it to check the shape of your report, not as a benchmark.

### Lead source results, closed transactions

> Illustrative output built from synthetic sample data. All names are fictional.

- **Period:** Jul 1 to Sep 30, 2026
- **Team scope:** Whole business (5 agents)
- **Sources:** Transactions, CRM contacts, and accounting (sample files)
- **Closings:** 48 (43 matched by email, 3 by name and agent, 2 not found)

**Results by lead source**

| Lead source | Closings | Booked commission income | Identified costs | Identified cost per closing | Median days, first record to close |
| --- | ---: | ---: | ---: | ---: | ---: |
| Sphere / past client | 16 | $205,975 | $640 | $40 | 118 |
| Portal referral program | 10 | $106,025 (2 not booked) | $31,808 | $3,181 | 109 |
| Website | 7 | $104,175 | $897 | $128 | 125 |
| Agent referral | 6 | $86,475 | $21,619 | $3,603 | 129 |
| Paid social ads | 4 | $73,125 | $4,500 | $1,125 | 123 |
| Open house | 3 | $44,750 | $1,050 | $350 | 94 |
| Source not found in CRM | 2 | $44,525 | None identified | n/a | n/a |

_Booked commission income is gross commission income to the business before agent splits, not profit. Identified costs are only costs tagged to a source in the books. Agent payouts of $465,535 on these closings are excluded._

**Where the identified costs come from**

| Lead source | Transaction costs (per deal) | Period costs (dated in the period) |
| --- | ---: | ---: |
| Sphere / past client | $0 | $640 |
| Portal referral program | $31,808 | $0 |
| Website | $0 | $897 |
| Agent referral | $21,619 | $0 |
| Paid social ads | $0 | $4,500 |
| Open house | $0 | $1,050 |

**Observations**

- Sphere / past client produced the most closings (16 of 48), with $640 in identified costs.
- Portal referral program produced 10 closings with $31,808 in referral fees, the largest identified cost of any source. 2 of its closings have no commission income booked yet.
- Paid social ads produced 4 closings in the period against $4,500 of ad spend dated in the period. Its closings took a median of 123 days from first CRM record.
- 2 closings have no CRM record, 3 were matched by name only, and 1 client has two CRM records with different sources.

**Interpretations**

- Sphere / past client looks like the most productive source, but its costs are almost entirely untracked, so the low cost per closing reflects missing cost data as much as efficiency.
- Because paid social ads deals take about four months to close, the spend in this period mostly funds future closings. This quarter's numbers alone cannot show whether the spend pays off.

**Proposed actions**

- Pull a cohort view for paid social ads: leads created in an earlier quarter and what they produced, before changing the budget.
- Ask the bookkeeper about the 2 closings with no income booked (TX-1015, TX-1036).
- Add a lead source tag to past client and referral costs so the next report shows what those sources cost.

**Data gaps**

- Closings with no CRM match: TX-1030, TX-1007.
- Name-only matches to confirm: TX-1041 to C-5040, TX-1024 to C-5024, TX-1012 to C-5011.
- Source conflicts: TX-1018 counted as Website, also recorded as Paid social ads.
- Closings with no commission income booked: TX-1015, TX-1036.
- Income in the period with no matching transaction: GL-0070 ($2,150, "Referral received - 4410 Bluestem Ct, Fairview").

**Sources**

- transactions.csv: transaction_id, status, actual_close_date, client_email, client_name, agent, property_address.
- crm-contacts.csv: email, name, assigned_agent, source, created_date, contact_id.
- accounting.csv: type, account, amount, date, memo, transaction_ref, class, entry_id.

## Try it with sample data

If you do not have every connection yet, try the workflow with the synthetic files: [transactions.csv](https://www.listedkit.com/report-templates/sample-data/transactions.csv), [crm-contacts.csv](https://www.listedkit.com/report-templates/sample-data/crm-contacts.csv), [accounting.csv](https://www.listedkit.com/report-templates/sample-data/accounting.csv). Attach them and use the starter prompt below.

## Starter prompt

```text
Use the attached ListedKit report template, "Lead Source Report," to build the report it describes.

Reporting period: [start date] to [end date]
Team scope: [whole business / team name / agent names]
Transaction data: [ListedKit is connected / I attached a transactions file]
CRM data: [connected / I attached a contacts export / not available]
Accounting data: [connected / I attached an accounting export / not available]

Follow the template step by step. Keep everything read-only, show me the matching summary before the results, and ask me before you assume anything that is not in the data.
```

## Version and testing

- Version: 1.0.0
- Last tested: 2026-11-17
- Tested with: Claude (Sonnet 5.5, run as an agent in Claude Code), using a separate synthetic test dataset attached as three CSVs (not the published sample files), with the example output removed from the template. Closings, booked commission income, identified costs, and median days matched the reference calculation for every source. It surfaced every name-only match, the source conflict, the closings with no CRM match or no income, and the unmatched income entry. Unclear rules it reported (whether name matches count in totals, costs tied to closings outside the period, median rounding) were fixed in this version.
- Not yet tested: the ListedKit MCP connection route, and live CRM or accounting connections.

---

Connecting ListedKit: the ListedKit MCP lets your assistant read the ListedKit transactions your account can open. It does not connect your CRM or accounting software. Setup: https://app.listedkit.com/connect/mcp?utm_source=listedkit.com&utm_medium=website&utm_campaign=report-templates. More: https://www.listedkit.com/features/integrations/ai-assistants
