/
Import historical Time Tracking data into Salesforce

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.

  1. Rate Card (optional) - Identifies a billable rate for the tracked time. See Rate Cards for more information.

  2. User Rate Card (optional) - Links Rate Card and User records, effectively enabling specific rates for specific Users. See Rate Cards for more information.

  3. Time Tracking Summary - Tracks the rate, number of hours, and a summary of the tracked time.

  4. 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 and Edit 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

File Column

Salesforce Field

Field Type

Description

1

Name

Name

Text(80)

The name of the Rate Card

2

TTracking__Description__c

TTracking__Description__c

Long Text Area(131000)

A description of the Rate Card

3

TTracking__Rate__c

TTracking__Rate__c

Currency(16, 2)

The hourly rate for the tracked time

4

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

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

File Column

Salesforce Field

Field Type

Description

1

TTracking__User__c

TTracking__User__c

Lookup(User)

The Salesforce ID of a User record. Each User Rate Card must be related to one User record.

2

TTracking__Rate_Card__c

TTracking__Rate_Card__c

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

TTracking__Default_Rate_Card__c

TTracking__Default_Rate_Card__c

Checkbox

Populate the cell with True if this Rate Card should be set as the default Rate Card for this User. Otherwise, populate the cell with False.

4

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

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

File Column

Salesforce Field

Field Type

Description

1

TTracking__Account__c

TTracking__Account__c

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 TTracking__Test_Opportunity_Look_up__c to the import file and populate the column with the Salesforce IDs of Opportunity records. You can add as many Second Lookup columns as you would like and can choose which rows relate to which Second Lookup records. Remember though, each Time Tracking Summary should be related to only one Second Lookup record.

3

TTracking__Active__c

TTracking__Active__c

Checkbox

Set all rows to False. Active Time Tracking Summaries appear in the Stopwatch.

4

TTracking__Rate_Card__c

TTracking__Rate_Card__c

Lookup(Rate Card)

The Salesforce ID of a Rate Card record. Sets the billable rate for the tracked time.

5

TTracking__Entered_For__c

TTracking__Entered_For__c

Lookup(User)

The Salesforce ID of the User record for the person who tracked the time.

6

TTracking__Log_Date__c

TTracking__Log_Date__c

Date

The date the time was tracked.

7

TTracking__Description__c

TTracking__Description__c

Long Text Area(32768)

A summary of the tracked time. The label of the field in Salesforce is Summary of Time Worked.

8

TTracking__Hours_Number__c

TTracking__Hours_Number__c

Number(16, 2)

The number of hours that were tracked.

9

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

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

File Column

Salesforce Field

Field Type

Description

1

TTracking__Time_Tracking_Summary__c

TTracking__Time_Tracking_Summary__c

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

TTracking__Start_Time__c

TTracking__Start_Time__c

Date/Time

The date/time the work/tracked time began.

3

TTracking__End_Time__c

TTracking__End_Time__c

Date/Time

The date/time the work/tracked time ended.

4

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

Import_Tag__c (or whatever you named the Import Tag field you created in the earlier step)

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:

  1. In the Reports tab in Salesforce, click New Report.

  2. 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.

  3. In the Report Builder, remove all existing Filters.

  4. Add a Filter to the Report:

    1. Field: Import Tag (the field you created for an earlier step)

    2. Operator: contains

    3. Value: Enter the value that you specified in the Import_Tag__c (or similar) column in the import file.

  5. Add the desired columns to the Report.

  6. Save the Report.

  7. Run the Report.

Related content

Time Tracking is built by C323 and powered by Salesforce.