SupportCenter Plus

    Field & Form Rules - Use Cases

    The purpose of this document is to bring out a clear understanding of field and form rules by using real time scenario. The sections that follow walk you through the step-by-step procedure of configuring the use cases, along with relevant screenshots.

    List of Use Cases 

    Case I: Add dependency among PickList fields

    Scenario:

    • Creating Country-City-Support Rep dependency.

    • When we choose Country, City field should automatically populate with available cities of that country.

    • When we choose City, Support Rep field should automatically populate with available Support Rep in that City.

    Step 1:

    To handle above use case first we need to include the fields (Country, City and Support Repwith appropriate values in Request Additional Fields and than add those fields to any template (say, System Defined Template), as shown in image:


     

    Step 2:

    • Create a new rule under "On Form Load" event. 

    • As the dependency is being created under "On Form Load" event, it gets created only when the form is loaded.

    • Choose "Applies to All Users", so that the dependency is applied to all the users (Support rep as well as Contact).

    • Choose Rule Execution as "On Create/Edit", so that the dependency is created on both request create and edit pages.

    • Conditions can be left as empty, since we want rule to be applied without any conditions (since the dependency is applicable in all scenarios).

    • Under Actions, select Action as "Execute Script", and this provides a link as "Write Custom Script". 

    • Click "Write Custom Script" and this opens a script editor pop up.

    • Go to Dependency Example under Sample Script. Copy the complete code (you can skip comments), paste it to the Script Code area and then save the script.



    • The format of dependency object is as shown in the below image:


     

    Here, the dependency should contain a FIELDS array and a VALUES object, where the FIELDS array should contain the fields for which the dependency should be created, and where the (i)th element in the array should be depended on the (i-1)th element, and so on..

    Example: The City field options depend on the value of the Country chosen and the Support Rep field options depend on the value of the City chosen.

    The VALUES object should contain fields values, as shown in images. (NoteAll the fields label and values are case sensitive)



    Case II : On Form Load Event example

    a)   Applicable to requester and executes on request creation:

    Scenario:

    • Remove  "Resolved" and  "Closed" statuses from the Status Field when the Status is open.

    • Disable the Subcategory and Item fields.

    • Mandate the Category field.

    Steps:
    • Create a new rule under "On Form Load" event with name (say, "custom rule CSI and status handle").

    • Set Rule Execution as "On Create".

    • Set as "Applies to Contacts".

    • Under Conditions, add a condition as Status is Open.

    • Under Actions, add an action as Disable Fields:  Subcategory, Item.

    • Add another action as Mandate Field:  Category.

    • Add another action as Execute Script and add script code to remove the "Closed" and "Resolved" options from the Status field.

    • Remove the "Resolved" and "Closed" statuses from the Status field using Custom Script, as shown in the below image.

     

     
    b) Applicable to technician and executes on editing request

    Scenario:

    Mandate Subcategory, if the category is any of Warranty Problem or Defective Item Issue or Quality Issue.

    Steps:

    • Create a new rule under "On Form Load event" (say, mandate subcategory).

    • Set as "Applies To Technicians".

    • Set Rule Execution as "On Edit".

    • Under Conditions, add a condition as Category is any of  "Warranty Problem" or "Defective Item Issue" or "Quality Issue".

    • Under Actions, add an action as Mandate Field: Subcategory.

     

     


    Case III : On Field Change Event example

    a) Applicable to All Users and On Create/Edit as Execution Operation


    Scenario:

    On change of Level field, mandate the Priority field.

    Steps:
    • Create a new rule under "On Field Change" event (say, "on change of Level mandate Priority".

    • Select "Applicable to All Users".

    • Select "On Create /  Edit". 

    • Select Field as "Level", as shown in the image.

    • Under Conditions, add a condition as Level is Tier 1.

    • Under Actions, add an action as Mandate Field: Priority.

    • Save the Rule.



     

    b)  Applicable to Technicians and On Create/Edit as Execution Operation

    Scenario:

    If the Group selected is Defective Item Group, mandate the fields Category and Support rep.

    Steps:

    • Create a new rule under "On Field Change" event (say, "Defective Item Group").

    • Set "Applies to Technicians".

    • Set Rule Execution as "On Create/Edit".

    • Select Field as "Group".

    • Under Conditions, add condition as Group is Defective Item Group.

    • Under Actions, add an action as Mandate Fields Category, Support rep.

    • Save the rule.



     

    Case IV: On Form Submit Event example
    Scenario:
    • If Priority is High and Support rep is not given, then stop form(request) submission and mandate the Support rep field.

    • Applicable to all users and for edit request operation. 

    Steps:
    • Create a new rule under "On Form Submit" event (say, "high priority check technician").

    • Set "Applies to All Users".

    • Set Rule Execution as "On Create/Edit".

    • Under Conditions, add condition as Priority is High and Support rep is Not Specified.

    • Under Actions, open script editor pop up by clicking the "Write custom script" link.

    • Write script to mandate the Support rep field and stop form submission, as shown in image.

    • Save the script and the rule.

     


     

    Copyright © 2017, ZOHO Corp. All Rights Reserved.