Custom Libraries Overview
Custom libraries are user-defined collections of values that you can use to mask text or email fields in a masking policy.
Required Editions
| Available in: Lightning Experience |
| Available in: Professional, Enterprise, Unlimited, and Developer Editions with the Salesforce Data Mask add-on license. |
Custom libraries are collections of user-defined values, such as city names, email addresses, or surnames, that you can use in a masking policy to mask field data.
- Within each custom library, all its values are of the same content type, either String or Email.
When configuring masking policies, you can select an activated custom library for the masking of any object field, given that the field’s type is compatible with the selected custom library’s content type.
Compatibility:
- String type custom libraries work with Text and Long Text Area type fields
- Email type custom libraries work with Email type fields
When configuring a masking policy, you can select a custom library in the Mask With field of each object field you want to mask. During a masking job using that policy, Data Mask and Seed selects a value from the specified custom library to mask the designated object field.
For example, to mask a custom Comments field with non-sensitive recreational activities, create a custom library named Sports and Outdoors and populate it with entries like Lacrosse, Volleyball, Field Hockey, Kayaking (ocean), Kayaking (lake), Yoga, Skiing (cross-country), Skiing (downhill), Rock Climbing, Horseback Riding, Golf (18-hole), Football, and Figure Skating. You could also create another custom library named Fake Email Addresses and populate it with invented email addresses like ppqq@shoosvassen.org, topgun1@actionmovies.com, singlemalt@geo-distillery.com, q55@ask-me-something.org, and healthtips@pubhealth.gov.uk. (These domains are fictional examples.)
When creating or updating a custom library, you can either manually add values or use Einstein to generate realistic values and automatically add them to the library. For details, see Use Einstein to generate and add values to a custom library.
- Custom Libraries Tab
Use the Custom Libraries tab to view, create, edit, activate, and delete custom libraries for masking policies. - Working with Custom Libraries
Define new custom libraries, and edit existing custom libraries.

