Troubleshooting DataMasker

Updated on March 22, 2024

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

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 it.

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.

Troubleshooting Internal Server Error Issues

“Getting error InternalServerError: Connection pool is shutting down: ConnectionPool2:InvalidJobState: Job has been set to terminal state”

This is a standard salesforce exception – ‘InvalidJobState’, which means the job state specified in a job update operation is invalid. Hence, it is set to a terminal state.

It has nothing to do with the DataMasker Application.
Users can ignore these types of errors because they will be fixed in the Retry Operation of DataMasker.

Resolution: To get more details about such types of exceptions, the user can raise a case with Salesforce.

Troubleshooting: How to fix the missing execution record issue while running DataMasker

Every time the ‘Run Masking’ button is clicked, DataMasker creates an Execution record. If the record is not getting created, it might be an issue with the session settings.

This issue can be due to the default organizational security settings that is set to ‘High Assurance’ value in the ‘Session Security Level Required at Login’ field.

Hence, the execution record is not being created when running DataMasker. To resolve this issue, follow the steps below:

Step 1: Change the value of the ‘Session Security Level Required at Login’ field in the System Admin Profile from ‘High Assurance’ to ‘None’ and save the settings.

Step 2: Navigate back to the configuration and click on the ‘Run Masking’ button. An execution record will now be created.

It is important to note that changing the ‘Session Security Level Required at Login’ field value to ‘None’ can have implications for session security settings.

Therefore, it is recommended to change the value back to its original setting after completing the DataMasker execution or consulting with the Security Team.

Following these steps should resolve the missing execution record issue when running DataMasker.

However, if the issue persists or if you have any further questions, please contact our support team for further assistance.

Masking of Task and Event

Datamasker has the ability to both delete and mask the task and event records. Through its functionality, Datamasker seamlessly deactivates and subsequently reactivates the history and feed tracking for fields that have been added for masking.

Notably in cases where users create custom fields within the events and tasks object and subsequently add to mask these fields and if history and feed tracking are enabled for these custom fields.

Datamasker will not deactivate or reactivate the history tracking and feed tracking for those custom fields that meant DataMasker will skip the deactivation and reactivation process for those custom fields on Task and Events.