The Random/GetMobileNumber extension generates a random 10-digit integer.
This is useful when a journey needs a random mobile-number-like value for test data entry or validation steps.
Parameters:
- No input parameter is required. The source code sets
leninternally to10;
Note: Although the purpose mentions len, the provided source code does not expose len as an extension input. It is hardcoded as 10.
NLP usage
Use the extension in a journey by calling Random/GetMobileNumber with the execute command. This extension does not require values to be passed with as inputName.
Note: The returned value is generated using JavaScript Math.random(), so each execution can return a different 10-digit number.
execute "Random/GetMobileNumber" returning $mobileNumberexecute "Random/GetMobileNumber" returning $randomPhoneNumberThe extension can store the generated value directly in a Virtuoso variable.
execute "Random/GetMobileNumber" returning $mobileNumberexecute "Random/GetMobileNumber" returning $mobileNumberExample output:
9876543210This extension does not require any external resource.
The extension should be configured as:
- Run asynchronously: No
- Scope: Global
Limitation: The script always generates a 10-digit integer because len is hardcoded in the source. It does not validate country-specific mobile number rules, prefixes, uniqueness, or formatting. The value is produced with Math.random(), so it is suitable for simple test data generation but not for secure or guaranteed-unique identifiers.
Add the extension to your Virtuoso instance
Select the domain that matches your Virtuoso account.
View source
Last updated: 25/05/2026
Resources:
This extension does not require any external resource.
var len = 10;
return parseInt((Math.random() * 9 + 1) * Math.pow(10,len-1), 10);
Comments
0 comments
Please sign in to leave a comment.