Hi,
I think this could be achieved by defining "email" and "sms" attributes dynamically, while always leaving one of them empty, provided I got the somewhat brief documentation right.
By "dynamically", I mean using the
Attribute Definitions functionality via which one can define "inferred" attributes - e. g. via Groovy scripts (see examples on the linked page), while conditionally returning an empty value for one of the attributes. BUT this seems like a problematic part of this solution -
according to the linked page, there is no way how to get to any user attribute in the scripts - I wonder how to workaround this.
Once computed as described above, the inferred attributes can be hopefully referenced from the corresponding
${configurationKey}.mail.attribute-name and
${configurationKey}.sms.attribute-name properties of given providers (as listed in the
documentation).
Suggestions, anybody? Can't it be achieved in a simpler way?