Salesforce Sync

Sync your Salesforce data with your Toggl Track Workspace to measure time spent on Salesforce items.

Veljko avatar
Written by Veljko
Updated over a week ago

Table of contents

Whether you're a Salesforce user looking for insights on how your team spends their time, or you're already using Salesforce with Toggl Track, this integration will help you. With this integration, you can automate the organization of your Toggl Track Workspace so your team can track time without having to manually create new Projects, Tasks, Clients, and/or Tags.

Toggl Track's native integration with Salesforce can be enabled via the Native Integrations page. This integration will automatically sync data from Salesforce into Toggl Track and update it within Toggl Track when anything changes on the Salesforce end.

Right now, Toggl Track can only bring in data from Salesforce. It cannot send data to Salesforce from Toggl Track. But if you're interested in helping make Toggl Track better, please let us know what you'd like to see here.

ℹ️ Note that this integration:

  • Is only available for users in an Organization or Workspace that is subscribed to a Toggl Track Premium plan.

  • Only supports Salesforce editions with access to the Web Services API, such as:

    • Enterprise edition of Service Cloud or Sales Cloud

    • Unlimited edition of Service Cloud or Sales Cloud

    • Professional edition of Service Cloud or Sales Cloud (at an additional cost)

  • Integrations with Salesforce are not currently supported on the Essentials edition.

Do you prefer to watch video guides? We've got you covered!

If you prefer a text and screenshot guide, read on!

What is Salesforce, anyway?

In a nutshell, Salesforce is an online solution for customer relationship management, or CRM. It gives all your departments — including marketing, sales, commerce, and service — a shared view of your customers with one integrated CRM platform. Find out more at

What can I sync from Salesforce?

First, let's get some background on how your Salesforce data is structured.

In Salesforce, your data is organized using objects. These objects can be anything from accounts to cases and contacts, and are often related in different ways. A record in Salesforce is a single instance of an object. For example, if the object is "Account," a record might be "Acme Inc." or "Stark Industries." Another object, "Contact," might be related to the "Account" object. So you can have multiple Contact records (e.g. "Tony Stark" and "Pepper Potts") related to an Account record (e.g. "Stark Industries").

When setting up your Salesforce integration, you can link Toggl Track Projects, Tasks, Tags, and Clients to Salesforce objects (including Custom Objects). For each record in the relevant Salesforce object, the integration will create a corresponding item (or link to an existing item) in Toggl Track. For example, if you connect Salesforce Accounts to Toggl Track Projects, the integration can create Projects in Toggl Track called "Stark Industries" and "Acme Inc."

Whenever you add or change records in Salesforce, the integration will create or update information in Toggl Track. For example, say a few weeks after setting up the integration you add a new Account record in Salesforce, "Pied Piper." A new Project will be automatically created in Toggl Track from this new Salesforce record. If you make changes to a record in Salesforce that affects the name of the synced item in Toggl Track, the integration will rename the item in Toggl Track.

Enabling and setting up Salesforce Sync

To get started, head over to your Integrations page and click the toggle next to Salesforce Sync. Then hit the 'connect' button to get started!

ℹ️. Note: We recommend testing this integration in a new Workspace if you already have an existing Toggl Track Workspace with data in it. This is to ensure that data is created the way you intended, and you can easily delete the Workspace if it doesn't sync correctly. Simply create a new Workspace using our Premium trial plan, and continue with the following steps. Once your test is successful, you can use the same setting settings with your main Toggl Track Workspace.

First, you'll need to give us permissions to access your Salesforce account (we can't do much without that; see our privacy policy for more details here).

Once you're authenticated, continue with the set up. Our setup wizard will guide you through the process. And this article will guide you through the setup wizard!

Step 1: Create connections

