Forms are the building blocks of any service management tool and it’s important that they too evolve, over time. This leads to users being burdened to create multiple plugins or a javascript code to add logic or context to their forms.


TABLE OF CONTENTS


Business Rules for Forms lets you perform conditional actions on certain fields within a form with no code. This lets your users perform actions on certain fields, control ticket lifecycle, and implement field-level access on forms to ensure that only the right stakeholders can modify the contents of specific fields.


You can create Business rules for the following:

  • Agents groups
  • Requesters groups

This is applicable for Global and other workspaces.


Important Notes:
1. Global business rules are only viewable for workspace admins
2. Workspace admins can create business rules at a workspace level.
Order of execution: The global rules execute first, followed by the workspace-level rules, to allow for the workspace-level rules to take precedence over the global rules.


How to create a Business Rule

  • In your Freshservice account, navigate to Admin > Service Management > Service Desk Settings > Business Rules for Forms > Create New Rule. 
    If your account has more than one workspace: 

    To modify global workflows, navigate to Admin > Global Settings > Service Management > Service Desk Settings > Business Rules for Forms > Create New Rule.

    To modify workspace-level workflows, navigate to Admin > Workspace Settings > {Workspace Name} > Service Management > Service Desk Settings > Business Rules for Forms > Create New Rule.

  • Workspace admins can view the list of global and local workflows applicable to their workspace. The global workflows execute first, followed by the workspace-level workflows, to allow for the workspace-level workflows to take precedence over the global workflow. For example, A global workflow can be configured to route tickets to the right workspace based on the subject/description.
  • Select one of the options for which you need to create a rule. 

  • Enter the name and description of the business rule

  • Choose whether the rule applies to Requesters, Agents or Both using the Applies to the dropdown
  • Specify whether the rules need to execute on the new form, edit form or both using Execute on the dropdown
  • Add the conditions based on 
    • Ticket form fields: Dynamic values on the form that trigger rules as the user fills the form

    • Logged in user fields: Attributes of the user submitting the form such as Department, Location, Role, Group etc

    • Current ticket fields: Static values of the record that is being modified.

  • Based on the condition you choose you can perform the following actions using the Perform an action option 
    • Show and Hide field
    • Mandate and Non-mandate fields
    • Enable and Disable fields
    • Prevent form submission with a custom validation message
    • Set and Remove Dropdown Options

  • Alternatively, you can also Validate the form on submission with a custom error message if the conditions specified above are met and click Save



Business Rules for Service Items

To create Business rules for Service Items, follow these steps:

  1. Go to Admin > Business rules for Forms > Create New Rule.
  2. Select the Service Item option.
  3. Configure your specific conditions based on the below respective fields.
    • Service Item 
    • Logged-in user
    • Requester/Requested for
  4. You can use the condition block to configure Relative and Dynamic date-based conditions for Service Requests.

                      


   5. Based on the above conditions you have configured, you can choose the desired actions listed below.

  •    Show and Hide field
  •    Mandate and Non-mandate fields
  •    Enable and Disable fields
  •    Prevent form submission with a custom validation message
  •    Set and Remove Dropdown Options


Here’s an example of how you can use Relative and Dynamic date-based conditions.


On Travel Desk request forms, make sure that the Start date is less than the End Date and is also greater than the Current Date. In this way, we can ensure that retrospective requests cannot be submitted. A custom message can also be configured if the above conditions are violated.




Business rule to disable the Request for someone else option

The admin can configure the Business Rule to disable the Request for someone else checkbox.

To disable, use the following rule:

  • Go to Actions > select Disable > Search Requester for a particular service item.

Rule Behavior

Here’s how the rule works:

  • For service items- Users cannot request a service item for another user as the Request for someone else checkbox will be disabled.
  • For Tickets and service items- The logged-in user's email address will be automatically filled in in the Requester field.


Block user in CC while creating the Service item and Ticket request

You can block to add another user to CC while creating the service item and ticket request. 

  • For tickets-The Add CC option appears when you create and edit a ticket.
  • For service items- The Add CC option appears only when you submit a new service request.



Advanced Settings

In the advanced settings section, you can check the following boxes:


  1. Auto-Reverse If False: This will reverse the action if the conditions specified aren’t met.


For eg. If you choose to mandate a particular field when the status is changed to Resolved, the Auto-Reverse if False checkbox will non-mandate the same field if the status is NOT Resolved.


This saves you the trouble of writing another rule, so we recommend you check this box by default for all business rules. 


  1.  Enforce System-Wide: The following business rule will be applicable to all forms and when a ticket is updated via bulk action, list view edits, scenario automation and API requests.


  • You can enable/disable the toggle for a particular business rule from the list view

  • You can choose to edit/ delete/ clone a business rule from the list view



Additional information


  • The current ticket condition is applicable only on Edit Form and also allows you to create conditions based on Ticket Type and also the Requested Item/s of the underlying ticket

  • The Enforce system-wide option is not applicable to show/hide fields

  • You can test out error messages to see how it appear within the system before saving the Validate form on submission option

  • When there are multiple business rules acting on a particular field, the rule that executes last will take precedence. You can click on Reorder to change the order of execution

  • Business rules geared towards requesters work best if fields are configured to be both visible and editable in form fields


Use cases:

#Usecase- 1
Let's take a scenario where you want to display the relevant categories based on a user's Location/Department/Group 

#Usecase- 2
A scenario where you want to restrict the dropdown choices in the status field when a ticket is awaiting approval.

#Usecase- 3

Let's take a scenario where when the ticket status is updated to pending mandate additional field.



In this case, the agent can't bypass and set the status to pending without filling in the additional details field.


#Usecase- 4

Let’s take a scenario where you want to prevent a ticket from being marked as closed if it’s awaiting approval.




In this case, we’re using a custom status to indicate if a ticket is pending approval. If the agent tries to close/resolve a ticket that’s awaiting approval, the system will throw an error with the custom message configured by the user.



Pro Tip: Use the sandbox account to test out your business rules.


Expected Product Behavior 


a. For Freshservice Accounts Using Fewer Than 25 BRs Per Service Item:


These accounts will now be able to configure up to 25 Business Rules per Service Item.


b. For Freshservice Accounts Already Using More Than 25 BRs Per Service Item:


Approximately 100 accounts, with exceptions allowing more than 50 BRs per Service Item, can increase by up to 5 additional BRs. For example, if an account currently uses 100 BRs per item, they can increase this number to 105.


Any requests for further increases will require a review by the Product and Engineering teams. In cases where the limit needs to be significantly higher, there may be pricing considerations due to increased infrastructure utilization.


c. For Other Entities Like Tickets & Changes


The existing limit of 250 BRs per account will remain unchanged.


Note:

  • Business rules are applicable to the new/edit ticket forms, child ticket forms, new tickets created from the asset’s detail page, and tickets created via the Freshcaller integration

  • Business rules that are enforced system-wide will be applied to bulk actions, scenario automation, list view and table view edits, and API V1 & V2 requests

  • Business rules are not applicable for tickets created/modified via email, workflow automation, supervisor, conversational UI and third-party apps. These rules don’t apply while merging tickets either

  • Business rules are also not applicable for service bot integration. 

    Check out these additional articles on Business Rules:

    Business Rules - Common Use Cases 

    Business Rules - Troubleshooting Guide