TES Barring alerts

TES barring has the function to email the higher ranked person to notify them when an agent has reached their budget.
To have the function working the agent using the pin must be linked to a USERID.
This USERID must use LEVEL 2
Within the same company, the manager needs to have a higher ranked level which will update them when the agent reached the limit via an email alert.

The Levels are as follows: (Use only the even numbers 2 / 4 / 6 / 8)
1 - Agent - View Access only
2 - Agent - Full access (Access to own calls- provided their emails are filled in on their profile)
3 - Department - View Access only
4 - Department - Full access - Access to Department calls and lower
5 - Branch - View Access only
6 - Branch - Full access - Access to Branch calls and lower
7 - Company - View Access only
8 - Company - Full access - Access to Company calls and lower

In this case we use the even numbers to prohibit any limitation (2, 4, 6, 8)

Once the agent reached their limit, the closest relevant manager will be notified via email.
If the agent is on level 2 then the manager at level 4 he/she will be notified via email.
If there is no email configured for a level 4 person, it will go to the next in line which will be level 6 and the same if level 6 is not created, it will then go to level 8.

From the Datatex Internal side, the process_barring script needs to be running frequently to have this function working correctly.