Hello
I need to do two OTP Enrollment (mobile and email) at the same time. This enlistment is conditioned by the fact that the atrributs through which the enrollment are made is valued.
To do this, I proceeded in this way:
API_OTP.synchronizeIdentity()
.module(OTPEnrollmentType.PHONE, "MemorityOtpPhone-Worker", (OBJECT.personalMobileNumber == null) ? [:] : [(OBJECT.personalMobileNumber): OTPRegistrationStatus.ACTIVE])
.module(OTPEnrollmentType.EMAIL, "MemorityOtpMail-Worker", (OBJECT.personalEmail == null) ? [:] : [(OBJECT.personalEmail): OTPRegistrationStatus.ACTIVE])
.synchronize(OBJECT)The problem is: if only one attribute is evaluated on both, and this attribute is the second module (personalEmail in this case) it is not enrolled, it's the same with a classic if/else structure.
How can I fix it please?
Thanks in advance