← All case studies
Series B SaaS201–500 employees

Commission Calculation Automation for a SaaS Sales Team

A 200-person SaaS company's RevOps team was spending 3 days per month manually calculating commissions in Excel, causing payment delays, rep disputes, and two resignations. A custom Python pipeline eliminated the manual work entirely.

Cost of problem

3 days/month manual work + $180k rep churn cost

Savings achieved

$120k/year in avoided headcount + dispute resolution

Time saved

3 days → 12 minutes per month

ROI

18x ROI in year one

Build time

3 weeks

The Problem

Every month, the RevOps analyst would pull closed-won deals from Salesforce into Excel, manually apply comp plan rules (accelerators, draw adjustments, clawbacks), and email individual statements to 45 reps. The process took 3 days, was error-prone, and disputes averaged 8 per cycle. Two reps resigned citing 'confusing comp' as a contributing factor.

What Was Built

A Python pipeline that connects Salesforce CRM (via REST API) to the comp plan logic stored in a config file. It calculates per-rep commissions including accelerators and draws, generates individual PDF statements via WeasyPrint, and emails them automatically. A Streamlit dashboard lets RevOps managers run what-if scenarios before close.

How It Was Implemented

The pipeline runs on a scheduled job the last business day of each month. Comp plan rules are defined in YAML so Finance can update them without touching code. Salesforce data is pulled via OAuth, validated for completeness, and exceptions are flagged to a Slack channel before processing. The whole run takes 12 minutes.

The Outcome

Commission statements now arrive to reps by 9am on the first of each month. Disputes dropped from 8/month to 0 in the first quarter. The RevOps analyst recovered 3 days per month and redirected that time to pipeline analysis. Two subsequent comp plan changes were rolled out in under an hour.