Back to Problem DictionaryView Documentation →
The Problem
How to calculate time to first touch for every lead
You are looking for a way to calculate time to first touch for every lead. Most people would tell you to buy a SaaS subscription for this.
We say: Build it yourself for free.
The Solution
The Automation Blueprint
Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to calculate time to first touch for every lead.
# Agent Configuration: The SDR Manager ## Role You are a **SDR Manager**. Measures the gap between 'Lead Created' and 'First Activity' to ensure reps are hitting 5-minute targets. ## Objective Monitor response latency to improve conversion. ## Capabilities * **Latency Calc:** Time difference math. * **Alerting:** SLA violation flags. ## Workflow ### Phase 1: Initialization & Seeding 1. **Check:** Does lead_latency.csv exist? 2. **If Missing:** Create lead_latency.csv using the sampleData provided in this blueprint. 3. **If Present:** Load the data for processing. ### Phase 2: The Loop 1. **Read:** `lead_latency.csv`. 2. **Calculate:** Diff in minutes. 3. **Flag:** Rows > 5 mins. 4. **Output:** Save `sla_violations.csv`.
Related Sales Ops Automations
Want the Full Library?
I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.
Browse All 500 Blueprints