Synchronizing and leveraging Salesforce or CRM data in Front via rules

Overview

For many companies, Salesforce (or other CRMs) serve as the 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 your inbox. In this article, you’ll learn how to synchronize your Salesforce (or other CRM) contacts and leverage that data in Front via our API.


Helpful to know

This workflow will require some technical development resources for your team. This article will provide some technical and non-technical details about how this workflow is accomplished. Note that there are third-party tools on the market like PieSync, that can accomplish the functionality detailed below should you not have these resources available to you.

👋 As Front migrates from a team-based contact model to a company-based contact model some of the information below may be outdated. For more on these changes please see here.

If your 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.

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 publicly accessible API.

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.


Laying the foundation for contact syncing

Create the custom contact fields you need

While your CRM 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, Acct Value, etc, and then to create Custom Contact Fields in Front for each of those fields.


Syncing Contacts using Front’s API

Historical contact upload

The first thing your development team may want to do is to sync your historicalSalesforce contacts over to Front. To accomplish this, your developers will GET the designated contacts via your CRM's API and then POST each record to Front's create team contact API endpoint.

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

Continued synchronization

Once your initial upload is complete, 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: 

  1. Creation of new records
    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.
  2. Update existing records
    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 push this data to Front. See here.
  • Only synchronize the data you need to prevent cluttering the contacts in Front and unnecessary overhead your system might create.
  • Be mindful of bulk updates to Salesforce since this could easily create a large batch of requests to Front. Similar to the point above, know our API limits and consider a queue-based approach rather than attempting to batch all requests over a short span of time.
  • Leave yourself API bandwidth. While this may or may not be the first piece of backend automation you're building with Front, it more than likely won't be the last if you have other systems you might integrate. Reserve some of your API volume for future usage or consider increasing your API limit as needed.
  • 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 already, use the list contacts endpoint to see which contacts exist and what data is already stored. This endpoint returns 50 contacts and their fields at a time so you may need to paginate through the results.

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. In the example below, we leverage a contact group as a filter and a Custom Contact Field.

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 3 mths agoLast active
  • 651Views
  • 2 Following