Code Snippet Library / Sales Ops

Universal Pipeline Stage Schema

A CRM-agnostic canonical deal-stage schema with real, cited default mappings for Salesforce, HubSpot, and Pipedrive, so tools can work the same way no matter which CRM a deal actually lives in.

The Universal Pipeline Stage Schema is a free, CRM-agnostic canonical deal-stage schema with real default mappings for Salesforce, HubSpot, and Pipedrive, letting dashboards and skills work the same way regardless of which CRM a deal lives in.

↗ View on GitHub ⬇ Download Full Repo (.zip)
MIT
License
JSON
Language
Aug 12, 2026
Last updated

Every CRM names its pipeline stages differently, and almost every real account renames the defaults again on top of that. This snippet is the canonical, CRM-agnostic stage bucket that a dashboard, scoring skill, or report can build against once, instead of special-casing Salesforce vs. HubSpot vs. Pipedrive every time.

How it works

const { toCanonical } = require('./mapper.js');

// Works out of the box against each platform's real default stage names:
toCanonical({ dealId: 'SF-001', sourceCrm: 'salesforce', nativeStage: 'Negotiation/Review' });
// { canonical_stage: 'negotiation', is_closed: false, is_won: false, mapped_via: 'default' }

// Almost every real account renames its stages, supply your own mapping:
toCanonical({
  dealId: 'HS-042', sourceCrm: 'hubspot', nativeStage: 'Verbal Commitment',
  customMapping: { 'Verbal Commitment': 'negotiation' },
});

Why the default mappings are clearly labeled “default”

default-mappings.json ships each platform’s real, cited out-of-the-box stage names, not a claim about what your specific account has today. toCanonical() prefers a custom mapping you supply over the shipped defaults, and throws a clear error instead of guessing when a stage name is not found anywhere.

README.md View raw ↗

What this is (and isn’t)

A schema + mapping logic, not a live CRM integration. You supply the native stage name from your own CRM export or API call.

Files

FilePurpose
schema.jsonJSON Schema (2020-12) for one canonical, mapped deal record
default-mappings.jsonReal, cited default stage names for Salesforce, HubSpot, and Pipedrive
mapper.jstoCanonical() / fromCanonical(), zero dependencies
validate.jsajv-based schema validator
test.js13-test suite

Security & validation

Verified 2026-08-12: npm audit 0 vulnerabilities (single dependency: ajv), node test.js 13/13 passing, including tests that custom mappings correctly override defaults and unmapped stages fail loudly instead of silently mis-categorizing a deal.

Support

Open an issue on GitHub Issues. Want help mapping your real pipeline? Book a scoping call ($175/hr).

License

MIT

FAQ

Is this snippet free to use?

Yes. Free to download and use. MV3 charges $175/hr only if you want help mapping your real, customized pipeline.

Does my CRM data get sent to MV3?

No. This is a schema and mapping function you run locally against stage names you supply. No network calls.

What if my company renamed all its pipeline stages?

Supply a customMapping object. It always takes priority over the shipped defaults, and the function throws a clear error rather than silently guessing when a stage name is not found.

Which CRMs does this support?

Real, cited default mappings ship for Salesforce, HubSpot, and Pipedrive. Any other CRM works too by supplying a full customMapping.

Where do I get support if something breaks?

Open a GitHub Issue for bugs or questions. For paid help mapping your real pipeline, book a scoping call.

JR
Jordan Reeves
ABM & Outbound Pipeline, MV3 Marketing