When users are out of office, Onit allows them to select a delegate to take over their responsibilities while they’re out. Onit’s out of office/delegate feature gives users the ability to select a peer who will assume their approval and viewing rights until they return. Delegates will be granted access to all Records of the original user, including potentially sensitive records.
This tutorial will cover how to implement the out of office/delegate feature in your Onit environment. At the end of this tutorial any user will be able to 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 will link and unlink 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 make sure 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.
In order 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 the out of office user.
Create Conditions
You will be creating all of the following Conditions, Actions, and Business Rules within your User Preferences Provider App.
-
Navigate to the Conditions node.
-
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.
-
In the Condition property enter
-
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 the start date is the current date. - Click Save to save your condition.
-
In the Condition property enter
- Create a 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.
- In the Condition property enter
Create Actions
- Navigate to the Actions node in the App’s Advanced Designer.
-
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 to 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 to the email address(es) of the chosen delegate. In many cases this will be:
{{out_of_office_delegate.name}}
. - Click Ok to save your Action.
-
In the Email of Delegator property, enter a Liquid expression that will evaluate to the email address of the user who will be out of the office. In many cases this will be:
3. Create a Conditional Compound Action named Remove past delegates and assign current. This Action will remove any 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
-
Navigate to the Business Rules node in the Advanced Designer.
-
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.
- 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 Fields 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.
- Navigate to the Advanced Designer page for your User Preferences Provider App and open the Wizard.
- Click Next until you reach the Fields tab.
-
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
.
-
Under Values, enter
- 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.
- 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.
-
Create a Field named out_of_office_delegate with a Type of BelongsTo. This Field relates the User Preferences Provider App to itself in order to give 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 out 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 logins in, there will be an asterisk by their username signifying they are a delegate. When the username is hovered over there will be a tooltip with all the users this delegate has view and approval rights for.