Systems Library / Sales Automation / How to Build a CRM Activity Compliance Tracker
Sales Automation crm pipeline

How to Build a CRM Activity Compliance Tracker

Track whether reps are meeting activity targets in the CRM.

Jay Banlasan

Jay Banlasan

The AI Systems Guy

Reps who skip CRM logging create blind spots in your pipeline. This crm activity compliance tracking system for your sales team shows who is doing the work and who is not. I use this to keep teams honest without micromanaging.

What You Need Before Starting

Step 1: Define Activity Targets

Set minimum daily and weekly targets for calls, emails, and meetings.

TARGETS = {"daily": {"calls": 15, "emails": 25, "meetings": 3}}

def get_rep_activities(crm_client, rep_id, date_range):
    activities = crm_client.get_activities(
        owner=rep_id, types=["call", "email", "meeting"], date_range=date_range
    )
    return {
        "calls": len([a for a in activities if a["type"] == "call"]),
        "emails": len([a for a in activities if a["type"] == "email"]),
        "meetings": len([a for a in activities if a["type"] == "meeting"]),
    }

Step 2: Calculate Compliance Scores

Score each rep as a percentage of target. Below 80% gets flagged.

def calculate_compliance(actual, targets):
    scores = {}
    for activity_type in targets:
        scores[activity_type] = min(actual.get(activity_type, 0) / max(targets[activity_type], 1), 1.0)
    scores["overall"] = sum(scores.values()) / len(scores)
    return scores

Step 3: Build the Team Report

Generate a team-wide view showing who is on track and who is behind.

def compliance_report(crm_client, team_reps):
    report = []
    for rep in team_reps:
        activities = get_rep_activities(crm_client, rep["id"], "this_week")
        compliance = calculate_compliance(activities, TARGETS["daily"])
        report.append({
            "rep": rep["name"],
            "calls": activities["calls"],
            "emails": activities["emails"],
            "score": compliance["overall"],
        })
    return sorted(report, key=lambda x: x["score"])

Step 4: Send Midweek Nudges

A friendly reminder to reps behind pace at midweek.

def send_nudge(rep, compliance):
    if compliance["overall"] < 0.5:
        behind = [k for k, v in compliance.items() if k != "overall" and v < 0.5]
        message = f"Hey {rep['name']}, behind on {', '.join(behind)} this week."
        send_slack_dm(rep["slack_id"], message)

Step 5: Generate Weekly Summary

Full compliance report to managers every Friday.

def weekly_summary(report):
    summary = "| Rep | Calls | Emails | Score |\n|-----|-------|--------|-------|\n"
    for row in report:
        status = "on track" if row["score"] >= 0.8 else "needs attention"
        summary += f"| {row['rep']} | {row['calls']} | {row['emails']} | {row['score']:.0%} ({status}) |\n"
    return summary

What to Build Next

Correlate activity compliance with win rates. Show the team that reps who hit targets close more deals.

Related Reading

Want this system built for your business?

Get a free assessment. We will map every system your business needs and show you the ROI.

Get Your Free Assessment

Related Systems