SAP Knowledge Base Article - Public

3323455 - Configuring Rest Rules in SuccessFactors Time Tracking

Symptom

This KBA provides guidance on how to configure Rest Rules in SuccessFactors Time Tracking so that the system can raise an alert when minimum rest periods between two working days are violated.

Image/data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

SAP SuccessFactors Time Tracking

Cause

Rest rules ensure that employees comply with the required minimum rest period between shifts.

Resolution

Prerequisites:

- SAP SuccessFactors Time Tracking license 

- Time Tracking feature is enabled in Provisioning

- Ensure that the required permissions are properly configured. For detailed guidance, refer to the Implementation Guide for Configuring Rest Rules and its corresponding subsections.

- The assigned Time Recording Profile must be configured with Time Recording Method = Positive and Time Recording Variant = Clock Times.

Note: It is not specific to the Clock In/Clock Out functionality. It can also be used for employees who record their attendance manually in the Time Sheet UI via Working Times.

Configuration: 

Five time valuations are required to enable the rest‑rule functionality. Below sample configuration illustrates how each one contributes to achieving the rest‑rule logic.

1. Persisting Daily Working Time for Rest Rules

a. Create a Time Container that persist the start time and end time of each working day. These start and end times are used by other time valuations to calculate gaps between working days. 

  • Set Time Category to Calculated Time and Time Container Type to Yes.

b. Create time valuation that persists the start time and end time of each working day. 

  1. Set Valuation Type to Aggregate Input Group and Split.
  2. Enter the created time container (created in 1.a) as the time type group above.
  3. Set the valuation method to Valuate Per Day, the threshold type to Fixed Value, and the threshold value to 0.

c. Add a time type group that contains recorded working times and enter it as input time type group for above time valuation.



2. Defining the Rest Rule Period: To define the rest‑rule period, first create a time valuation that generates a record containing the start and end of this period. A subsequent time valuation then uses this record to calculate the gaps between working days.

  1. Create a time type group to read data from Time Container (created in step 1.a), so that the data can be used in time valuation.
  2. Create a time type group that stores the start and end of the rest rule period.

  3. Create a time valuation to generate the whole rest period record. 
    1. Set Valuation Type to Create Time Record.
    2. Start of Time Record section:
      • Set Start Type to Time Type Group.
      • In the Start Time Type Group field, enter the name of the time type group that reads time containers (created in 2.a).
      • Set Start Time Type Group Attribute to Earliest Start Time.
    3. End Of Time Record section:
      • Set End Type to Time Type Group.
      • In the End Time Type Group field, enter the name of the time type group that reads time containers (created in 2.a).
      • Set End Time Type Group Attribute to Latest End Time.
    4. As the time type group above, enter the time type group that stores the start and end of the rest rule period (created in 2.b).
    5. Set Valuation Method to Valuate Whole Sheet or Period.
    6. Set Valuation Type to Create Time Record.

With this setup, the time type group REST_PeriodforGapDeduction (created in 2.b.) provides the total rest period, from which the system subtracts the time type group REST_RecordedWorkingTimePerDay (created in 2.a.) to calculate the gaps.

3. Calculating Gaps Between Working Days

a. Create a time type group that stores the gaps between working days and set Time Category to Calculated Time.

b. Create a time valuation to calculate the gaps between days

  1. Set Valuation Type to Deduct Group from Input Groups.
  2. Set Valuation Method to Valuate Whole Sheet or Period.
  3. As the deduction group, select the time type group that reads data from time containers (created in 2.a).
  4. As time type group above, select the time type group REST_Gaps (created in 3.a).
  5. As the input group, select the time type group with the record of the rest rule period (created in 2.b).
     

4. Defining the Minimum Rest Period: 

a. Create time type group to hold the minimum rest period. 

b. Create a time valuation to create a record with the duration of the minimum rest period, then a subsequent valuation will compare this value with the calculated gaps between working days to detect any rest period violations.

  1.  Set Valuation Type to Create Time Record.
  2. As the time type group above, enter the time type group for the minimum rest period (created in 4.a).
  3. Set Valuation Method to Valuate Per Day.
  4. Set Time Record Type to Clock Time Record. Note: The Time Record Type field might be hidden by default. Visibility is not mandatory. The system automatically defaults it to Clock Time Record.
  5. Set Start Type and End Type to Fixed Clock Time Value.
  6. For Start Time and End Time to the time that matches your minimum rest period. Below is an example for a 12‑hour rest period.


5. Identifying Rest Period Violations

Compare the gaps with the minimum rest period to raise alert when the gap is less than the rest period. 

a. Create time type group to hold the gaps that is less than the required minimum rest period. Set Time Category to Calculated Time.

b. Create a time valuation that filters gaps between working days that are shorter than the minimum rest period.

  1. Set Valuation Type to Filter Single Records from Input Groups​.
  2. Set Input Groups Records Attribute to Duration.
  3. Set Comparison Group Attribute to Duration and Comparison Operator to Less than (<).
  4. As the time type group below, select time type group for rest period violations (created in 5.a).
  5. Set Valuation Method to Valuate Per Day.
  6. As the comparison group, select the time type group for the minimum rest period (created in 4.a).
  7. As the input time type group, select the time type group that stores the gaps between working days (created in 3.a).
  8. Set Message Flag to Raise Message on Time Type Group Below.
  9. Define a message text for rest period violations.
  10. Set Message Type to "Alert and Warning" or "Alert and Error".
    Note: Currently Message type "Error" is not supported with time valuation that is influenced by time container. Reference KBA 3628208 - Raise Error Message with Time Container Values for flexible periods

When the gap duration in REST_Gaps (created in 3.ais less than the minimum rest period defined in time type group REST_MinRestPeriodTTG (created in 4.a), REST_Gaps (created in 3.awill be moved to time type group below REST_GapLessThanMin (created in 5.a).
As a result, alert is raised on time type group below REST_GapLessThanMin (created in 5.a)

6. Assign the time valuations to the time recording profile. 

7. How the configuration behaves in the Time Sheet UI:

1. Employee started their shift at 10:00 PM on Jan 5th.

2. Employee ended their shift at 7:00 AM on the following day (Jan 6th).

3. Employee records attendance at 6:55 PM on Jan 6th. 

4. The calculated gap is 11 hours 55 minutes (715 minutes), which does not meet the required 12‑hour minimum rest period. As a result, the configured time valuation alert is triggered. Note: The alert will not block the saving of the attendance recording.

5. The same alert is also visible in Admin Alerts > Admin Alert Type > Time Valuation. Note: Currently, the value can only be displayed in minutes.

See Also

3326953 - Start of Time Record and End of Time Record sections are missing when configuring a Create Time Record time valuation.

3326960 - Time Container Group section missing when creating a Time Container category time type group

Keywords

TIM-34867, time container, feature, rest, period, create, time, record, legal, minimum, rule, gap , KBA , LOD-SF-TTR , Time Tracking , LOD-SF-TTR-TMS , Time Sheet , How To

Product

SAP SuccessFactors HCM Suite all versions ; SAP SuccessFactors Time Tracking all versions

Attachments

image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
TV4.png
TV5.png
TV5.png
Pasted image.png
image.png
image.png
Pasted image.png
image.png
Pasted image.png
Pasted image.png
image.png
image.png
image.png
image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
Pasted image.png
input ttg.png
TTG Above TC.png
input ttg.png
time container.png
TTG Above TC.png
TTG 1.png
TV2.png