Variables in notifications

From Cyclos4 Wiki
Jump to: navigation, search

From Cyclos 4.6 onwards it is possible to use variables in notifications (through the translations), the following variables can be used in the translations keys or in e-mail templates:

  • {name} or {fullName} - Displays the full name of the user.
  • {username}, {loginName} or {login} - Displays the login name of the user.
  • {email} - Displays the email address of the user.
  • {display} - The configured display name of the user.
  • {shortDisplay} - The configured short display of the user.
  • {<customFieldInternalName>} - The formatted value of the custom field.
  • {phone} - Displays the phone number of the user.
  • {address} - Displays either the address line 1 or the street name / building number / complement, according to the configuration.
  • {address.<field>} - Displays a specific address field. Allowed fields are: addressLine1, addressLine2, street, buildingNumber, complement, neighborhood, poBox, zip, city, region and country.
  • {accountNumber} - Displays the account number of the user.
  • {group} - Displays the name of the user's group, only if user groups are visible (available in Cyclos 4.11.1+).
  • {groupDisplay} - Displays the group's name used on registration, only if user groups are visible (available in Cyclos 4.11.1+).
  • {groupSet} - Displays the name of the user's group set, only if user group sets are visible (available in Cyclos 4.11.1+).
  • {<accountType>.number} - Displays the account number of a specific account type, by internal name (available in Cyclos 4.11.2+).
  • {<accountType>.balance} - Displays the balance of a specific account type, by internal name (available in Cyclos 4.11.2+).
  • {<accountType>.availableBalance} - Displays the available balance of a specific account type, which is calculated as balance - reserved + credit limit (available in Cyclos 4.11.2+).
  • {<accountType>.creditLimit} - Displays the (negative) credit limit of a specific account type, by internal name (available in Cyclos 4.11.2+).
  • {<accountType>.upperCreditLimit} - Displays the upper credit limit of a specific account type, by internal name (available in Cyclos 4.11.2+).

Example: Hello {shortDisplay}, please login to the app using your username: {login} or your account number: {accountNumber} and password. Your credit limit is {userAccount.creditLimit}


Other variables:

Next to the variables listed above, some translation keys have specific values that are only used in that specific translation key. They are indicated in the sequence they are used e.g. {0}, {1}, {2} etc. An example of this is "External payment expired. Date: {0}, To: {3}, Amount: {1}, Payment type: {2}". In this case the variable {0} will contain the date, {1} the amount etc. As you can see you can mix the order of variables, even if you use {3} earlier it will always contain the name of the user.