--- name: platform-datamask-run description: "Data Mask end-to-end operation on a sandbox: configure a masking policy over PII, run the masking job, poll it to completion, report masked-record results, and abort an in-progress run. Use when the user needs to run, monitor, or cancel a Salesforce Data Mask job, mask PII/sandbox data, or work with DataMaskPolicy / DataMaskPolicyJobRun. TRIGGER when: user runs a data mask job, masks sandbox PII, polls masking status, reports masked records, or aborts a running mask. DO NOT TRIGGER when: writing anonymization Apex by hand (use platform-apex-generate), generating test data (use platform-data-manage), or deploying unrelated metadata (use platform-metadata-deploy)." metadata: version: "1.0" domains: ["Platform"] minApiVersion: "67.0" relatedSkills: - "platform-apex-generate" - "platform-data-manage" - "platform-metadata-deploy" cliTools: - tool: ["python3"] semver: ">=3.10.0" - tool: ["sf"] semver: ">=2.0.0" accessCheck: - type: userPerm value: PermissionsManageDataMaskPolicies - type: userPerm value: PermissionsAccessDataMaskAndSeed --- # platform-datamask-run: Salesforce Data Mask End-to-End Operation Use this skill to **operate** the Salesforce Data Mask feature on a **sandbox**: configure a masking policy over PII fields, start a masking job, poll it to a terminal state, report which records were masked, and abort a run that is still in progress. Data Mask is **sandbox-only** — the run/abort REST endpoints return `403` on production (a runtime sandbox guard). Confirm the target org is a sandbox before starting. ## When This Skill Owns the Task - Running a Data Mask job against a configured policy - Polling masking-job status to completion - Reporting masked-record counts / per-object results - Aborting (canceling) an in-progress masking run - Creating or identifying the policy the job runs against Delegate elsewhere when the user is: - hand-writing anonymization Apex → `platform-apex-generate` - seeding or generating test data → `platform-data-manage` - deploying unrelated metadata → `platform-metadata-deploy` --- ## The One Thing to Get Right First: the API surface map The single biggest failure mode is assuming Data Mask entities are ordinary data-API objects. **They are not, and the surface differs per entity.** Memorize this table before running anything — guessing here is what turns a 3-second job into a 30-minute dead end. | Entity | What it is | How you reach it | |--------|-----------|------------------| | `DataMaskPolicy` | The masking policy shell (config) | **Tooling API** or **Metadata API** (thin shell: `