Macros documentation

Library of ready-to-use tags for generating data, characters and values. Use them in templates, in the subject or body of an email to build complex randomization structures.

Shortcode
* A user-defined macro configured directly in the service. It can contain up to 1000 lines of values, one of which is randomly selected on each use. Used to simplify content randomization. System macros can be used inside the lines. Unpaired tag.
Description Value Result
Inserts the value of a shortcode by its code. The macro code is set arbitrarily when the shortcode is created.
{shortcode code='woman_firstname'}
Alexsandra
The id attribute lets you insert the same shortcode value in different places. If the same shortcode has the same id in several places, the same value is inserted everywhere. Without id, each shortcode picks its line independently.
{shortcode code='woman_firstname' id='01'}
{shortcode code='woman_firstname' id='01'}
{shortcode code='woman_firstname' id='01'}
Alexsandra
Alexsandra
Alexsandra
The id attribute can also link different shortcodes. When different shortcodes share the same id, values are taken from lines with the same line number. This produces consistent combinations of values.
{shortcode code='first_name' id='01'}
+
{shortcode code='last_name' id='01'}
John + Smith
Thomas + Anderson
Tyler + Durden
External
* A system macro that inserts a random value from an external file by URL. The file is hosted on the user side (for example, on a separate VPS) and can contain up to 10,000 lines of values. On each call, one line is randomly selected from the file. Unpaired tag.
Description Value Result
Inserts a random value from the external file at the given URL. The link to the external file is set in the code attribute. The file must contain a list of values, one per line.
{external code='http://x.x.x.x/files/woman_firstname.txt'}
Alexsandra
Random
* A construction for randomly selecting one of the variants listed inside. By default, variants are separated by the | character. Instead of the standard spintax syntax {variant1|variant2|variant3} used by most services, a paired tag {random}...{/random} is used. This makes it possible to set the splitting mode through the type attribute and synchronize the selection between tags through the id attribute. Paired tag.
Description Value Result
Randomly selects one of the variants separated by the | character.
{random}Hello|Good day|Hey|Good morning!{/random}
Good morning!
The id attribute synchronizes the selection between several tags. Tags with the same id pick the variant with the same line number.
{random id='greet'}Hello|Hey|Hi{/random}, 
{random id='greet'}John|Michael|Thomas{/random}!
Hi, Thomas
The type attribute with the value tag splits the variants by {i}...{/i} tags. Useful when the variants contain | characters.
{random type='tag'}{i}Price: 100$.{/i}{i}Discount 50%.{/i}{i}Sale ends today.{/i}{/random}
Discount 50%.
The type attribute with the value word splits the content by spaces and randomly picks one word.
{random type='word'}fast reliable simple{/random}
reliable
The type attribute with the value letter splits the content by characters, including spaces, punctuation and tags.
{random type='letter'}Hello{/random}
l
The type attribute with the value sentence splits the content by periods and randomly picks one sentence.
{random type='sentence'}We are online. Contact us anytime. We reply fast.{/random}
Contact us anytime.
The type attribute with the value row splits the content by line breaks (Enter). Convenient for long variants.
{random type='row'}
First option text
Second option text
Third option text
{/random}
Second option text
Сontent
* A system tag for generating different content: text, words, sentences, paragraphs, random characters, symbols and dates. The format of the result is set by the type attribute, the number of elements is controlled by the count, min and max attributes. The id attribute synchronizes the result between several tags. The generation language is set by the locale macro. Unpaired tag.
Description Value Result
Generates one random word.
{generate type='word'}
							
hello
Generates a specific number of words. The number is set in the count attribute.
{generate type='word' count='3'}
							
hello world apple
Generates a random number of words within a range. The range is set in the min and max attributes.
{generate type='word' min='1' max='5'}
							
hello world apple
Generates one random sentence.
{generate type='sentence'}
							
In vel odio feugiat, malesuada quam condimentum, mollis mauris.
Generates a specific number of sentences. The number is set in the count attribute.
{generate type='sentence' count='3'}
							
In vel odio feugiat. Nam accumsan id ante. Nunc vestibulum erat.
Generates a random number of sentences within a range. The range is set in the min and max attributes.
{generate type='sentence' min='1' max='3'}
							
In vel odio feugiat. Nam accumsan id ante.
Generates one paragraph of text.
{generate type='paragraph'}
							
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Generates a specific number of paragraphs. The number is set in the count attribute.
{generate type='paragraph' count='2'}
							
