Sandbox drift from production before a deployment
Key Takeaway
A sandbox is a snapshot of production at the time it was copied, not a live mirror, so your deployment plan has to account for what changed in production since then.
Sandbox drift is when a sandbox stops matching production because production keeps changing after the sandbox was created or last refreshed. This matters because you deploy into a production org that may no longer match your sandbox.
Why a sandbox stops matching production
A sandbox is a separate org with its own org ID. Customizations and data changes made in production don't flow into it on their own.
Production keeps changing even on teams that build in sandboxes, because some administrative tasks are acceptable to do directly in production:
- Developing email templates
- Creating or editing users
- Creating or editing permission sets and profiles
None of these production changes appear in existing sandboxes.
For example, imagine that you create a sandbox on Monday. On Tuesday, an admin creates a permission set directly in production. The permission set now exists in production, but it doesn't appear in your sandbox.