Script to assign calls based on subject

Script to assign calls based on subject

Good Day

I am looking for a script that will assign calls based on the subject, consider the following examples:
  1. Subject "2nd Floor-HR-Printer" Assign Call to Peter
  2. Subject "17th Floor-HR-Printer" Assign call to Steve
The reasoning behind this is that we are splitting our technicians according to floors anyone has any idea on how I can achieve this?