Make sure the correct Salesforce URL appears on this screen, and add a connection via the big, pink button (it's hard to miss).

You have two options here:

  1. Add a connection for your whole Workspace.

    • This means that everyone in your Toggl Track Workspace will have access to the Projects, Tasks, Clients, and/or Tags that this connection syncs from Salesforce. In Toggl Track, all Clients and Tags need to be visible to everyone in your Workspace, so you can only sync to these two using this whole Workspace connection.

  2. Add a connection for specific users/teams.

    • Using this option, you can specify specific users[link] or teams[link] within your Toggl Track Workspace that will have access to the Projects and Tasks that this connection syncs from Salesforce. Any Toggl Track Workspace team member who is not selected as part of this step will not be able to see the Projects/Tasks created by this connection. Currently in Toggl Track, it's not possible to limit Clients or Tags to specific users, so syncing to these is not available with this option.

For the purposes of this guide, let's go with a whole Workspace connection. Select Whole Workspace and click next.

Here is where you pick the objects from Salesforce that should be synced to Toggl Track. You can sync Salesforce objects as Projects, Tasks, Tags, and/or Clients – and note that each one is optional! For example, you could just sync Salesforce Accounts to Toggl Track Clients and continue with the setup from there. Or as another example you could sync Accounts to Projects, Opportunities to Tasks, Contacts to Clients, and Products to Tags.

Let's start by syncing Salesforce Accounts to Toggl Track Projects. Click + Add Connection next to Projects.

Because we want to sync Salesforce Accounts as Projects, find Account from this list.

In this next step, you'll use fields from the Salesforce object to tell Toggl Track how to name each new imported opportunity. Fields are different kinds of data for each object that help define it – in this case, an Account has an ID, a name, a stage, and amount, and so on.

ℹ️. Note: In Toggl Track, names need to be unique. You can't have two projects with the same name. When naming your synced items, make sure there's no chance that two will have the same name.

Let's use the Account Name and Account Number fields to name the Projects in Toggl Track. This means that when a new project is created, it will be named like:

[account name] [account number]

for example,

Edge Communications CD451796

Once you set up how new Projects should be named, you'll have the optional step of filtering which Salesforce objects are synced. If you want to sync ALL of your chosen Salesforce objects, skip this step. If you only want to sync SOME of the Salesforce objects, simply pick the field you want to filter by, and the value that the filter should match. (This value is case sensitive, and matches exactly, so be careful here!) In this example, we'll only sync Salesforce Accounts where the Active field is set to Yes.

ℹ️. Note: You can dynamically import records where e.g. the account creation date is greater than a certain date! To do this, set up a formula field in Salesforce for the object you're importing, and make sure the resulting field returns a fixed value. We list some examples at the end of this article!

Next, let's add a connection for Tasks. In Toggl Track, Tasks are related to Projects. The same needs to be true when syncing data from Salesforce, so we only show you Salesforce objects that have a relationship with the object you're syncing as Toggl Track Projects. In this case, we're syncing Accounts as Projects, so only Salesforce objects that are related to Accounts are shown. Let's pick Opportunity from this list.

In our example Salesforce setup, Opportunities are related to Accounts via the Account ID field on each opportunity. If there are multiple fields that link objects, you'll be able to pick the field which defines which parent project (e.g. Account) to put the task in.

Here, let's use the name and order number to name the Tasks in Toggl Track. As an example, one Task will be named Edge Emergency Generator 731645.

We can go through this same process for Tags and Clients – here's what our screen looks like afterwards:

Click 'Finish' when you're happy with how this looks!

Here, you have the option of adding another connection for specific users/teams (if you just created a Workspace-level connection). Or, if you just added a connection for specific users/teams you'll be able to add another specific connection, or a Workspace-level connection.

When you've finished adding connections, continue on to Step 2.

Step 2: Handle duplicates

Whew! That last step was a long one. Don't worry, it's pretty smooth sailing from here.

In this step, you need to decide what the integration should do if it encounters a duplicate. That is, if it tries to create a Project, Task, Tag, or Client in your Toggl Track account but there's already something there with the same name. Remember, each item in Toggl Track must have a unique name.

In order to understand this better, let's consider a scenario using the example data from the previous step. Let's say the integration finds an Account in Salesforce with the Account Name Stark Industries and the Account Number CD451796. You've set up the name to be [Account Name] [Account Number], so the integration tries to create a project called Stark Industries CD451796. However! By some cruel twist of fate you already have a Project in Toggl Track called Stark Industries CD451796. What should the integration do?

Here are your three options explained using this example.

  1. Connect Toggl Track data with data from Salesforce. If you pick this option, the integration will create a link between this Salesforce Account record (i.e. Stark Industries) and the Toggl Track Project called Stark Industries CD451796. Any existing data in Toggl Track (tasks, time entires, etc.) will be kept as-is. And any future changes made in Salesforce to e.g. the Account name will be synced with Toggl Track.

  2. Overwrite Toggl Track data with data from Salesforce. With this option, the existing project in Toggl Track called Stark Industries CD451796 will be archived. Tasks associated with this project will also be archived. Any time entries associated with this Project will not be deleted, but the Project (and associated data) will be stripped from the time entries. The integration will then create a new project called Stark Industries CD451796. (Note that in the case of Projects, Tasks, and Clients, these will be archived. Duplicate Tags will be deleted.)

  3. Dismiss duplicate data from Salesforce. If you pick this option, when the integration sees that there is already a project called Stark Industries CD451796 in your Toggl Track account, it simply won't do anything. Note that this also means that any Tasks that would be created in this Project based on the connections you set up would also not be created in Toggl Track.

ℹ️. Note: There are some cases that aren't covered by these three scenarios. In these cases, the integration will pause syncing and display a notification within the Integrations tab in Settings explaining what should be done to fix the issue. An admin in your Toggl Track Workspace can then fix the problem outlined in the notification and re-enable syncing.

When you're satisfied with whichever option you picked, continue on to the next and final step.

Step 3: Preview

This step is easy! But important. Here, check your connections and duplicate options to make sure everything looks ok. You can always go back and make changes if necessary. As we mentioned earlier, we recommend that you test this integration in a new Workspace to make sure the data is synced like you expected.

When you're satisfied that everything looks good, finish the setup and enjoy your new Salesforce Sync integration! Your data will begin syncing right away.

When data stats syncing you may navigate away from the page. It’s not necessary for the Integrations page to be active in order for the data to keep syncing.

❗️ Important notes:

  • If you experience issues connecting to Salesforce, please check if your Salesforce user account and workspace have proper access to the Salesforce API, or remove the authentication and set it up again.

  • Toggl Track entities will be periodically auto-synced with configured Salesforce objects.

  • Any projects created using the Salesforce Sync integration will have the default billing setting for your workspace – you can change this setting here. Changing this setting will not affect projects that have already synced from Salesforce.

Advanced: using Salesforce formula fields to have greater control of data

We touched on this briefly, but one of the coolest things you can do with this integration is to use Salesforce formula fields.

ℹ️. Note: When you add a new formula field (or any field) in Salesforce, you will need to remove the Salesforce Sync integration from your Toggl Track workspace, and re-add it (including re-authenticating) to see the new field.

Here are some ways you can use it:

Filter incoming records by multiple fields

The Salesforce Sync integration lets you filter synced Salesforce records, so that records are only synced when a field exactly matches the value you provide. But what if you wanted to filter by multiple fields? Here’s an example:

1. Say you want to make sure a synced record has the Active field set to TRUE, and the Plan field set to Enterprise.

2. Define a formula custom text field named “Toggl Track sync” that returns ‘yes’ if both the Active and Plan fields match your requirements, and ‘no’ if they don’t. It might look something like:

IF( AND( TEXT(Active) = "TRUE", TEXT(Plan) = "Enterprise"), "yes", "no")

3. In the filter step, make sure to sync only Accounts where the “Toggl Track Sync” field has the value of “yes”.

Filter incoming records other than exact match

If you wanted to filter records where a field is ‘greater than’ a certain value? Enter: formula fields. Here’s an example of how you can get around this:

1. Say a Salesforce object "Account" comes with a "Created Date" field, and you'd like to only import Account records where this field is greater than a certain date.

2. Define a formula custom text field named "Recently created" that returns "new" if "Created Date" occurred after "2021-08-29" and "old" otherwise. Using this advanced formula in the field formula editor:

IF( DATEVALUE( CreatedDate ) > DATE(2021,08,29) , “new”, “old”)

3. In the filter step, make sure to sync only Accounts where the "Recently created" field has the value of "new".

Build custom names for synced records

Similarly, if you’d like to use a different separator between field names, or want to format text, you could use formula fields for this! Here’s an example:

1. Say you’d like to create projects in Toggl Track using the name and account number fields from Salesforce Account records, but you’d like them to be separated by an underscore rather than a space.

2. Define a formula custom text field named “Toggl Track Name” that builds the name exactly like you want it. In this case we can use the simple formula option, which could look something like:

Name & AccountNumber

3. In the naming step, make sure you pick only the field “Toggl Track Name” to define how Toggl Track should name newly created projects.

Need further help? Contact our Support Team via the chat icon in the bottom right corner!

Did this answer your question?