Salesforce Decode
Salesforcedecode
Back to questions
ApexAdvancedsharingbatchterritory

Implement sharing recalculation batch after territory model realignment

Real World Scenario

Enterprise Territory Management realignment affects 2M Accounts. Users report wrong record access for 48 hours until sharing catches up.

Expected Answer

• Territory realignment is async sharing recalc—set business expectation • Custom batch recalculates manual shares supplementing territory rules • Defer batch until territory model activation completes • SharingOperations API for targeted recalc if licensed and appropriate • Monitor sharing calculation job in setup background jobs • Read-only mode flag during realignment window optional • Test realignment in full sandbox measuring recalc duration at volume

Follow-Up Questions & Answers

Click to expand — each follow-up includes a direct, interview-ready answer

Main difference: use case and scale. Territory realignment is async sharing recalc—set business expectation. Custom batch recalculates manual shares supplementing territory rules. Pick based on your integration pattern and team capability. Territory realignment is change window event—not invisible metadata tweak. Optimize for scale and operational observability.

Architect Perspective

Territory realignment is change window event—not invisible metadata tweak.