Onit Documentation

Configuring the Out of Office/Delegate Feature

by Michael Nadeau Updated on

When users are out of the office, Onit allows them to select a delegate to take over their responsibilities while out. Onit’s out-of-office/delegate feature enables users to select a peer who will assume their approval and viewing rights until they return. Delegates will be granted access to all the original user's Records, including potentially sensitive records.

This tutorial will cover implementing the out-of-office/delegate feature in your Onit environment. At the end of this tutorial, any user can select another user to assume their responsibilities. Additionally, administrators may assign delegates for users.

The out-of-office/delegate feature transfers approval rights through one crucial Action: the Set Delegates for User Action. This action links and unlinks the delegate to and from the out-of-office user.

Once a delegate has been chosen, a Business Rule named Add Delegate will check via Condition to ensure the out-of-office/delegate feature is enabled. If the Condition is satisfied, Onit will grant view and approval rights to the delegate through the Set Delegates for User Action. When a delegate needs to be removed, a Business Rule named Remove Delegate will check via Condition that the out-of-office/delegate feature is disabled, then remove the delegate through the Remove Delegated User Action.

To complete this tutorial, you will need:

  • Access to the User Preferences Provider App in your environment. This App is often named User Profiles. 
     
  • An understanding of security settings in your environment.

The out-of-office/delegate feature allows delegates to view and approve Records; however, they will not receive emails meant for out-of-office users.

Create Conditions

You will be creating all of the following Conditions, Actions, and Business Rules within your User Preferences Provider App.

  1. Navigate to the Conditions node.
  1. Create a condition named Delegate is Enabled.
    • In the Condition property, enter {% if out_of_office == 'Yes' %}true{% endif %} This Liquid will evaluate to true when the out-of-office/delegate feature is enabled.
    • Click Save to save your condition.
       
  1. Create a second condition named Delegate is enabled and Start Day is Today
    • In the Condition property enter {% if out_of_office_start_date != blank %}{% assign a = now | to_date %}{% assign start = out_of_office_start_date | to_date%}{% if out_of_office == 'Yes' and out_of_office_start_date == a %}true{% endif %}{% endif %}. This Liquid ensures that the out-of-office/delegate feature is enabled and that the start date is the current date.
    • Click Save to save your condition.
  1. Create another condition named Out of Office has been set to No
    • In the Condition property enter {% for change in atom.changed_values %}{% if change.field_name == 'p_out_of_office' and change.current != "Yes" %}true{% endif %}{% endfor %}. This Liquid will start the removal process when the out-of-office period is over.
    • Click Save to save your condition.

Create Actions

  1. Navigate to the Actions node in the App’s Advanced Designer.
  1. Create a Set Delegates for User Action named Assign Delegate. This Action will assign Out of Office delegate(s) to the user. When configuring this Action: 
    • In the Email of Delegator property, enter a Liquid expression that will evaluate the email address of the user who will be out of the office. In many cases, this will be: {{name}}
    • In Email of Delegate, enter a Liquid expression that will evaluate the chosen delegate's email address(es). This will often be: {{out_of_office_delegate.name}}
    • Click Ok to save your Action.

3. Create a Conditional Compound Action named Remove past delegates and assign current. This Action will remove existing delegates and assign the new delegate(s). When configuring this Action:

  • In the Condition property, choose Delegate is Enabled.
  • In Actions, choose Assign / Remove Delegate.
  • Click Save to save your Action.

4. Create a Remove Delegated User Action named Remove Delegate. This will remove the Out of Office delegate from the user when Out of Office has been set to No.

  • In user_email write {{name}}
  • Click Save to save your Action.

5. Create an Update Transaction Action named Clear Out of Office Fields. This Action will clear the Out of Office Fields when Out of Office is set to No.

  • Under Field Updates, choose:
    • Out of Office Start Date
    • Out of Office End Date
    • Out of Office Delegate
  • Click Save to save your Action.

Create Business Rules

  1. Navigate to the Business Rules node in the Advanced Designer.
     
  1. Create a new Transaction Updated Business Rule named Add Delegate.
    • Choose Delegate is Enabled and Start Day is Today from the Condition dropdown.
    • Choose Remove past delegates and assign current from the Action dropdown.
    • Click OK to save your Business Rule.
  1. Create a new Transaction Updated Business Rule named Remove Delegate.
    • Choose Out of Office has been set to No from the Condition dropdown.
    • Choose Remove Delegate and Clear Out of Office Settings from the Action dropdown.
    • Click OK to save your Business Rule.

Create Fields

When creating the Fields outlined below the field names (e.g., enable_out_of_office) must exactly match, otherwise the Conditions set up earlier will not work.

  1. Navigate to the Advanced Designer page for your User Preferences Provider App and open the Wizard.
  2. Click Next until you reach the Fields tab.
  3. Create a Field named out_of_office with a Type of Combo. This combo will allow users to enable the out-of-office/delegate feature.
    • Under Values, enter Yes,No.
  1. Create a Field named out_of_office_start_date with a Type of Date. This Field will track the start date of the out-of-office period.
    • Set the Hidden condition to [out_of_office] != 'Yes'. This Liquid will hide the out_of_office_start_date Field until the out-of-office/delegate feature is enabled. 
    • Check the Required box and the Show on Dashboard box.
  1. Create a Field named out_of_office_end_date with a Type of Date. This Field will track the end date of the out-of-office period.
    • Set the Hidden condition to [out_of_office] != 'Yes'. This Liquid will hide the out_of_office_end_date Field until the out-of-office/delegate feature is enabled. 
    • Check the Show on Dashboard box.
  1. Create a Field named out_of_office_delegate with a Type of BelongsTo. This Field relates the User Preferences Provider App to itself, giving the user access to a dropdown list of other users in the company.
    • Set the Hidden condition to [out_of_office] != 'Yes'. This Liquid will hide the out_of_office_delegate Field until the out-of-office/delegate feature is enabled. 
    • Check the Required box.
    • Set the Target App to your User Preferences Provider. In this tutorial, it is the User Profiles App.

Test Your Out of Office Delegate Feature

You’re done! Test the feature by designating a delegate to ensure they can view and approve the correct Records. You can test your out-of-office/delegate feature by doing the following:

1. Pick two users to test this on: an Approver, Jonah, and a Delegate, Emily. For the Approver, make sure you find one business Record where the Approver can see the Record and the Delegate cannot; here, that Record will be Jonah Private Matter 3.

Jonah's Matters:

Emily's Matters:

2. Open the Approver’s User Preference Provider Record and mark the user as out of office. Choose the Delegate user as the delegate and the start date (the end date is optional).

Once the delegated user logs in, an asterisk will appear by their username, signifying they are a delegate. When the username is hovered over, a tooltip will appear for all the users for whom this delegate has view and approval rights. 

Previous Article Adding and Managing Users
Next Article Configuring a User Preferences Provider App

© 2024 Onit, Inc.

docs.onit.com contains proprietary and confidential information owned by Onit, Inc. that is subject to copyright. Onit presents it exclusively to you for your sole use in conjunction with using Onit products. No portion of the materials contained herein may be used for any other purpose. No portion of the materials contained herein may be shared with third parties or reproduced in any form.