Synchronizing and leveraging Salesforce data in Front via rules

Overview

For many companies, Salesforce serves as their system of record, holding valuable information about accounts, contacts, opportunities, and more. However, all of this context is siloed and difficult to access where we need it most, in our inbox. In this article, you’ll learn how to synchronize your Salesforce contacts and leverage Salesforce data in Front via our API.

If a company uses Front’s Teams feature to create multiple workspaces, make sure contacts are synced to a Team that all users will have access to. For more information on how to create and manage Teams reference this help article.

Please note that Front’s Zapier integration does not support custom contact fields at this time. Additionally, there are a number of tools on the market, like PieSync, that can accomplish the functionality detailed below.

While this article exclusively covers how this can be accomplished for Salesforce, the concepts discussed can be applied to nearly any CRM (including home-built systems) with a publically accessible API.


Laying the foundation for contact syncing

Create a shared contact group

To create a single reference point for all Salesforce contact information across the entire company, create a Contact Group within your team workspace. This contact group will be leveraged in the following rule creation steps and can be utilized across both individual and team rules.

As a reminder, when you’re in the contact manager, make sure to click the ‘+’ icon next to the Team name and give the created group an easily identifiable name, like “Salesforce Contacts”.

Create the custom contact fields you need

While Salesforce may hold a lot of information about any given contact, not all of that information is necessary for Front. Our recommendation is to first think about what data you want to use in your automation, like “Acct Owner”, “Geography”, “Value”, etc, and then to create Custom Contact Fields in Front that map to each of those fields.


Syncing Salesforce Contacts using Front’s API

Initial contact upload from Salesforce

The first thing your development team is going to want to do is to sync Salesforce contacts over to Front. To accomplish this, your developers will pull the designated contacts via Salesforce’s API and use Front’s create team contact API endpoint to sync them over. Don’t forget to include the name of the contact group in your request.

You can also leverage the Contact Import in our UI for the initial synchronization to speed up your deployment.

Continued contact sync with Salesforce

Once your Salesforce contacts are created, you’ll want to stand up a system to ensure the data of those contacts in Front is accurate and maintained. The two things your system should accomplish are: 

  • Ensure when new contacts are created in Salesforce, those contacts are also created in Front using the create team contact API endpoint.
    💡 Front's API has contact duplication prevention built-in, so you'll get an error if you try to create a contact that already exists.
  • Ensure when contacts in Salesforce are updated that the respective Front contact is also updated. To do this your developer would need to use Front’s update contact API endpoint. While the update contact API calls for a contact_id, an alternative approach would be to pass through the contact's information using alt:{source}:{handle}. For example, your PATCH request could look like this: 
    https://api2.frontapp.com/contacts/alt:email:bob@gmail.com

A few points to consider in the sync logic above:

  • Be mindful of Front's API limit when determining how frequently you need this data up-to-date in Front. See "Limitations" here.
  • Only synchronize the data you need to prevent cluttering the contacts in Front and unnecessary overhead your system will be responsible for.
  • Be mindful of bulk updates to Salesforce since this could easily create more updates needed than can be efficiently handled. Marketing tools are notorious for bulk uploading and/or updating contacts by the thousands so in the same line as the first bullet, know our API limits and build them into your job.
  • Don't use all of your API traffic with this alone. This may or may not be the first piece of backend automation you're building with Front, but more than likely it won't be the last if you have other systems. Reserve some of your API volume for future usage or consider increasing your API limit as needed.
  • You can check your work via our API. If you want to be extra sure you're updating the right contacts or want to poll which contacts exist in Front in bulk and their fields, use the list contacts in group endpoint to get all the contacts in your Salesforce Contacts group first. This endpoint by default returns 50 contacts and their fields at a time so you'll need to paginate through the results. You can also specify a query parameter to return 200 at a time using the limit parameter. See the link above for more.

Leveraging Salesforce Data in Rules

Utilize rules in Front based on Custom Contact Fields

With your Salesforce data now living in Front, you can leverage these custom fields within your rule conditions. The key to success is to leverage the “If” condition that targets the newly created group “Salesforce Contacts”. In the example below, we leverage the group as a filter and a Custom Contact Field. This way, our rules engine knows even if a message is received in a personal inbox, to look at the team space version of the contact and its properties.


Looking for a simpler way to update conversations in Front based on external data or don't have a developer? Check out Assign a conversation based on the Salesforce account owner for some ideas.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 3 days agoLast active
  • 209Views
  • 1 Following