Internal engineering initiative

Account hierarchy processing and trigger framework

6sense India Pvt. Ltd. · Senior Salesforce Developer, Jan 2025 – Present

Summary

I implemented Account processing that keeps hierarchy-derived data aligned with parent relationships. The framework populates the parent chain before changes are saved, recalculates affected hierarchy records after changes, and includes a two-phase batch path for corrective processing across accounts.

It also handles removal of a parent relationship, and sits alongside related account-data rules such as country/region mapping and segment population. It illustrates a class of Salesforce problem that goes beyond updating one record: a change to one account can affect values used across its whole hierarchy.

What I built

  • Implemented parent-chain population before save and recalculation of affected hierarchy records after change.
  • Built a two-phase batch path for corrective processing across accounts.
  • Handled removal of a parent relationship.

Technologies

  • Apex
  • Batch Apex
  • Trigger framework

Status of this write-up

Client and internal names, payloads and configuration values are deliberately left out of this write-up.