need to write apex trigger

Job ID: 32549490

Budget: ₹600 – ₹700 INR

Installed products may hold preferred technician and if present will be
assigned to the work order.
● Location can hold preferred technicians under the Location Technicians. If
found, one technician will be picked and assigned.
● If installed product and locations both have preferred technicians,
Technicians from Installed products will be assigned.
● If installed products and locations have no preferred technicians, a check is
performed on the Primary Territory of Work order to get the technicians who
have the same territory mentioned in their Service Territory.
● ​​​​​​Service team to which technician belongs will also be assigned on the work order.
● Where the work order is automatically assigned to technician, then this
technician with his manager on cc should receive an email notification.