The ‘GenerateItem’ action is designed to create dynamic ‘items’ to use elsewhere in a script. Unlike the PickItem action which selects from a predefined list, this action used for creating things dynamically such as randomised email addresses, passwords or dates.

Often in user registration journeys we need to create unique email addresses so as not to always use the same one and therefore be rejected by the target website’s validation. We recommend using a ‘consistently unique’ email format for this so you can easily search for and delete accounts registered using the defined format. The idea is that part of the email addresses used is consistent (i.e always start with “rapidtest”) and part is randomised so every address is unique.
To achieve this you would enter this in the Format attribute; “rapidtest+%s@example.com”, and this in the Parts attribute; “%random_string%”. The “%s” in the Format will be replaced by the “%random_string%” Part, which in turn generates a random set of characters. The final email addresses could look something like these:
- rapidtest+1Bstt8Ay@example.com
- rapidtest+gaS47F10@example.com
- rapidtest+Ru4S4gM3@example.com
In order to generate an email address, select the ‘Email’ item type when adding the GenerateItem action.
Similarly to the PickItem action, all GenerateItem actions must be given a ‘Name’ attribute – this is where the generated item will be placed in the $RapidStore
namespace.
Next, define your ‘Format’ and ‘Parts’ attributes (multiple parts must be separated by commas). You may use as many “%s” as you wish – they will be replaced in sequence by the Parts list.
