In a queue, priority is determined by how long the work item has been waiting—first in, first out. However, while a work item is pending in the queue, new work could come in that is more urgent. In this Case, Secondary Routing Priority in Salesforce Omni-Channel plays a vital role.
1. Enable “Enable Secondary Routing Priority” in Omni-Channel Settings.

2. Set Secondary Routing Priority Field in the Service Channel.

Output:
