Conditional Alert Grouping

We are using IRM to feed alerts to engineers from Prometheus. We would like to apply a different grouping criteria, depending on the content of the alert. Is that possible?