Troubleshooting DataMasker

Identify Bulk Job Exceptions

DataMasker uses Bulk API 2.0 to mask records. Sometimes records being updated by Bulk Job can fail because of an underlying exception. Bulk API 2.0 provides REST endpoints that allow admins to fetch a raw response that shows exception records. Here are the steps to get the exception raw response.

Identify Bulk Jobs with errors

	pcldm__Type__c = 'Bulk Job Id'
	AND pcldm__Records_Errored__c > 0
	AND pcldm__Execution_Log__r.pcldm__Execution__r.Name='Execution-XXXX'

Update Execution-XXXX with the name of your execution. This SOQL will return the Bulk Job ID in the 2nd column( pcldm__Entity_Id__c). Make a note of these Bulk Job IDs, we will need them in the next step.

Login to

Use your Salesforce credentials and select the latest API version from the drop-down.

Once you are in the workbench, navigate to Utilities->Rest Explorer and execute the REST endpoint as shown below

Example: Rest Call


Note: Update the version from v56.0 to the latest one and replace the ‘750DE000006dnTH’ with your Bulk Job ID

Generate Exception Logs

Data masking is a complex operation and can run into issues because of a variety of reasons- Data, Metadata, and Salesforce Platform limitations. DataMasker has a way to capture exceptions in a custom object. This functionality only needs to be enabled, if Cloud Compliance support requests so.

Here are the steps:

Step 1: Search Custom Metadata Type

In your Salesforce Org, search for “Custom Metadata Types”

Step 2: Update Metadata Value

Click on ‘Manage Records’ for ‘DM App Config’

Click on the ‘Edit’ link

Update the value to “True”

The value of ‘Label Capture_Exceptions’ is now successfully set to “True”. This means DataMasker will now capture metadata exceptions.