Problem description

There is a need for generating accounts in large quantities, particularly for the purposes of using together with Calling Card module. The current generation process is not flexible enough to provide useful functionality.

Requirements for the proposed solution

  1. It should be possible to generate any reasonable number of accounts from the single "master" profile entry.
  2. Contents of the fields to be generated should be easily configurable for at least 2 main categories: secure pseudo-random sequence of digits, secure pseudo-random alphanumeric password.
  3. It should be possible to specify that two or more fields to be populated with the same auto-generated value.

Proposed Solution

For the fields to contain auto-generated values the following format is allowed:

  • ${N:xxx}, sequence of random digits. xxx here should be in the format [range1][range2]...[rangeN], where rangeX is either list of allowed digits for this position (i.e. [0,4,9]) or range of such digits (i.e. [0-6]). For example: [2,3,4][0-8][0-9][0-9] will generate numbers in the ranges 2000-2899, 3000-3899 and 4000-4899. The algorithm should deal with random digits generation one-by one (i.e. generate first digit, second, etc. and then check if such record already exist, but should contain some kind of simple protection from exhausting search space and infinite loop, for example the database option specifying how many attempt to generate number before displaying the error code.
  • ${C:xxx}, reference to another column. xxx here should be name of another column to copy the value from. For example, placing ${N:[1-9][0-9][0-9]} directive into the Account Name and ${C:Account Name} into the VoIP login will result in the same auto-generated value to be placed into both columns.
  • ${P:xxx}, alphanumeric password. xxx here should be the required length of the generated password phrase.

Example of the specification: 


Account NameWeb PasswordVoIP LoginVoIP PasswordIVR PinBalanceLifetime
${N:[1-9][0-9][0-9]}${P:8}${C:Account Name}${P:16}${N:[0-9][0-9][0-9][0-9]}10.030


This specification will generate accounts with Account Name in the range 100-999, Web Password will be random alphanumeric string with length of 8 symbols, VoIP Login will be the same as Account Name, VoIP password will be a random alphanumeric string with length of 16 symbols, PIN code would be in the range 0000-9999, Balance = 10.0, Lifetime = 30 days.

Some combinations like ${C:Account Name} are supported, but depend on configuration.


Setup Details

1. Navigate to Accounts page under Customers - My Customers menu and press Generate button in Add Account section:

2. On Account generation screen set all needed options, for example as on screenshot below.


3. Set number of Accounts, where to deliver resulting spreadsheet with generated data (to browser or send to email) and press Generate button.

After that the generation and Accounts creation process would start, once it's done, spreadsheet would be sent to selected destination. In case of generation errors, the spreadsheet with errors would be sent instead.

Save the template for Account Generator for further usage

Press Set as Default button at the bottom of Generation page. Note, that some fields are not saved to the template, since they are inherited from Account Class, e.g. CLD Tr. Rule or Allow Registration. In order to make those fields default, create new Account Class with needed settings and specify it in Account Generator, then hit Set as Default.

More information regarding Account Classes could be found in documentation.


Related documentation:

Accounts Overview

Account's features

Account properties

Account Classes

Service Codes