CRM Analytics sandbox masking has a problem most teams never test for: the dataset layer runs on its own extraction schedule, independent of the object masking job you just ran. Your sandbox refresh masks Contact and Account records cleanly. Then a dataflow or recipe fires on its own cadence, pulls fresh rows straight from those objects, and writes a dataset snapshot that can predate the masking job, reference a cached extract, or pull from a live connection pointed at production. The result is a sandbox where the UI shows fake names but the analytics dashboard behind it still shows real ones.
This isn't an edge case. CRM Analytics (formerly Tableau CRM, formerly Einstein Analytics) stores data in its own compressed, columnar format, separate from the Salesforce object tables your masking tool targets. Most masking products operate through standard DML or Bulk API calls against sObjects. Datasets don't live in sObjects. They live in dataset containers that get populated by dataflows, recipes, or external sync, and none of those three paths are guaranteed to run after your masking job finishes.
Why CRM Analytics breaks the standard masking model
Standard sandbox masking tools assume a simple chain: refresh the sandbox, run the masking job, done. Every object field gets scanned, matched against a masking rule, and overwritten in place. That model works because the data and the masking engine operate on the same storage layer.
CRM Analytics adds a second storage layer that the masking job never touches directly. A dataflow reads from Account, Contact, Opportunity, and custom objects, joins them, transforms them, and writes the output to a dataset. If that dataflow last ran three days before your sandbox refresh, the dataset still holds whatever was in production three days ago, unmasked, sitting in a sandbox your QA team now has full access to.
Recipes behave the same way but add another wrinkle: scheduled recipe runs often get disabled during a sandbox refresh window and re-enabled manually later, sometimes days after go-live. Until someone remembers to kick off that run, the dataset is either stale production data or empty. Neither is acceptable from a compliance standpoint, and the empty state just breaks dashboards instead of leaking data.
Dataflows, recipes, and the extraction timing problem
The core issue is sequencing. Masking has to happen before any dataflow or recipe extracts data, not after. Get the order wrong and you mask the source objects correctly while the dataset downstream still holds the original values, because the extraction already ran and the output was already written.
Three paths feed a CRM Analytics dataset, and each needs a different fix:
- Dataflow extract nodes that pull directly from Salesforce objects: these must be scheduled to run only after masking completes, not on their regular production cadence.
- Recipes with sfdcDigest inputs: same timing requirement, plus a check that any augment or join transformation isn't reintroducing a real email or phone number from a secondary source object that wasn't masked.
- External data sync and live connections: these can point at a completely different org, including production, if nobody updated the connection when the sandbox was cloned. This is the most dangerous path because it bypasses the sandbox's masked data entirely.
Live connections deserve particular scrutiny. CRM Analytics live connect queries data in real time rather than storing a static extract, which means a misconfigured connection in a sandbox can query production tables on every dashboard load. No masking job, however well timed, fixes that. The connection itself has to be repointed as part of the sandbox provisioning checklist, not as an analytics afterthought.
Security predicates add a second failure mode
Row-level security in CRM Analytics runs on security predicates, filter expressions evaluated against a user's Salesforce attributes, often a field like RoleId, UserId, or a custom territory field joined into the dataset. Masking tools that regenerate foreign keys or scramble lookup relationships can silently break these predicates.
Say a predicate filters dataset rows based on 'OwnerId == "$User.Id"'. If your masking job reassigns ownership to randomized users without preserving the relationship integrity the predicate depends on, every row in the sandbox either disappears from every user's view or appears to everyone, depending on how the expression fails. Admins usually discover this when a sandbox demo shows zero rows to a user who should see thousands, and the root cause takes an afternoon to trace back to a masked foreign key.
The fix isn't to skip masking foreign keys. It's to mask consistently, meaning the same source value always maps to the same masked value across every object the dataset joins against. Inconsistent masking (randomizing OwnerId differently in Account versus Opportunity, for example) is what breaks predicates, not masking itself.
Templates and sample data: the quieter leak
CRM Analytics app templates, especially custom ones built and shared internally, frequently ship with embedded sample datasets created during development. Someone built a demo dashboard two years ago using a CSV export of real customer data to make the chart look convincing, uploaded it as a static dataset, and that dataset has been cloned into every sandbox refresh since.
Static, manually uploaded datasets are invisible to both your masking tool and your dataflow scheduling fix, because they were never generated from a live extract in the first place. They're just sitting there as a file-backed dataset, identical in every sandbox, carrying real names and emails that nobody has looked at since the demo shipped.
Finding these takes a manual audit, not an automated scan. Pull a list of every dataset in the org, check its source (dataflow-generated versus file upload), and flag anything created more than a sync cycle ago with no corresponding dataflow job. In our experience this turns up at least one orphaned demo dataset in almost every org that has had CRM Analytics enabled for more than a year.
Building a masking policy that actually covers CRM Analytics
A masking policy that stops at the object layer leaves this entire surface exposed. Covering it properly means treating dataset refresh as a dependent step in the masking job, not a separate analytics task owned by a different team.
| Component | Risk | Required control |
|---|---|---|
| Dataflow / recipe schedule | Extracts run before masking completes | Gate dataflow/recipe execution behind masking job completion |
| Live connections | Query production or an unmasked org in real time | Repoint or disable connections during sandbox provisioning |
| Security predicates | Break when masked foreign keys lose referential consistency | Enforce consistent cross-object masking for all lookup fields |
| Static / uploaded datasets | Never refreshed, carry original PII indefinitely | Manual audit and re-upload with masked or synthetic data |
Each row in that table is a separate owner in most orgs: the Salesforce admin owns masking, the analytics team owns dataflows, and nobody owns the live connection config until an auditor asks about it. Assign a single accountable owner for the whole chain, or this gap reopens every time someone adds a new recipe.
What to check before your next sandbox refresh
Run through this before signing off on a refresh that includes CRM Analytics:
- Confirm every dataflow and recipe touching PII-bearing objects is scheduled to run after, not before, the masking job.
- Audit all live connections for sandbox-appropriate targets; disable any pointed at production.
- Test at least one security predicate with a non-admin test user to confirm row visibility still matches expectations post-mask.
- Inventory static datasets and flag any without a corresponding dataflow or recipe source.
- Document the dependency order in your runbook so the next person doesn't have to rediscover it.
None of this is exotic work. It's sequencing and ownership, the same two things that cause most masking gaps across Salesforce generally. CRM Analytics just makes the failure mode more visible, because a dashboard showing real customer names in a QA sandbox is harder to miss than a stray value buried in a custom field nobody queries.
Frequently Asked Questions
Does masking Salesforce objects automatically mask CRM Analytics datasets?
No. Masking tools operate on Salesforce object records, while CRM Analytics datasets are a separate storage layer populated by dataflows, recipes, or external sync. Unless those extraction jobs are scheduled to run after the masking job completes, the dataset can still hold the original, unmasked values even though the underlying objects are clean.
Can a live connection in CRM Analytics expose production data in a sandbox?
Yes, and it's one of the higher-risk gaps because live connections query data in real time rather than storing a static extract. If a sandbox's live connection still points at a production org, dashboards built on it will display real customer data regardless of what masking was applied to the sandbox's own objects.
Why do security predicates sometimes break after a masking job runs?
Security predicates filter dataset rows using expressions tied to fields like OwnerId or RoleId. If a masking tool randomizes those foreign key values inconsistently across related objects, the predicate can no longer match rows correctly, which typically shows up as users seeing zero rows or seeing everything.
How do static or uploaded datasets end up leaking real PII in sandboxes?
Static datasets created from a manual CSV upload, often built years earlier for a demo, aren't generated from a live Salesforce extract, so they're invisible to both the masking job and dataflow scheduling fixes. They get cloned into every sandbox refresh unchanged, which means any real customer data in that original upload persists indefinitely until someone manually audits and replaces it.
Who should own CRM Analytics masking coverage: the admin team or the analytics team?
In practice it needs a single accountable owner, because the risk spans both teams: admins control the masking job and object-level rules, while analytics teams control dataflow schedules, recipes, and live connections. Splitting ownership without a shared runbook is exactly how the sequencing gap between masking and extraction goes unnoticed.