• Emily Malone

GDPR tip: How to create Individual records in Salesforce

With the GDPR being just days away now, I felt we should give some glory to a new object that the guys over at Salesforce HQ have kindly graced us with — ‘Individual’. With Individual records, you can easily track and store your customers’ data preferences. This new standard-object was rolled out in Spring ’18 to all editions of Salesforce to prepare for The GDPR, and can be enabled in just a couple of clicks. 

Once the feature is enabled, you can just add the new ‘Individual’ field to Lead, Contact, or Person Account page layouts to link directly to their individual record, which looks like this:


Out of the box, you have the following fields on the individual object:

  1. Salutation

  2. First Name

  3. Last Name

  4. Suffix

  5. Birthdate

  6. Block Geolocation Tracking

  7. Don’t Process

  8. Don’t Profile

  9. Don’t Solicit

  10. Don’t Track

  11. Export Individual’s Data

  12. Forget This Individual

  13. Individual’s Age

  14. OK to Store PII Data Elsewhere.


The best part? This object is completely customisable. You can add your own fields to track as many specific data preferences as you need, as well as restricting specific fields to certain users using field-level security. Plus, you can automate processes surrounding data preference records too, whether you want to run a specific Apex trigger when ‘Forget this individual’ changes, or whether you want to send an email to your customers’ account manager when any of their preferences change. To help your users understand what ‘Individual’ records actually hold, you can also rename the ‘Individual’ field to something more meaningful, if you wish.

Automatically create Individual records

As it stands, Individual records have to be created manually when you create a Lead, Contact, or Person Account — this could be fixed with a simple Apex trigger. Unfortunately, Individual records aren’t supported by Process Builder, and you can’t have any custom record types… but I’ve decided to be really kind and provide you with a sample Apex trigger that you can use to automatically create Individual records when a Contact is created — see below:

////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // Sample Contact Trigger ////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // Written by Oli Freeman @ oe:gen Limited // Date: 17/05/2018 ////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

trigger ContactInsertTrigger_IndividualCreation on Contact (after insert) {

    //Map of Id to Individual – this will allow us to store the contact Id against the new Individual record, //and then to update the contacts with the Individual Id once they’ve been created

    Map<Id, Individual> createTheseIndividuals = new Map<Id, Individual>();

    List<Contact> theContacts = new List<Contact>();

    //FOR loop to run through Contact records in trigger.new

    for(Contact c : trigger.new){

        createTheseIndividuals.put(c.Id, new Individual(FirstName = c.FirstName, LastName = c.LastName, Salutation = c.Salutation));


    //Insert the values (individuals) in the createTheseIndividuals map

    insert createTheseIndividuals.values();

    //Another FOR loop to update the contact with the Individual Id

    for(Contact c : trigger.new){

        Contact theContact = new Contact(Id=c.Id);

        theContact.IndividualId = createTheseIndividuals.get(c.Id).Id;



    //DML to update the contacts in theContacts

    update theContacts;