Back to feed
Dev.to
Dev.to
7/19/2026
Build a Commission Attribution Engine in Google Sheets (Matching, Splits & Clawbacks)

Build a Commission Attribution Engine in Google Sheets (Matching, Splits & Clawbacks)

Short summary

A practical guide to building a commission attribution engine in Google Sheets, focusing on the matching layer that determines which rep owns a sale. Covers email normalization (stripping +tags and Gmail dots), domain-based matching with free-provider guards, confidence scoring for auto-posting vs. manual review, and clawback window logic for refunds. Includes JavaScript functions for each step, emphasizing that 95% of commission disputes stem from matching errors, not arithmetic.

  • 95% of commission disputes are matching errors, not math errors
  • Email normalization and domain matching with free-provider guards prevent silent misattribution
  • Confidence scoring enables auto-post, manual review, or unmatched parking workflows

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more