Skip to content

Create a commission calculation record on a custom object when a deal is closed won

One of 565 written HubSpot workflow specs, by a collective of independent HubSpot consultants.

Enterprise

Seat pricing: Enterprise edition. To build it, a GTM Seat or an Ops Seat (an Ops Seat cannot create marketing emails or sequences). Per-hub plans: Sales Hub Enterprise.

Deal4 stepsUpdated for HubSpot seat pricing
OutcomeEvery closed-won deal produces exactly one commission record with the amount, rate, and calculated payout captured at close, instead of a spreadsheet someone rebuilds every payroll cycle.
Workflow mapsales-ops-020
Deal stage changes to closed won, rate known leads to Custom code: calculate and create commission record. Custom code: calculate and create commission record leads to Calculation failed?. Calculation failed? leads to Yes: Notify sales ops of failure; No: Create commission review task. Yes No Deal stage changes to closed won, rate known Custom code: calculate and create commission record Calculation failed? Notify sales ops of failure Create commission review task
Deal stage changes to closed won, rate known leads to Custom code: calculate and create commission record. Custom code: calculate and create commission record leads to Calculation failed?. Calculation failed? leads to Yes: Notify sales ops of failure; No: Create commission review task. Yes No Deal stage changes to closed won, rate known Custom code: calculate and create commission record Calculation failed? Notify sales ops of failure Create commission review task

When to use it, when not to

Use it

  • Use it when commission math is simple enough to express as one rate applied to one deal amount (flat percentage per deal). This is not a full commission engine; it does not handle tiered accelerators, clawbacks, or split deals on its own (see sales-ops-048 for splits).
  • Use it when finance or sales ops wants an auditable record per deal that will not change even if the deal's amount is edited later.
Read more on when to use itShow less

Skip it

  • Do not use it if your compensation plan varies commission rate by product mix within a single deal; that needs line-item-level logic this workflow does not attempt.
  • Do not use it without Data Hub or Sales Hub Enterprise (or Service Hub Enterprise); custom objects, and workflows that create custom object records, require an Enterprise-tier subscription (https://knowledge.hubspot.com/object-settings/create-custom-objects).
Read more on when to skip itShow less

The rest of this spec

Prerequisites · 7 items

Every property with its label, internal name, type and options, plus the assets the workflow needs.

Enrollment · 4 parts

The trigger, the criteria as ticked in the UI, the re-enrollment rule and the suppression list.

Steps · 4 numbered actions

Each action in order with its parameters, branches and delays.

Known pitfalls · 5

Traps seen in production, each with what breaks and what to do instead.

Test plan and UAT script · 3 cases, 3 variants

How to prove it works in a test portal, one case per branch, and a sign-off sheet.

Files · PDF, Markdown, JSON, CSV, code

The properties JSON creates the fields in one call. The workflow JSON documents the build. The custom coded action ships as a ready-to-paste .js file.

Install · 1 click, switched off

The installer creates the properties and the workflow, switched off, then opens a task for what it cannot create. Nothing is deleted, enabled or enrolled.

Unlock all 565 specs, 149 EUR

One-time, excl. VAT. 30-day refund. Installs in 3 portals. Founding price until 30 November.

Read the free Sales ops spec

Read 12 complete specs before you pay.

One per category, same format as the paid ones. Email only, no card.

We email the link, then a short note when specs change. Nothing else.

149 EUR199

Full library, 565 specs
Get the full library