Outbound revenue attribution board for Mailshake and Pipedrive
See which cold email campaigns actually created pipeline and closed revenue instead of just replies, by tracing every Mailshake lead into the deals it became in Pipedrive.
Build me an outbound revenue attribution app that answers the question my cold email tool never can: did outbound actually generate revenue, not just replies. It connects Mailshake, where the campaigns and leads live, to Pipedrive, where the deals and the money live, and joins them on the lead's email address.
The main surface is an attribution board. One row per Mailshake campaign, pulled from List Campaigns. For each campaign show the campaign name and status, the number of leads it produced, how many of those leads matched a person in Pipedrive, the open pipeline value traced back to the campaign, the closed won revenue traced back to it, and a closed lost figure. Let me sort the board by closed won revenue and by open pipeline, because the whole point is ranking campaigns by money instead of by open rate. Show reply and lead counts too, but keep them secondary in the visual hierarchy so nobody reads this as another engagement report.
Here is how a campaign gets its numbers. Pull the leads with List Leads and pull List Created-Leads Activity to get each lead's created date and the campaign it belongs to, filtered to the date range selected at the top of the board. For each lead, look the person up in Pipedrive with Search Persons using the lead's email address as the search term, scoped to the email field with exact matching where possible. When a person is found, call List Deals filtered by that person to pull their deals with value, currency, stage, and open, won, or lost status. Use List Stages to turn stage ids into readable stage names. Roll those deal values up per campaign, and also per month based on the month the lead was created, so I can see an attribution trend over time rather than one flat total.
Two rules matter a lot and both need to be visible and adjustable in the app rather than buried in code. First, match confidence. An exact match on one person's email address is a strong match. A lead email that returns more than one person, or matches only on a company domain rather than the full address, is a weak match that a human should confirm. Show the confidence on every lead row, let me filter the board to strong matches only, and let me manually confirm or reject a weak match so the decision sticks the next time I open the app. Second, the credit rule. Give me a setting at the top of the board with two options: credit a campaign for all deals on a matched person, or credit only deals created after the lead's created date. Default to the second, stricter option, show clearly which rule is active, and recalculate everything when I switch it, because that choice changes the numbers a lot and people will argue about it.
Clicking a campaign opens a detail view: every lead it produced, with the lead's email, the date it was created, its Mailshake lead status, the matched Pipedrive person, the match confidence, and each deal on that person shown with title, value, stage, and won or lost status. This is the drill down someone uses in a pipeline review when they want to see the actual names behind a number.
Give unmatched leads their own tab. Every lead from the selected date range with no person found in Pipedrive, showing the email address, the campaign, the created date, and the lead status, sorted with the most recent first and grouped by campaign so a pattern in one campaign stands out. Put a running count and a percentage at the top, because this tab is usually where the leak is: replies the team celebrated that never made it into the CRM. Let me search this tab by email or domain and export the list.
Add a monthly rollup view: pipeline created and revenue closed by the month the lead first came in, broken out by campaign, so I can see whether outbound is improving or whether one good quarter is carrying the whole story.
Finally, add a Write the attribution recap button. I pick a date range, press it, and a background agent runs inside the app. It walks the campaigns and leads for that range, reconciles leads to Pipedrive persons and their deals using the same operations and the currently selected credit rule, and writes a narrative back into the app. The recap should cover which campaigns sourced real pipeline and real closed won revenue, which messaging angles those campaigns used based on their names and content, which campaigns produced plenty of replies that went nowhere, and where the drop off is happening between lead and deal, calling out whether the loss is at the matching step, meaning leads never entered the CRM, or later at the deal stage. It should end with a short set of recommendations about which campaigns to scale and which to retire. Store each recap with its date range and the credit rule used, show a history of past recaps in the app, and show clear progress while the agent is running since this takes a while over a large date range.
A note on the data. Both systems paginate, so page fully through campaigns, leads, activity, and deals rather than reading the first page. Cache the matching results so reopening the board is fast, with a refresh control to rebuild it on demand. Pipedrive search endpoints are rate limited more tightly than the rest of the API, so pace the person lookups and handle a rate limit response by backing off and continuing rather than failing the whole board. Show deal values in the deal's own currency and note when a campaign total mixes currencies rather than silently adding them together.
What does this prompt do?
- Lists every Mailshake campaign side by side with the open pipeline value and closed won revenue traced back to it, so you can rank campaigns by money rather than by open rate.
- Matches each lead your campaigns produced to a person in Pipedrive by email address, pulls that person's deals with value, stage, and won or lost status, and rolls the totals up per campaign and per month.
- Shows a match confidence on every lead and keeps a separate tab of leads that never made it into the CRM, which is usually where the revenue leak is hiding.
- Includes a Write the attribution recap button that sends a background agent over a date range you pick, reconciling leads to deals and writing a narrative about which campaigns and which messaging angles sourced real pipeline.
What do I need to use this?
- A Mailshake account with campaigns running and Lead Catcher in use, plus your Mailshake API key
- A Pipedrive login with permission to see persons, deals, and pipeline stages
- Sales reps who log deals against the person record rather than only against the company, since email address is the join key
- A rough idea of your sales cycle length, which helps you choose the right attribution window
How can I customize it?
- Switch the credit rule between giving a campaign credit for every deal on a matched person and counting only deals created after the lead date, which changes the numbers considerably
- Change the date range on the board and on the recap agent to match your sales cycle, for example a rolling ninety days instead of this quarter
- Choose which Pipedrive pipelines count toward attribution if you run separate pipelines for outbound, inbound, and renewals
- Adjust what counts as a strong match versus one worth reviewing by hand when a lead email maps to more than one person
FAQs
How does the app know which deal came from which campaign?
What happens when one person has several deals?
Why do some leads show up as unmatched?
Can I use this with HubSpot or another CRM instead of Pipedrive?
Is this a live report or a one time snapshot?
Related templates
Every night at 2am, pull the contacts on your open and won deals and block them from your cold outreach before the next send goes out.
Every Monday, gather everyone who commented on or reacted to your team's LinkedIn posts, skip the ones already in your CRM, and hand reps the rest.
A daily triage board for your Mailshake reply queue, with aging, per-rep filters, an AI reply drafter, and one-click push to HubSpot.
Rank every cold email campaign side by side, see which follow up step actually earns replies, and pause bad sends before they burn your list.
Describe your ideal customer in plain English, work the matched companies and contacts in one table, and send the keepers to Pipedrive without touching a spreadsheet.
Filter the UK company register by sector, age, and location, see which accounts your team already owns, and push the rest into Pipedrive in one action.
Stop reporting on reply rates your CFO does not care about.
Trace every cold email lead through to the deal it became and rank your campaigns by the revenue they actually produced.