List of Template Tags and their Descriptions
You can use tags to dynamically load the values of pipeline variables in emails.
Tags are case-sensitive (for example, %value%
, not %VALUE%
or
%Value%
).
All text between %…%
symbols in a tag must appear in one line (without line breaks).
%value%
Use the %value%
tag to insert the value of a specified variable in an email.
- Syntax
-
%value [Variable] [option option option...]%
- Arguments
- Variable specifies the name of the variable whose value you want to insert in the code. Specify
the name of a variable that exists in the pipeline or the following keywords or reserved
words:
Variable Description $key
Inserts the path of the runtime variable. - Options
- You can use any of the following options with this tag. To specify multiple options, separate
the options with spaces.
Option Description null=’AnyString’
Specifies the string that you want the server to insert when Variable
is null. You specify the string inAnyString
. For example,%value carrier null=’No Carrier Assigned’%
.empty=’AnyString’
Specifies the string that you want the server to insert when Variable
contains an empty string. You specify the string inAnyString
. For example,%value description empty=’Description Not Found’%
.index=IndexNum
Specifies the index of an element that you want to insert. You can use this option to extract an element from an array variable. Specify an integer that represents the element’s position in the array. (Arrays are zero based.) For example, %value backItems index=1%
.encode(Code)
Encodes the contents of Variable
before it inserts, whereCode
specifies the encoding system you want the server to apply to the string.Code Encoding Used XML
XML encoding b64
Base-64 encoding URL
URL encoding none
No encoding decode(Code)
Decodes the contents of Variable
before it inserts, whereCode
specifies how the variable is decoded.Code Decoding Used b64
Base-64 decoding URL
URL decoding +nl
Adds a new line character. For example: %value +nl /items/qty%
%value +nl /arrivalDate%
The result of the tag is:10
10/18/20
- Effect On Scope
- None.
%loop%
Use the %loop%
tag to repeat a block of code for each element in a specified
array (document list) or for each key in a document.
- Syntax
-
%loop [Variable] [option option option...]% Block of Code %end%
- Notes
-
Omit the variable name from the
%value%
tag if it is used in the body of a loop for a String table or a document. When the variable name is omitted, the server inserts the value of the current element at run time.For readability, you can use
%end%
to denote the end of a%loop%
block.A set of errors (logged in the activity log) that are associated with a business document are sorted by the entry class (
entryClass
) variable. The exact keys for this variable vary from document to document. Each key is an entry class (also known as an activity class). For example, General, Delivery, Saving, Recognition, Processing, Validation, Verification.Use the
%loop%
and%end%
tag to get the transaction brief and full error message details of eachentryClass
. There are differententryClass
types: General, Delivery, Envelope, Saving, Recognition, Processing, Validation, Verification. You can use theseentryClass
types to get the error message details. - Syntax for using entryClass
-
%loop bizdoc/Errors/<entryClass>% %value BriefMessage% %value FullMessage% %end%
In a transaction, each error message gets logged in the
entryClass
type. For example,Recognition
is one of theentryClass
type. Multiple recognition errors might occur in a transaction. You can get each error message details by using the%loop%
tag.Example.
%loop bizdoc/Errors/Recognition% %value BriefMessage% %value FullMessage% %end%