The Workflow Library

Library / Deal hygiene / deal-hygiene-049

Deal record locked from edits after Closed Won (data integrity)

Deal hygieneDealSales Hub EnterpriseIntermediate~40 min to buildFull spec

Outcome. A key financial field edited on a deal after it closes won gets reverted to its closing value automatically and the change gets flagged for review, so a record that finance already acted on cannot silently drift after the fact.

Workflow map Enrollment, branches and actions at a glance deal-hygiene-049
flowchart TD
    A[Deal stage is Closed Won] --> B{Amount Locked Snapshot unknown?}
    B -->|yes| C[Set snapshot to current Amount, exit]
    B -->|no| D{Amount differs from snapshot?}
    D -->|yes| E[Revert Amount to snapshot value]
    E --> F[Set Post Close Edit Flag = true]
    F --> G[Notify manager]
    G --> H[Create review task]
    D -->|no| I[Exit, no change]
action or delay branch public on every spec, paid or not

When to use it, when not to

  • UseUse it once Amount, Close Date, or another field finance or ops relies on at close is at real risk of being edited after the fact, whether by mistake or to quietly adjust a number after invoicing.
  • UseRead this as what it actually is: a workflow cannot lock a record. HubSpot's real mechanism for restricting who can edit which properties is field-level permissions inside a permission set (Enterprise, Settings > Users & Teams > Permission Sets), which is the correct control if the goal is to stop most users from editing a field at all, permanently, not conditionally on deal stage. What this fiche adds is different and complementary: a detect-and-revert pattern that watches for edits specifically after Closed Won and reverses them, functioning as a soft lock for the small number of users, such as admins, whom a permission set cannot practically exclude.
  • SkipDo not use this fiche as your only control if a hard, permanent restriction is what you actually need, build the permission set first, this fiche is the safety net for edits a permission set does not or cannot cover.
  • SkipDo not use it on every deal property, pick a short list of fields that genuinely must not change post-close, locking everything makes correcting a real data-entry mistake after close needlessly painful.
The preview ends here. Six sections are in the library. counted, not blurred
PrerequisitesEvery property with its label, internal name, type and options, plus the assets the workflow needs before you start.3 items
EnrollmentThe trigger, the criteria exactly as they are ticked in the UI, the re-enrollment rule and the suppression list.4 parts
StepsEach action in order with its parameters, its branches and its delays, written as you tick them.8 numbered actions
Known pitfallsTraps seen in production, each with what breaks and what to do instead.5 pitfalls
Test plan, variants and build specHow to prove it works in a test portal, where to look when it does not, the variants for other objects or tiers, and the YAML build spec.3 variants, 3 sections
FilesThe properties JSON creates the fields in one API call, the workflow JSON documents the build.PDF, Markdown, JSON
Install1 click. The installer creates the properties this spec declares and the workflow itself, switched off, then opens a task for the prerequisites that are assets rather than properties, such as a team, a static list or a marketing email. What it created is listed on the install page.1 click, switched off
Unlock the full library, 149 EUR

or the deal hygiene pack, 39 EUR

One-time, excl. VAT. 30-day refund, no questions asked. Founding prices until 31 October, then 199 and 59 EUR. Includes every spec added later, up to the full 500, and the one-click installer on the full library. Building on client portals? The agency licence at 449 EUR covers unlimited client portals.