Lorem Ipsum is simply dummy text...
Nam accumsan id ante eu imperdiet...
Generates a random number of paragraphs within a range. The range is set in the min and max attributes.
{generate type='paragraph' min='1' max='3'}
							
Lorem Ipsum is simply dummy text...
Nam accumsan id ante eu imperdiet...
Generates a block of text consisting of several paragraphs (3 to 10 by default).
{generate type='text'}
							
In vel odio feugiat...
Nam accumsan id ante...
Nunc vestibulum erat...
Generates a block of text with a specific number of paragraphs. The number is set in the count attribute.
{generate type='text' count='3'}
							
In vel odio feugiat...
Nam accumsan id ante...
Nunc vestibulum erat...
Generates a block of text with a random number of paragraphs within a range. The range is set in the min and max attributes.
{generate type='text' min='1' max='3'}
							
In vel odio feugiat...
Nam accumsan id ante...
Name
* A system tag for generating first and last names, in English by default. The gender is set by the gender attribute, the output format by the format attribute. The id attribute synchronizes the result between several tags. The language of the names is set by the locale attribute. Unpaired tag.
Description Value Result
Generates a random first and last name of any gender.
{generate type='name'}
			
Thomas Anderson
The id attribute synchronizes the result between several tags. Tags with the same id return the same first and last name.
{generate type='name' id='01'}
{generate type='name' id='01'}
			
Thomas Anderson
Thomas Anderson
Generates a first and last name in the specified language. The language is set in the locale attribute (for example, ru_RU).
{generate type='name' locale='ru_RU'}
			
Иван Петров
Generates only the first name. The format is set by the value first in the format attribute.
{generate type='name' format='first'}
			
Tyler
Generates only the last name. The format is set by the value last in the format attribute.
{generate type='name' format='last'}
			
Durden
Generates only a female first name. The format and gender attributes can be combined.
{generate type='name' format='first' gender='female'}
			
Marla
Generates only a male first name. Works the same way for the last name when format is set to last.
{generate type='name' format='first' gender='male'}
			
Tyler
Outputs the first and last name in the standard order. The order is set by the value both in the format attribute.
{generate type='name' format='both'}
			
Thomas Anderson
Outputs the last and first name in reverse order. The order is set by the value both_reverse in the format attribute.
{generate type='name' format='both_reverse'}
			
