ISSUE 05
IN PROGRESSPythonClaude APIFastAPIHubSpot
CONTEXT
Every new sales deal at Freshpaint needs a source tag (paid ads, outbound, partnerships, and so on) so leadership can see what's actually driving revenue.The old setup was a stack of about 15 HubSpot rules that fired on the first match.They couldn't weigh competing signals, couldn't explain their decisions, and quietly broke whenever a field name changed.The result was attribution data the team didn't trust.
BUILD
When a new deal is created in HubSpot, the system pulls together everything known about it (the contact, the company, marketing touches, sales activity, full timeline) and hands that complete picture to Claude.The model reasons over the evidence the way an analyst would and returns a single source category along with its rationale.Whenever the sales ops team overrides a call, that correction feeds back into the agent, so it keeps getting sharper over time.
RESULT
Currently classifying deals at 76% accuracy on a 139-deal test set, with three of four categories already past the 80% target.The next round of tuning sharpens how the agent reads engagement history to close the last gap.Once it clears the bar, it goes live in production to replace the old rules.
LINKS
SCREENSHOTS
