Rate Card Automation

Rate Card Automation

Background

Use this step by step guide to create a flow so that the Rate Card is automatically saved to the Time Tracking Summary, when using the Batch Entry and Easy Calendar.

Create a Record-Triggered Flow (Before Save)

This guide details how to create a highly efficient Before-Save Record-Triggered Flow on the Time Tracking Summary object. The flow will automatically look up the correct Default User Rate Card based on the Entered for User and set the corresponding Rate Card field on the Time Tracking Summary record.

Flow Summary

Setting

Value

Setting

Value

Flow Type

Record-Triggered Flow

Object

Time Tracking Summary

Trigger

A record is created or updated

Run Time

Before the record is saved (Fast Field Updates)

Step 1: Create the Flow and Define the Trigger

  1. Navigate to Setup and search for Flows.

  2. Click New Flow.

  3. Select Record-Triggered Flow and click Create.

Configure the Trigger Settings

  1. Object: Select the Time Tracking Summary object (use the API name if necessary, e.g., Time_Tracking_Summary__c).

  2. Trigger: Select A record is created or updated.

  3. Optimize the Flow: Select Fast Field Updates (Before Save).

Your initial setup should look like this:

Setting

Selection

Setting

Selection

Run Flow When

A record is created or updated

Optimize the Flow For

Fast Field Updates

Click Done.

Step 2: Set the Entry Conditions

We only want the flow to proceed if the record is being created, OR if it's being updated and the Entered for User field is changing.

  1. On the starting element, click the + sign and select Condition Requirements.

  2. Condition Requirements: Select Custom Condition Logic Is Met.

  3. Define the following conditions (using the API name for the Entered for User field, e.g., TTracking__Entered_For__c):

Resource

Operator

Value

Resource

Operator

Value

{!$Record.Id}

Is Null

{!$GlobalConstant.True}

OR

 

 

{!$Record.TTracking__Entered_For__c}

Is Changed

{!$GlobalConstant.True}

  1. Custom Condition Logic: Enter 1 OR 2. This means the flow runs if (1) the record is new, OR (2) the record is updated and the field changed.

Click Done.

Step 3: Get the User's Default Rate Card

This step queries the User Rate Card object to find the specific default record for the entered user.

  1. Click the + sign after the Entry Conditions and select Get Records.

  2. Label: Get Default User Rate Card

  3. API Name: Get_Default_User_Rate_Card

  4. Get Records from this Object: Select the User Rate Card object (e.g., TTracking__User_Rate_Card__c).

  5. Filter User Rate Card Records: Set the filter conditions:

Field (User Rate Card)

Operator

Value (Time Tracking Summary Record)

Field (User Rate Card)

Operator

Value (Time Tracking Summary Record)

TTracking__User__c

Equals

{!$Record.TTracking__Entered_For__c}

TTracking__Default_Rate_Card__c

Equals

{!$GlobalConstant.True}

  1. How to Store Record Data:

    • How many records to store: Only the first record (Since the criteria is for the default card, there should only be one).

    • How to Store Field Data: Automatically store all fields.

Click Done.

Step 4: Check if a Rate Card was Found (Decision)

Before attempting to use the retrieved record, we must check if the Get Records step actually found anything.

  1. Click the + sign after the Get Default User Rate Card step and select Decision.

  2. Label: Was Default Rate Card Found?

  3. API Name: Was_Default_Rate_Card_Found

  4. Outcome 1 (True Scenario):

    • Label: Found Rate Card

    • API Name: Found_Rate_Card

    • Condition: {!Get_Default_User_Rate_Card} Is Null {!$GlobalConstant.False} (Checking that the collection variable is not empty).

  5. Default Outcome: No Rate Card Found (This path does nothing).

Click Done.

Step 5: Assign the Rate Card to the Triggering Record

This step runs only if the Decision determined a Rate Card record was found. Since this is a Before-Save flow, we use the Assignment element to update the $Record variable.

  1. Click the + sign under the Found Rate Card path and select Assignment.

  2. Label: Set Rate Card on TTS

  3. API Name: Set_Rate_Card_on_TTS

  4. Set the Assignment Variables:

Variable

Operator

Value

Variable

Operator

Value

{!$Record.TTracking__Rate_Card__c}

Equals

{!Get_Default_User_Rate_Card.Rate_Card__c}

  • Note: TTracking__Rate_Card__c is the lookup field on the Time Tracking Summary record we are updating.

  • Get_Default_User_Rate_Card.Rate_Card__c is the Rate Card ID from the record we retrieved in Step 3.

Click Done.

Step 6: Save and Activate

  1. Click Save in the top right corner.

    • Flow Label: Time Tracking Summary - Set Default Rate Card

    • Flow API Name: Time_Tracking_Summary_Set_Default_Rate_Card

  2. Click Save again.

  3. Click Activate to make the flow live.

The Before-Save Flow automatically applies the changes made in the Assignment element to the database without needing a separate Update Records element.

Time Tracking is built by C323 and powered by Salesforce.