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.


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.

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

  • Navigate to Admin -> Business rules for Forms -> Create New Rule.

  • Select Service Item option.


  • Configure your specific conditions based on the below respective fields.

  → Service Item 

  → Logged in user

  → Requester/Requested for



  • You can use the condition block to configure Relative and Dynamic date-based conditions for Service Requests.


                      


  • 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 lesser 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.




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 NOT Resolved.


This saves you the trouble of writing another rule, so we recommended 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 automations 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



Heads up! 


  • 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 appears 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


Usecases:

#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.


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 automator, supervisor, conversational UI and third-party apps. These rules don’t apply while merging tickets either

    Check out these additional articles on Business Rules:

    Business Rules - Common Use Cases 

    Business Rules - Troubleshooting Guide