Cometly
AcademyModule 02 · Sales-Led Growth Reports
SLGSetupLesson 2.4·11 min read

Salesforce custom triggers for lifecycle stages

OAuth into Salesforce. Map Lead Status, Opportunity Stage, and custom fields.

Salesforce setups are inherently custom. Every team has its own object model, custom fields, and pipeline conventions. Cometly’s job is to bend to whatever you’ve built — but that flexibility means the setup deserves more deliberation than HubSpot’s.

Why this matters

A clean Salesforce-to-Cometly mapping is the difference between trustworthy quarterly reports and three weeks of arguing with the SalesOps team about whose numbers are right. Most Salesforce customers get this set up in a single half-day session with a Cometly solutions engineer.

Section 01

The standard SaaS pattern

Most B2B SaaS teams end up with the same six-event pattern in Salesforce: Lead Captured (form), MQL (Lead Status change), SQL (Lead Status change), Demo Booked (Activity or Custom Object), Opportunity Created (Opportunity Stage), Closed-Won (Opportunity Stage with Amount).

Cometly’s Salesforce integration listens for changes on Lead Status, Opportunity Stage, and any custom field you point it at. Use Lead Status changes for the marketing-qualified handoff, and Opportunity Stage changes for the sales-qualified handoff and beyond.

Section 02

Account-level vs contact-level

If your sales motion involves buying committees, set the integration to roll up at the account level. That way every contact at the same Salesforce Account gets credited under a single account-level deal, and your reports won’t double-count when three people from the same buying committee fill the form.

If your motion is contact-level (typical for SMB self-serve), keep the rollup at the contact level. The choice is a single setting in the integration but it changes every downstream report — make it deliberately.

  • Lead Captured — Web-to-Lead form submission
  • MQL — Lead Status updated to 'Marketing Qualified'
  • SQL — Lead Status updated to 'Sales Qualified' or Lead Converted
  • Demo Booked — Activity created with Subject containing 'Demo'
  • Opportunity Created — Opportunity Stage moved to 'Prospecting' or first real stage
  • Closed-Won — Opportunity Stage = 'Closed Won' with Amount mapped
Common pitfalls

What to watch for.

  • Over-customizing the trigger logic

    Every custom condition is a place attribution can break. Start with the simplest mapping that captures the essential stages and only add complexity when you need it.

  • Using triggers on inactive lifecycle paths

    Test that each trigger actually fires on real records. A 'Demo Booked' event that never fires looks like a no-data problem in reports.

  • Forgetting amount mapping

    Salesforce Opportunity Amount is the source of truth for revenue. Map it explicitly to Cometly’s gross revenue field on Closed-Won.

Key takeaways

Recap.

  • Wire Lead Status → MQL/SQL events for marketing-driven leads
  • Wire Opportunity Stage Changes → Demo Booked, Proposal, Closed-Won events
  • Use account-level triggers when buying committees include multiple contacts
  • Pull Opportunity Amount as gross revenue for closed-won attribution
  • Run a back-test against the last 60 days of opps to validate the mapping
Put it into practice

Build this report inside your own Cometly workspace.

Most lessons can be wired up in a single 30-minute onboarding call. Connect your stack live and walk away with a working dashboard.