How to limit group change via app

Hi !

I’m trying to create an app that prevents agents to assign tickets to certain groups.

Throught looking at the FDK doc I found two potential ways to do it by using FD event system.

client.event.on("ticket.propertiesUpdated",propertiesUpdatedCallback, intercept: true});

That intercepts tickets update and returns both the old and new values of updated fields, which works as intended but unfortunately the values returned for a group change are group IDs and I would like to have the string values of those groups.

image

and the other solution :

client.event.on("ticket.groupChanged",groupChangedCallback, intercept: true});

I was not able to make it work, whatever I do the event doesn’t trigger.

Any help would be appreciated.