Salesforce Object Creation and Updates

Correlated makes it possible to create or update Salesforce Objects when Users or Accounts enter Playbooks. Here are some reasons why you might want to do so:

  • Keep your Salesforce instance clean for Sales Reps by only creating Accounts, Leads, and Contacts that have hit certain product thresholds
  • Transfer data over from Correlated to Salesforce to power views, workflows, or reports that live in Salesforce

It's easy to set things up, but there are some important implementation details to be aware of to make sure things will function in the way you expect. In this post, we'll cover both how to set up an action that creates Salesforce Objects and how our Salesforce Integration works.

Creating Leads, Contacts, and Accounts in Salesforce

  1. In order to get started with creating Leads, Contacts, and Accounts in Salesforce, you must first create a Playbook.
    1. Unlike solutions like Reverse ETL, Correlated does not continuously update all Leads, Contacts, and Accounts in batched jobs. Instead, Correlated triggers Object Creation when a User or Account enters a Playbook. A common Playbook to build might be to create a Lead or Contact when a User becomes a PQL.
  2. Once you've created a Playbook, you can add an Action to your Playbook to create an Object.
    1. Note: You can only create Contacts or Leads with User Playbooks, and Accounts with Account Playbooks.
1430
  1. Determine if you would like to create new Accounts/Leads/Contacts if no Salesforce Id is found or not. To only update when the Salesforce Id exists, leave this setting unchecked.
  1. If you are creating/updating a Lead, there will be an "Advanced Setting" where you can determine if you'd like to lookup existing Contacts before creating or updating a new Lead. If you check this setting, we will not create a new Lead if a Contact already exists.
  1. While configuring your Action, you can map Correlated fields to Salesforce fields (custom or standard). This means that when a User or Account enters a Playbook, Correlated will automatically create or update the correct object and also fill in the fields that you mapped.

❗️

You must map required fields or else the action will fail!

Your Salesforce administrator may have set up required API fields that you must map on Object Creation. We will, by default, show these fields and you must map these fields (and a matching dimension must be available in Correlated to use).

Salesforce Fields that are set by default by Correlated in the background will not display in the dropdown selector. Fields that are system fields or otherwise not update-able will also not display in the dropdown selector.

The fields that Correlated set are:

  • Email
  • Account Name
  • Salesforce Account ID
  • The Salesforce Field that maps to your Correlated Unique Account ID and Correlated Unique User ID

How to Check Your Required API Fields in Salesforce

  1. In Salesforce, select the Object type in question
3554
  1. In the upper-right corner, find the Setup dropdown menu and select "Edit Object"
678
  1. In the new view, find "Fields & Relationships" from the left-hand menu. Here, you should see a list of all fields for that specific Object.
3558
  1. Click into any of the fields and select "Edit"
3584
  1. Here, you'll see a "Required" checkbox under "General Options." If the Required option is selected, then this field will also appear in Correlated as required when creating or updating an Object via Playbooks.
3564 1852

How Correlated Maps Correlated Entities to Salesforce Objects

Creating a Lead

  1. Correlated identifies a User that matches the Playbook conditions
  2. If there is no dimension with the SFDC_LEAD, we skip with a message saying saying a configuration is missing.
  3. If the lookup contact toggle is true (default, see step 4 here) we will lookup contacts based on the entity's email / Contact ID (if it has one).
  4. If any contacts are found with those filters, we skip the rest of the logic below:
    1. If the entity has a Lead ID synced we will map all the fields and update the record in Salesforce.
    2. If the entity does not have a Lead ID synced and the create record toggle is set to true, we will create a new record in salesforce with the mapped fields. Upon successful record creation, we sync the returned Salesforce ID back the entity to avoid creating duplicate leads.

Creating a Contact

  1. Correlated identifies a User that matches the Playbook conditions
  2. If there is no dimension with the SFDC_CONTACT, we skip with a message saying saying a configuration is missing.
  3. If the entity has a Contact ID synced we will map all the fields and update the record in Salesforce.
  4. If the entity does not have a Contact ID synced and the create record toggle is set to true, we will create a new record in Salesforce with the mapped fields. Upon successful record creation, we sync the returned Salesforce ID back the entity to avoid creating duplicate contacts.

Creating an Account

  1. Correlated identifies an Account that matches the Playbook conditions
  2. If there is no dimension with the SFDC_ACCOUNT, we skip the action with a message saying saying a configuration is missing.
  3. If the entity has an Account ID synced, we will map all the fields and update the record in Salesforce.
  4. If the entity does not have an Account ID synced and the create record toggle is set to true (see step 3 here), then we will create a new record in Salesforce with the mapped fields. Upon successful record creation, we sync the returned Salesforce ID back the entity to avoid creating duplicate accounts.

Debugging Your Salesforce Actions

It's easy to figure out why certain Objects may not have been created simply by visiting the "Activity History" tab in your Playbook. This tab will show you all the successful Object Creations, as well as any associated failure messages.

2458