Add a business rule for skill determination

  • Release version: Washingtondc
  • Updated February 14, 2024
  • 1 minute to read
  • Create business rules to enable agents to work on cases, work order tasks, and chat interactions. These rules will trigger Skill Determination rules, which will add the necessary skills to the respective work items. This ensures that agents have the appropriate skills to handle these tasks effectively.

    Before you begin

    Role required: admin

    Enable the Skill Determination [com.snc.skill_determination] plugin.

    Procedure

    1. Navigate to All > System Definition > Business Rules.
      Note:
      If you want to use the skill determination rules available by default, make sure the Active field for that rule is set to true. For example, if you want to use the Skill determination for interaction business rule, make sure the rule is active.
    2. Select New.
    3. Add details for the business rule.
      Field Description
      Name Descriptive name for the business rule.
      Table Select the table on which you want to run this business rule for skill determination.
      Advanced
      1. Enable the Advanced check box.
      2. Select the Advanced tab.
      3. In the Script field, enter the following code:
        (function executeRule(current, previous /*null when async*/ ) {
            var skillUtils = new sn_skill_rule.SkillDeterminationUtils();
            var skills = skillUtils.determineWorkItemSkills(current);
            skillUtils.assignSkillsToWorkItem(skills, current);
        })(current, previous);
      4. In the When to run tab, set when you want the business rule to execute. For more information, see Create a business rule.
    4. Select Submit.