Feature: Expose Enrolled Phone Number or Prefix as a Variable for SMS template
Description:
We are using SMS-based Two-Factor Authentication (2FA) and need to comply with Malaysian national regulations, which require SMS messages to include the tag “RM 0.00” for successful delivery. While we are aware of the liquid syntax feature and the {{locale}}
variable for conditional formatting, this approach is insufficient in scenarios where a user’s browser locale does not match their phone number’s country. For example, a user registering with a Malaysian phone number but using a non-Malaysian locale will not receive the SMS because the necessary tag is not added.
To resolve this, we request that the phone number (or at least its country prefix) selected during MFA enrollment is made available as a variable in the liquid syntax context. This would enable conditional logic based on the phone number’s country prefix instead of relying solely on the {{locale}}
variable.
Use-case:
We are implementing 2FA using SMS for our users, including those in Malaysia. The requested feature would allow us to dynamically append the required “RM 0.00” tag to SMS messages for Malaysian phone numbers, regardless of the user’s browser locale. This would ensure compliance with local regulations and improve the reliability of SMS delivery to users in Malaysia.