Return to site

Contacts transition companies all the time and when you find out what do you do in Salesforce? The wrong answer is to just delete them.


Before we get too far into the blog post, if you want to skip all of it and just install the App directly then awesome!


Here’s the Unmanaged package:


Contact – No longer at Company V1.0


If you want to learn how to build this yourself, continue on!

There are some ways that would help identify these contacts without deleting them. One of them is to create a checkbox on the contact record that states that the contact is no longer active with that account. You can also place this checkbox just under the contact name so that it would be clear for the end-users. Another idea is to add a Status picklist field that has “Active” and “Inactive” options and that should always default to “Active” unless someone chooses the other choice. You’d use this option if you have more than two options to track. For example, “On Leave” could be something you need to track but most companies aren’t getting that granular with their relationships and therefore a simple checkbox is used in our example.

Either the checkbox field or the picklist field can be the criteria to trigger an automation tool to stop any usual activity that happens with the active contacts. You can also set the automation tool to update the last name of the Contact and add to it “ – No Longer in the Company” text at the end. Moreover, if you usually send emails to the Contacts you can set the automation tool to check the “Email Opt out” field to be sure that the inactive contacts will not receive those emails anymore. The same with any open tasks for the record of that contact, the automation tool can simply end the task. Another method is to add a quick action on the contact object to update the checkbox you created previously.

With any of these ideas , you will be able to report on the Inactive Contacts without the need to delete them. That way you will have clean data and clear history.

Here is how to build Process Builder and Quick Action included in the Package above :

A Process Builder that updates the “Email Opt out” field and the contact’s last name.

  1. Create a “No Longer at company” Custom field or Picklist depending on your requirements
  2. Create a new Process Builder with
  3. Set it to Trigger on the Contact object
  4. Enter your entry criteria according to your requirements (i.e. No Longer at Company = True)
  5. Add the first immediate action to update on the Contact object with updating with no entry criteria and updating the Email Opt Out field to True
  6. Add the second immediate action to update the Contact object with the Last Name field with appended text formula.


    [Contact].LastName ,
    [Contact].LastName ,
    [Contact].LastName +
    ” – No Longer at the Company”

  7.  Activate your new Process Builder and move on to adding the quick action.

Quick Action that checks the “No Longer at the Company” field

  1. Go to Setup > Object Manager > Contact > Buttons, Links, and Actions
  2. Create a new Action called No Longer At Company to Update a Record as the Action Type.
  3. Click New under the Predefined Values section and add a formula value of True to the No Longer at Company field.
  4. Click the Edit Layout button and make sure that the No Longer at Company field is on the layout and any other fields you want to add to this quick action layout.
  5. Add this Quick Action to relevant page layouts and you’re all set!