This was a pretty difficult task to resolve and it requires a bit of mySQL work. A new support client started up and they had enough licenses for their current users. However, after we added some of our users it pushed their license over their limit and everything locked up.
Kayako – Why would you lock an entire helpdesk for going over on users? Why not build in a grace period and use it as a way to gently sell the client more licenses? Ok, back to the solution:
Kayako Staff count exceeded
1.) Backup the tables that we need to work with. This includes the swregistry and swstaff tables. The following will make a backup of each table and name it tablename_new:
#create a new table to backup swregistry into
CREATE TABLE swregistry_new LIKE swregistry;
#backed up swregistry table – to include staffcache field
INSERT swregistry_new SELECT * FROM swregistry;
#create a new table to backup swstaff into
CREATE TABLE swstaff_new LIKE swstaff;
#backed up swstaff table
INSERT swstaff_new SELECT * FROM swstaff;
2.) Now that you backed up your tables we need to remove enough staff to bring you below the limit
Open the swstaff table and delete enough of the newly added users to bring you below your user limit. I would suggest using phpMyAdmin or another DB tool to view the swstaff entries so you can determine which staff can be deleted.
* The limit error is the number in the error after the > sign.
3.) The site should still give an error since the actual cache field for that table hasn’t been cleared
#delete the staff cache from the registry
DELETE from swregistry where vkey=’staffcache’;
4.) Immediately access the helpdesk rebuild cache script to have it generate a new cache.
https://URL To Your Kayako Helpdesk/staff/index.php?/Core/Default/RebuildCache
Good luck, be careful and let us know if it works for you.