Using the process builder to write Clearbit data to a lead/contact/account

By default Clearbit will overwrite blank standard fields or those with the value [[unknown]] on leads/contacts/accounts, but what if you want to overwrite non-standard fields or even your existing manually entered data?

For that we'll use Salesforce's built-in Process Builder. This is great if instead of [[unknown]], you use a different placeholder ([not provided], NA, etc.). You can even set up custom rules to overwrite bad data (i.e. overwrite with Clearbit data if address info is incomplete, etc.). This can get as sophisticated as you'd like, but we'll keep it simple for this demo.

1. Start the Process Builder

You'll find the Process Builder by heading to Setup -> Create -> Workflow & Approvals -> Process Builder. Click the New button to get started. You'll need to create a new process for each field that you want to overwrite for this particular use case, luckily Salesforce provides a clone function, which speeds things along.

 2. Add an object and set the trigger

You'll want to start by adding an object. In this case, we'll set the object to Contact, and make sure to start the process when a record is created or edited.

3. Add your criteria

Click the Add Criteria button. We'll next want to specify when to enrich the record. 

The first step is to check that the Clearbit (cbit__Clearbit__c) field is populated, indicating that an associated Clearbit record has been created.

The ClearbitReady field indicates when a Contact is done being enriched, so we'll need to make sure ClearbitReady = True.

You'll also want to make sure that Clearbit has data for the field you are overwriting and what value you want to overwrite. For this example, we'll be overwriting the Last Name, so you'll set the field to Clearbit > Family Name, the operator to is null and the value to false.

4. Set your Actions

Click the Add Action button. This is where you actually overwrite the field.

  1.  Set the action type to "Update Records"
  2.  Name the Action
  3.  Set the Record type to "Select the Contact record that started your process"
  4. Then you just want to set the field you want to overwrite on the Contact with the Clearbit data. That looks like - 

That's all there is to it, activate and you're good to go. :)