Revenue Operations

Delivered

Metadata decision engine

A metadata-based decision engine supporting task processing and qualification automation.

Problem

Qualification and prioritization rules change often. Encoding them directly in triggers makes every change a code release and makes behaviour hard to reason about.

My contribution

  • Built a metadata-based decision engine and configurable decision logic for lead/account qualification automation.
  • Worked on qualification automation using Change Data Capture and enhanced task-trigger processing.
  • Earlier roles included building Apex decision engines, so this pattern is a recurring one in my work.

Design

A synthetic reconstruction of the general pattern, not employer code.

  1. Change event captured
  2. Load ordered rules from metadata
  3. Evaluate conditions against record context
  4. Apply first or all matching outcomes
  5. Write result with reason
  • Conditions and outcomes are data, evaluated by one small, well-tested engine.
  • Each result records which rule fired, so behaviour can be explained and debugged.

Tradeoffs

Design tradeoffs
ChoiceBenefitCost
Generic rule engineNew rules need no new codeLess expressive than bespoke logic; needs governance
Event-driven via CDCDecouples qualification from the originating transactionEventual consistency and replay handling
Recorded rule reasonsExplainable outcomes for support and usersExtra storage and fields

Demonstrated behavior

Planned demo (not yet built)

  • Edit a synthetic rule and watch a sample record's outcome change
  • See which rule fired and why

See the planned demo: Decision engine

Technologies

  • Apex
  • Custom Metadata
  • Change Data Capture
  • Platform Events