> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.2cloudnine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Minimum Engagement Configuration Guide

## **External Resources**

| Name of Document                   | Details                                                                                                                                                                        |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 2cloudnine Sirenum Integration QRG | [https://docs.google.com/document/d/1T9u00d09yZTVDZkr8X16mdN4VXjAyOQ](https://docs.google.com/document/d/1T9u00d09yZTVDZkr8X16mdN4VXjAyOQ) 08PEF8QbbHhc/edit                   |
| Components List                    | [https://docs.google.com/spreadsheets/d/1vBwPXNpmYNuw4p1mmW2sCB1bXa](https://docs.google.com/spreadsheets/d/1vBwPXNpmYNuw4p1mmW2sCB1bXa) uWNqVyqUIGj7QoO7M/edit#gid=1551720425 |

## **Read First**

### Introduction & Overview

The Minimum Engagement solution allows users to nominate a minimum number of
hours per Timesheet Entry to uplift against. The setting also allows for multiple thresholds
to be defined where an Award/EBA has different minimum hour uplifts depending on the
quantity of hours already worked. At an Interpretation Rule level, Users are able to set the
time between entries to ignore uplift requirements, minimum and maximum values to
look up applicable entries.

This guide is to be used for the implementation and configuration of the custom
Minimum Engagement solution. In order to be 100% configured you must complete all
mandatory steps outlined in this guide.

<Note>
  **Important Notes**

  The following packages must be installed in the org before you can install PO
  Management.

  * 2cloudnine Payroll
  * 2cloudnine Time2Pay Extension
</Note>

## **Configuration**

### 1. Security, Page Layouts and Required Fields

A new tab will also need to be created to allow visibility of the new object from the App
Launcher. Following this, Page Layouts must be updated for the new Minimum
Engagement fields - on both the Custom Rule and Pay Code objects.

#### Custom Tabs

A new tab must be created to allow users to navigate to the new Custom Rule object.

1. Go to ‘Setup’
2. Search for and select ‘Tabs’ (Under User Interface > Tabs)
3. Click “New”
4. Select ‘Custom Rules’ from the dropdown for Object
5. Assign a Tab Style and then click ‘Save’

#### Permission Sets

There are no permission sets included in deployment components, therefore existing
Permission Sets will need to be updated to provide access to the new Custom Rule object.

To apply the Minimum Engagement Permissions:

6. Go to ‘Setup’
7. Search for and select ‘Permission Sets’
8. Select the appropriate Permission Set that applies to users setting up/managing
   the Minimum Engagement function
9. Select ‘Object Settings’
10. Find and Select ‘Custom Rules’
11. Update ‘Tab Settings’ to Available and Visible and enable full permissions on all
    fields
12. Click ‘Save’

#### Page Layouts and Required Fields

Minimum Engagement does require new fields to be added to existing Page Layouts, for
both the new Custom Rule object and the Pay Code object.

The following objects and page layouts must however be updated to include the following
actions.

| Object      | Type         | Label                   | Action | Page Layouts       |
| ----------- | ------------ | ----------------------- | ------ | ------------------ |
| Custom Rule | Custom Field | Interpretation Rule     | Add    | Custom Rule Layout |
| Custom Rule | Custom Field | Interpretation Type     | Add    | Custom Rule Layout |
| Custom Rule | Custom Field | Minimum Hours to Uplift | Add    | Custom Rule Layout |

| Custom Rule | Custom Field | Maximum Hours to Uplift         | Add | Custom Rule Layout          |
| ----------- | ------------ | ------------------------------- | --- | --------------------------- |
| Custom Rule | Custom Field | TS Entry Hours to Uplift        | Add | Custom Rule Layout          |
| Custom Rule | Custom Field | TS Entry Gap to Exclude         | Add | Custom Rule Layout          |
| Custom Rule | Custom Field | Timesheet Activities to Include | Add | Custom Rule Layout          |
| Pay Code    | Custom Field | Minimum Engagement Pay Code     | Add | Time2Pay Pay Code - Payment |

### 2. Flows

Minimum Engagement function uses a custom flow that runs on a Timesheet that has
processed transactions. This flow simply fires an Apex trigger to run the Minimum
Engagement code against the given Timesheet.

#### Activate Flows

Prior to using Minimum Engagement the flow must be enabled. To enable the flow:

1. Go to Setup
2. Search for and select Flows
3. Search for and Select Minimum Engagement‘’
4. Confirm if the flow is active, and if not Select ‘Activate’

### 3. Create and Add New Pay Codes

Minimum Engagement’s primary function is to uplift timesheet entries falling under a
specified threshold using a pay code specified on the parent Pay Code. The parent Pay
Code cannot direct back to its own record, therefore while you can use an existing Pay
Code in the Org to assign here, it is recommended that new Pay codes should be created.

These new Pay Codes can then be assigned to existing Pay Codes using the new
“Minimum Engagement Pay Code” field. If a Pay Code has no Minimum Engagement
code stipulated then even if the Custom Rule is configured against the Interpretation Rule
on the Timesheet, the function will not apply any code for uplifting.

One minimum engagement pay code can be used on all applicable Pay Codes for uplift
but the user can also opt to create additional pay codes for use in Minimum Engagement.
I.e. a user may create “Saturday Uplift 1.5” to use on pay transactions generated from
“Saturday Penalty 1.5”.

To add the Minimum Engagement Pay Codes:

1. Go to the App Launcher
2. Search for and select ‘Pay Codes’
3. Select your desired Pay Code/es and select “Edit”
4. Identify and select the Pay Code you will use for Minimum Engagement in the
   Minimum Engagement Pay Code field.
5. Click ‘Save’

<Warning>
  To reiterate, a Minimum Engagement Pay Code cannot reference the source Pay Code -
  therefore it is recommended to create new Pay Codes specific to Minimum Engagement.
</Warning>

### 4. Custom Rule

With Permission Sets, Tabs and Pay Codes now updated the Custom Rules themselves
can be configured. Custom Rules are configured at an Interpretation Rule level - if you
have a value that is required to be uplifted then you will need to create a custom rule for
each Interpretation Rule that requires it.

| Field                           | Purpose                                                                                                                                                                                                                                  |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Interpretation Rule             | The Interpretation Rule that the Minimum Engagement should occur on. This effectively replaces the need to populate anything under the Interpretation’s Daily Minimum Hours setting for Weekday, Weekend and Public Holiday breakpoints. |
| Interpretation Type             | The type of Interpretation that the custom rule is applying - at this stage only “Minimum Engagement” can and needs to be set.                                                                                                           |
| Minimum Hours to Uplift         | The minimum quantity of hours for a timesheet entry to meet the criteria for uplift                                                                                                                                                      |
| Maximum Hours to Uplift         | The maximum quantity of hours for a timesheet entry to meet the criteria for uplift                                                                                                                                                      |
| Timesheet Activities to Include | Identify whether any entries with a Timesheet Activity need to included in the uplift logic                                                                                                                                              |
| TS Entry Hours to Uplift        |                                                                                                                                                                                                                                          |
| TS Entry Gap to Exclude         | Set a value (in minutes)                                                                                                                                                                                                                 |

<Danger>
  If you need to include Timesheet Activities in the Minimum Engagement logic you will also
  need to
</Danger>

To create a new Custom Rule

1. Go to the App Launcher and type “Custom Rules”
2. Click on the “New Button”
3. Enter the custom rule name
4. Search and select the Interpretation Rule
5. Select Minimum Engagement in “Interpretation type”
6. Enter a Maximum Hours to Uplift
7. Enter a Minimum Hours to Uplift
8. Enter the TS Entry Gap to Exclude
9. Enter the TS Entry Hours to uplift
10. Select the button ‘Manage Assignments’
11. Select the Save button.

<Warning>
  The Interpretation Rule against the Custom Rule may already have Daily Minimum Hours applied
  in the Interpretation Builder. Be sure to update these daily values to ‘0’ as otherwise this can be
  generated alongside the minimum engagement uplifts.
</Warning>
