Import historical Time Tracking data into Salesforce
Contents
Overview
This document describes how to import data to the Time Tracking app’s objects in Salesforce.
Import Time Tracking data by importing records of the following object types:
Rate Card and User Rate Card imports are optional. However, if you need to track billable time, you must import Rate Cards before you import Time Tracking Summaries.
Rate Card (optional) - Identifies a billable rate for the tracked time. See Rate Cards for more information.
User Rate Card (optional) - Links Rate Card and User records, effectively enabling specific rates for specific Users. See Rate Cards for more information.
Time Tracking Summary - Tracks the rate, number of hours, and a summary of the tracked time.
Time Tracking (optional) - Tracks start times and end times.
Walkthrough
Follow these steps to import data to the Time Tracking app’s objects in Salesforce.
Create an Import Tag field on each object
Before importing data, we recommend that you create a Text field on each object to which you are loading data to identify imported records. This field can be used to filter records in Reports or otherwise.
On each object to which you are importing data, create a field with the following properties:
Type: Text
Label: Import Tag
Name: (leave default or set to the desired value)
Length: 255
Permissions: At a minimum, grant
Read
andEdit
permissions to the System Administrator Profile, or grant those permissions to the Permission Set(s) of your choice.Page Layouts: The field doesn’t need to be added to any Page Layouts, but you can add it to the layouts of your choice, if desired.
Choose a data loading tool to import data
To import Time Tracking data into Salesforce, you can use your preferred data loading tool. Examples include the following:
Import Rate Cards
Perform an Insert
operation to create Rate Card (TTracking__Rate_Card__c
) records in Salesforce. Rate Cards store the billable rate for the tracked time. See Rate Cards for more information.
The table below lists the columns that should be in the data file you are importing, as well as the Salesforce fields to which the columns should be mapped.
File Column | Salesforce Field | Field Type | Description | |
---|---|---|---|---|
1 |
|
| Text(80) | The name of the Rate Card |
2 |
|
| Long Text Area(131000) | A description of the Rate Card |
3 |
|
| Currency(16, 2) | The hourly rate for the tracked time |
4 |
|
| Text(255) | A value that uniquely identifies the import (not a unique identifier for each row). Populate all rows with the same value. |
Import User Rate Cards
Perform an Insert
operation to create User Rate Card (TTracking__User_Rate_Card__c
) records in Salesforce. User Rate Cards link Rate Card and User records, effectively enabling specific rates for specific Users. See Rate Cards for more information.
While not referenced in subsequent imports, validation exists in the Stopwatch that prevents a Rate Card from being selected for a Time Tracking Summary if the current User doesn’t have a corresponding User Rate Card for the Rate Card.
Before importing User Rate Card records, the Salesforce IDs of the User and Rate Card records must be exported from Salesforce so they can be added to the data import file. You can also find the IDs of the Rate Card records in the Success file from the previous Rate Card import.
The table below lists the columns that should be in the data file you are importing, as well as the Salesforce fields to which the columns should be mapped.
File Column | Salesforce Field | Field Type | Description | |
---|---|---|---|---|
1 |
|
| Lookup(User) | The Salesforce ID of a User record. Each User Rate Card must be related to one User record. |
2 |
|
| Master-Detail(Rate Card) | The Salesforce ID of a Rate Card record. Each User Rate Card must be related to one Rate Card record. |
3 |
|
| Checkbox | Populate the cell with |
4 |
|
| Text(255) | A value that uniquely identifies the import (not a unique identifier for each row). Populate all rows with the same value. |
Import Time Tracking Summaries
Perform an Insert
operation to create Time Tracking Summary (TTracking__Time_Tracking_Summary__c
) records in Salesforce. Time Tracking Summaries store the rate, number of hours, and a summary of the tracked time.
Before importing Time Tracking Summary records, the Salesforce IDs of the Account, User, Rate Card, and Second Lookup records (the records to which the Time Tracking Summaries will be related, such as Opportunities, Cases, etc.) must be exported from Salesforce so they can be added to the data import file.
The table below lists the columns that should be in the data file you are importing, as well as the Salesforce fields to which the columns should be mapped.
File Column | Salesforce Field | Field Type | Description | |
---|---|---|---|---|
1 |
|
| Master-Detail(Account) | The Salesforce ID of the parent Account record. Each Time Tracking Summary record must be related to one Account record. |
2 | Second Lookup (see Description column) | Varies (see Description column) | Lookup(Varies) (see Description column) | In addition to being related to one Account record, each Time Tracking Summary record can also be related to one other record, known as the Second Lookup record. For each row in the import file, choose a Lookup Relationship field on the Time Tracking Summary object. If the Lookup Relationship field doesn’t already have a column in the import file, add a new column to the file. The field’s API Name should be the column name. Enter the Salesforce ID of the related record in the column. For example, to relate Time Tracking Summaries to Opportunity records, add a column named |
3 |
|
| Checkbox | Set all rows to |
4 |
|
| Lookup(Rate Card) | The Salesforce ID of a Rate Card record. Sets the billable rate for the tracked time. |
5 |
|
| Lookup(User) | The Salesforce ID of the User record for the person who tracked the time. |
6 |
|
| Date | The date the time was tracked. |
7 |
|
| Long Text Area(32768) | A summary of the tracked time. The label of the field in Salesforce is Summary of Time Worked. |
8 |
|
| Number(16, 2) | The number of hours that were tracked. |
9 |
|
| Text(255) | A value that uniquely identifies the import (not a unique identifier for each row). Populate all rows with the same value. |
Import Time Tracking records (optional)
This step is optional. If you would like to import the start and end times for each interval of tracked time, follow the steps in this section.
Perform an Insert
operation to create Time Tracking (TTracking__Time_Tracking__c
) records in Salesforce. Time Tracking records store the start times and end times for a Time Tracking Summary record.
Before importing Time Tracking records, the Salesforce IDs of the Time Tracking Summary records must be exported from Salesforce so they can be added to the data import file. You can also find the IDs of the Time Tracking Summary records in the Success file from the previous Time Tracking Summary import.
The table below lists the columns that should be in the data file you are importing, as well as the Salesforce fields to which the columns should be mapped.
File Column | Salesforce Field | Field Type | Description | |
---|---|---|---|---|
1 |
|
| Master-Detail(Time Tracking Summary) | The ID of the parent Time Tracking Summary record. Each Time Tracking record must be related to one Time Tracking Summary record. |
2 |
|
| Date/Time | The date/time the work/tracked time began. |
3 |
|
| Date/Time | The date/time the work/tracked time ended. |
4 |
|
| Text(255) | A value that uniquely identifies the import (not a unique identifier for each row). Populate all rows with the same value. |
Create Reports to view imported data
Once all data imports have been completed, follow these steps for each object to which you imported data, which describe how to create a Report showing the imported data:
In the Reports tab in Salesforce, click New Report.
In the Create Report modal, select the appropriate Report Type based on the object(s) on which you are reporting. For example, to create a Report for the imported Time Tracking Summaries, select the Accounts with Time Tracking Summaries Report Type.
In the Report Builder, remove all existing Filters.
Add a Filter to the Report:
Field: Import Tag (the field you created for an earlier step)
Operator: contains
Value: Enter the value that you specified in the
Import_Tag__c
(or similar) column in the import file.
Add the desired columns to the Report.
Save the Report.
Run the Report.
Related content
Time Tracking is built by C323 and powered by Salesforce.