SkillDeterminationUtils - Scoped
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
The SkillDeterminationUtils script include provides utility methods to get or set work item skill data.
This script include requires the Skill Determination (com.snc.skill_determination) plugin and is provided within the sn_skill_rule
namespace.
SkillDeterminationUtils - SkillDeterminationUtils()
Constructor to create an instance of SkillDeterminationUtils.
Name | Type | Description |
---|---|---|
None |
Example
SkillDeterminationUtils - assignSkillsToWorkItem(Array skills, GlideRecord now_GR)
Assigns an array of active skill objects to a work item.
Type | Description |
---|---|
None |
Example
The examples below create an Interaction record using the table name (interaction) and show how to assign skills to the interaction work item, creating a record in the Interaction Skills [interaction_m2m_skill] table.
Use case 1: Use returned results from determineWorkItemSkills() to assign skills to a work item from the Interaction table.
Example
Use case 2: Manually insert skills array. In this case, assign IT skills to the Interaction work item.
SkillDeterminationUtils - determineWorkItemSkills(GlideRecord now_GR)
Gets skills for a specified work item, indicates if the skills are mandatory, and lists any skill levels.
Name | Type | Description |
---|---|---|
now_GR | GlideRecord | GlideRecord of a work item from any interaction or task table extension. |
Type | Description |
---|---|
Array | One or more skill objects.
|
Example
The following script creates an interaction record, gets skills for the interaction work item, and indicates if the skills are mandatory.
Output: