Setting skill priority with skills in trigger action

Skills priority option for 'add_skills' and 'set_skills' trigger actions

If omnichannel routing is activated for your account, you can use triggers to add and modify skills on tickets. Additionally, the add_skills and set_skills trigger actions include an option to configure which of the skills can timeout and which are considered every time by omnichannel routing. Required skills are considered every time by omnichannel routing when assigning the ticket to an agent, while optional skills remain on the ticket but are only considered by omnichannel routing before the skills timeout occurs and are dropped at intervals based on the priority. This priority setting is only applicable when you've turned on skills timeout. The following priority values are supported:

ValuePriorityExpires
0RequiredNever
1Optional High PriorityExpires Last
2Optional Medium PriorityExpires after Soonest
3Optional Low PriorityExpires Soonest

If you don't specify a priority value for a skill, 1 (optional high priority) is used by default.

The priority value is appended to each skill's UUID in the array of skills you are adding or updating on the ticket using the format skill_uuid#priority. For example:

["ea535736-d36b-45d2-a00e-14a274588c87#1","eb3306b5-182a-4dfe-8501-e62a270e7012#0"]

Example

In the following example, the add_skills action is configured to add three skills. The first skill has optional high priority, the second has optional low priority, and the third is required. After the first skills timeout occurs eb3306b5-182a-4dfe-8501-e62a270e7012 will be dropped, then ea535736-d36b-45d2-a00e-14a274588c87 will subsequently be dropped after the second skills timeout, which would leave only 7ffed381-a9e2-4524-9ff9-f3dc46ec33b0 for omnichannel routing to consider.

"field": "add_skills","value": [           "ea535736-d36b-45d2-a00e-14a274588c87#1",           "eb3306b5-182a-4dfe-8501-e62a270e7012#3",           "7ffed381-a9e2-4524-9ff9-f3dc46ec33b0#0"          ]

The following example demonstrates how that add_skills action fits into the trigger JSON object:

{    "trigger": {        "url": "https://test_account.zendesk-staging.com/api/v2/triggers/7928977958141.json",        "id": 7928977958141,        "title": "add skill",        "active": true,        "updated_at": "2024-08-15T16:05:43Z",        "created_at": "2024-04-18T13:10:57Z",        "default": false,        "actions": [            {                "field": "add_skills",                "value": [                           "ea535736-d36b-45d2-a00e-14a274588c87#1",                           "eb3306b5-182a-4dfe-8501-e62a270e7012#3",                           "7ffed381-a9e2-4524-9ff9-f3dc46ec33b0#0"                ]            }        ],        "conditions": {            "all": [                {                    "field": "current_tags",                    "operator": "includes",                    "value": "add_skills"                }            ],            "any": []        },        "description": "sdfds",        "position": 3,        "raw_title": "add skill",        "category_id": "7661965594365"    }}