How to handle user self-registration for users that should have different roles/groups

We have multiple types of users who need to be able to self-register with different roles/groups.

  • merchant - should have a default group ‘merchants’
  • user - should have a default group ‘users’

These users would be using separate clients, is there a way to handle these users in one realm or a multi-realm setup is our only option?