Anderson Thomas
Number
* A system tag for generating numbers: integers and decimals. The number type is set by the type attribute, the range by the min and max attributes, the number of digits by the count and decimals attributes. The id attribute synchronizes the result between several tags. Unpaired tag.
Description Value Result
Generates an integer between 0 and 100. May be negative.
{generate type='number'}
43
Generates an integer within the specified range. The range is set in the min and max attributes.
{generate type='number' min='10' max='100'}
54
Generates an integer with a specific number of digits. The number is set in the count attribute. The min and max attributes are ignored in this case.
{generate type='number' count='5'}
82363
The id attribute synchronizes the result between several tags. Tags with the same id return the same number.
{generate type='number' id='01'}
{generate type='number' id='01'}
43
43
Generates a decimal number between 0.00 and 100.00. By default it is output with two digits after the decimal point.
{generate type='float'}
12,64
Generates a decimal number within the specified range. The range is set in the min and max attributes.
{generate type='float' min='100' max='300'}
128,64
Generates a decimal number with a specific total number of digits. The number is set in the count attribute. The min and max attributes are ignored in this case.
{generate type='float' count='8'}
123456,78
Generates a decimal number with a specific number of digits after the decimal point. The number of digits is set in the decimals attribute.
{generate type='float' decimals='4'}
12,1234
Date
* A system tag for generating date and time values. The output format is set by the format attribute, the range by the min and max attributes. The id attribute synchronizes the result between several tags. Unpaired tag.
Description Value Result
Generates a random date and time in the default format.
{generate type='date'}
2019-01-23 12:34:51
The id attribute synchronizes the result between several tags. Tags with the same id return the same date.
{generate type='date' id='01'}
{generate type='date' id='01'}
2019-01-23 12:34:51
2019-01-23 12:34:51
Returns the number of seconds since 1970-01-01 00:00:00 (Unix timestamp). The format is set by the value timestamp in the format attribute.
{generate type='date' format='timestamp'}
1437889193
Generates a date in a custom format. The format is set in the format attribute and is compatible with the PHP date function.
{generate type='date' format='Y-m-d H:i:s'}
2019-01-23 12:34:51
Generates a date within the specified range. The range is set in the min and max attributes. Dates are given in the Y-m-d format.
{generate type='date' min='2016-01-15' max='2018-12-31'}
2017-01-23 12:34:51
Returns the current date and time at the moment the email is sent. The now attribute enables the current-time mode.
{generate type='date' now}
2019-05-12 12:34:51
String
* A system tag for generating character strings: ASCII, digits, special characters and strings based on a regular expression. The string type is set by the upper, lower, numbers and special attributes. The string length is controlled by the count, min and max attributes. The id attribute synchronizes the result between several tags. Unpaired tag.
Description Value Result
Generates a string of ASCII characters: uppercase letters, lowercase letters and digits. The default length is 40 to 100 characters.
{generate type='string'}
qB7vGnnyYADyYx2Gb2...
The id attribute synchronizes the result between several tags. Tags with the same id return the same string.
{generate type='string' id='01'}
{generate type='string' id='01'}
qB7vGnnyYADyYx2Gb2...
qB7vGnnyYADyYx2Gb2...
Generates a string of random length within a range. The range is set in the min and max attributes.
{generate type='string' min='2' max='3'}
J1jhuS
Generates a string of exact length. The number of characters is set in the count attribute.
{generate type='string' count='12'}
BPkPsi5smJir
Generates a string of uppercase letters. The upper attribute enables uppercase mode.
{generate type='string' upper}
SDGIOCXLERP...
Generates a string of lowercase letters. The lower attribute enables lowercase mode.
{generate type='string' lower}
sdjixcownewfme...
Case, length and range attributes can be combined.
{generate type='string' min='2' max='3' lower}
abc
Generates a string of digits. The numbers attribute enables digits-only mode.
{generate type='string' numbers}
12472389729034873...
Generates a string of special characters. The special attribute enables special-characters mode.
{generate type='string' special}
!@$@#%#$&^@%^%&^...
Generates a string based on a regular expression. The pattern is set in the pattern attribute and the type changes to regex.
{generate type='regex' 
pattern='[A-Z]{2}[0-9]{4}-[a-z]{3}'}
KX3829-abc
Addsimbol
* A system paired tag. Inserts the specified symbol through a random number of positions inside the tag content. The symbol is set in the symbol attribute, the range of positions in the min and max attributes. Paired tag.
Description Value Result
Inserts the specified symbol through a random number of characters within the range from min to max.
{addsimbol min='1' max='20' symbol='#'}Hello world hello world hello{/addsimbol}
He#llo wor#ld hel#lo wor#ld hello
The addspace tag inserts a space through a random number of characters within the range from min to max.
{addspace min='1' max='20'}Random characters generation macro{/addspace}
Rand om char acters gener ation macro
Repeat
* A paired system tag. Repeats the content a specified number of times. The number of repetitions is controlled by the count, min and max attributes. By default the content is repeated from 3 to 10 times. Paired tag.
Description Value Result
Repeats the content a random number of times (3 to 10 by default).
{repeat}word.{/repeat}
word.word.word.word.word.word.
Repeats the content a random number of times within the specified range. The range is set in the min and max attributes.
{repeat min='1' max='4'}word.{/repeat}
word.word.word.
Repeats the content an exact number of times. The number is set in the count attribute.
{repeat count='3'}word.{/repeat}
word.word.word.
Chance
* A system tag that displays the content with a probability of 50%. Paired tag.
Description Value Result
Displays the content with a 50% probability. The content is either shown or not. Only the value percent=50 is supported.
{chance percent='50'}content{/chance}
content
Shuffle
* A paired system tag. Shuffles the content in random order. The splitting method is set by the type attribute. Paired tag.
Description Value Result
Shuffles content separated by the | character.
{shuffle}Coffee|Tea|Juice|Water{/shuffle}
Juice
The type attribute with the value tag splits the content by {i}...{/i} tags.
{shuffle type='tag'}{i}Pizza{/i}{i}Burger{/i}{i}Sushi{/i}{i}Pasta{/i}{/shuffle}
SushiPastaPizzaBurger
The type attribute with the value word splits the content by spaces.
{shuffle type='word'}Never gonna give you up{/shuffle}
you give up Never gonna
The type attribute with the value letter splits the content by characters, including digits, spaces and punctuation.
{shuffle type='letter'}Matrix{/shuffle}
rxiatM
The type attribute with the value sentence splits the content by periods.
{shuffle type='sentence'}Wake up, Neo. The Matrix has you. Follow the white rabbit.{/shuffle}
Follow the white rabbit. Wake up, Neo. The Matrix has you.
The type attribute with the value row splits the content by line breaks (Enter).
{shuffle type='row'}
Tyler Durden
Marla Singer
Robert Paulson
{/shuffle}
Robert Paulson
Tyler Durden
Marla Singer
Encode
* A system tag for encoding the content into a chosen encoding or format. The encoding method is set by the encoding attribute, the target charset by the charset attribute. Paired tag.
Description Value Result
Encodes the content into base64 format. Used for safe transmission of data in email headers and URLs.
{encode encoding='base64'}Hello, World!{/encode}
SGVsbG8sIFdvcmxkIQ==
Encodes the content into quoted-printable format. Used in email headers and message bodies to transmit non-ASCII characters.
{encode encoding='quoted'}Привет{/encode}
=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82
Transliterates the content into lowercase ASCII characters. Spaces are replaced with underscores. The charset attribute is ignored in this mode.
{encode encoding='ascii'}Привет Мир{/encode}
privet_mir
Re-encodes the content into UTF-8. Used as the standard encoding for most modern systems.
{encode charset='utf8'}Hello, World!{/encode}
SGVsbG8sIFdvcmxkIQ==
Re-encodes the content into Windows-1251 (cp1251). Used for compatibility with older email clients and systems.
{encode charset='cp1251'}Привет{/encode}
0PDoslXC
Locale
* A system tag for changing the content generation language. By default, all generate tags work in English. To switch to another language, place the locale tag at the beginning of the email. The tag affects all subsequent generations until the end of the email. Unpaired tag.
Description Value Result
English. Used by default, the locale tag can be omitted.
{locale locale='en_US'}
🇺🇸 Английский
The locale tag affects all generations after it. Convenient when the email contains many generate calls in a single language.
{locale locale='en_US'}
{generate type='word'}
{generate type='sentence'}
hello
The quick brown fox jumps.
The locale attribute can be specified directly inside generate. Convenient when one value should be generated in another language without switching the whole email.
{generate type='word' locale='en_US'}
hello
Russian.
{locale locale='ru_RU'}
🇷🇺 Русский
Albanian.
{locale locale='al_AL'}
🇦🇱 Албанский
Arabic.
{locale locale='am_AM'}
🇦🇲 Армянский
Azerbaijani.
{locale locale='az_AZ'}
🇦🇿 Азербайджанский
Danish.
{locale locale='da_DA'}
🇩🇰 Датский
German.
{locale locale='de_DE'}
🇩🇪 Немецкий
Greek.
{locale locale='el_EL'}
🇬🇷 Греческий
Spanish.
{locale locale='es_ES'}
🇪🇸 Испанский
Finnish.
{locale locale='fl_FL'}
🇫🇮 Финский
French.
{locale locale='fr_FR'}
🇫🇷 Французский
Hungarian.
{locale locale='hu_HU'}
🇭🇺 Венгерский
Italian.
{locale locale='it_IT'}
🇮🇹 Итальянский
Info
* A system tag for inserting recipient and sender data into the email or subject. The data type is set by the type attribute. Unpaired tag.
Description Value Result
Inserts the email address of the recipient. Works in the Outlook, Mail.com and Gmx.com modules.
{info type='email_email'}
Inserts the email address of the recipient encoded in Base64. Works in the Outlook module.
{to_email_b64}
Y2xpZW50LmVtYWlsQGNsaWVudC5kb21haW4uY29t
Inserts the subscriber name from the recipients database. Works in the Outlook, Mail.com and Gmx.com modules.
{info type='email_name'}
Client Name
Inserts the subscriber name automatically generated from the part of the email address before the @ symbol using artificial intelligence. Works in the Outlook module.
{name_to_subscribe}
Client Name
Inserts the first name of the Outlook account from which the email is sent. Works in the Outlook module.
{first_name_of_acc_outlook}
Name acc Outlook
Inserts the last name of the Outlook account from which the email is sent. Works in the Outlook module.
{second_name_of_acc_outlook}
Surname acc Outlook
Headers
* System macros for the SMTP module that insert data into email headers (From, Subject, List-Unsubscribe and others). Used in fields where paired tags are not available. Unpaired tag.
Description Value Result
Inserts the domain from which the mailing is sent.
{shortcode code='name_for_email'}
example.com
Generates an unsubscribe link.
{unsubscribe_link}
https://example.com/unsubscribe?id=abc123
Inserts the email address of the recipient. Works in the SMTP module.
{recipient_email}