Velocity Template Language

Custom email templates use the Velocity Template Language, which is different from Expression Language (EL) syntax in the following ways:

  • You can leave off the curly brackets for variable names. Shorthand notation is acceptable in most languages.
  • The format is simplified. Add a dollar sign before the variable that you want to add to a template, and use dot notation for sub-objects.
  • Most velocity variables can be used anywhere, but some are limited to specific templates. Refer to the Template availability column for details.

For more information, see the Velocity User Guide.

Variable

Template availability

${user.profile.login}

Available in all templates

${user.profile.email}

Available in all templates

${user.profile.secondEmail}

Available in all templates

${user.profile.firstName}

Available in all templates

${user.profile.lastName}

Available in all templates

${user.profile.locale}

Available in all templates

${user.profile.mobilePhone}

Available in all templates

${user.profile.primaryPhone}

Available in all templates

${user.profile.username}

Available in all templates

${user.profile.fullName}

Available in all templates

${user.profile.city}

Available in all templates

${user.profile.state}

Available in all templates

${user.profile.streetAddress}

Available in all templates

${user.profile.zipCode}

Available in all templates

${user.profile.countryCode}

Available in all templates

${user.groups.names}

Available in all templates

${user.groups.ids}

Available in all templates

${app.id}

Available in all templates

${app.name}

Available in all templates

${app.label}

Available in all templates

${org.name}

Available in all templates

${org.locale}

Available in all templates

${org.subDomain}

Available in all templates

${org.activationTokenExpirationHours}

Available in all templates

${baseURL}

Available in all templates

${oktaLogoUrl}

Available in all templates

${activationLink}

Available in these templates:

  • User Activation

  • Active Directory User Activation
  • Registration - Activation
${activationToken}

Available in these templates:

  • User Activation

  • Active Directory User Activation
  • Registration - Activation
${samAccountName}

Available in these templates:

  • Active Directory User Activation

  • Active Directory Password Reset

  • Active Directory Self-Service Unlock Account

  • Active Directory Password Unlock

  • Active Directory Self-Service Unlock Account

${technicalContact.login}

Available in these templates:

  • User Activation

  • Password Reset by Admin
${technicalContact.email}

Available in these templates:

  • User Activation

  • Password Reset by Admin
${technicalContact.secondEmail}

Available in these templates:

  • User Activation

  • Password Reset by Admin
${technicalContact.firstName}

Available in these templates:

  • User Activation

  • Password Reset by Admin
${technicalContact.lastName}

Available in these templates:

  • User Activation

  • Password Reset by Admin
${technicalContact.locale}

Available in these templates:

  • User Activation

  • Password Reset by Admin
${technicalContact.fullName}

Available in Password Reset by Admin

${pushVerifyActivationLink}

Available in Send Push Verify Activation Link

${androidOktaVerifyAppLink}

Available in Send Push Verify Activation Link

${iosOktaVerifyAppLink}

Available in Send Push Verify Activation Link

${registrationEmailVerificationLink}

Available in these templates:

  • Registration - Email Verification

  • Registration - Activation

${registrationEmailVerificationToken}

Available in these templates:

  • Registration - Email Verification

  • Registration - Activation

${instanceDisplayName}

Available in these templates:

  • Email Factor Verification

  • Registration - Activation

  • Registration - Email Verification

${unlockAccountLink}

Available in these templates:

  • Self-Service Unlock Account

  • Active Directory Self-Service Unlock Account

  • Active Directory Password Unlock

  • LDAP Self-Service Unlock Account

  • LDAP Self-Service Unlock Account

${recoveryLink}

Available in these templates:

  • Reset Factor

  • Active Directory Password Reset

  • Unlock Factor

${factorDisplayName}

Available in these templates:

  • Reset Factor

  • Active Directory Password Reset

  • Unlock Factor

${orgTechSupportEmail}

Available in these templates:

  • Reset Factor

  • Active Directory Password Reset

  • Unlock Factor

${unlockAccountTokenExpirationDate}

Available in these templates:

  • Self-Service Unlock Account

  • Active Directory Self-Service Unlock Account

  • Active Directory Password Unlock

  • LDAP Self-Service Unlock Account

  • LDAP Self-Service Unlock Account

${resetPasswordLink}

Available in these templates:

  • Forgot Password

  • Forgot Password Denied

  • Active Directory Reset Password

  • LDAP Forgot Password

  • LDAP Forgot Password Denied

  • Password Reset by Admin

${oneTimePassword}

Available in these templates:

  • Forgot Password

  • Active Directory Forgot Password

  • Active Directory Password Reset

  • LDAP Forgot Password

  • Self-Service Unlock Account

  • Active Directory Self-Service Unlock

  • LDAP Self-Service Unlock Account

  • Registration - Activation

${resetPasswordTokenExpirationDate}

Available in these templates:

  • Forgot Password

  • Forgot Password Denied

  • Active Directory Reset Password

  • LDAP Forgot Password

  • LDAP Forgot Password Denied

${request.date}

Available in Authenticator Enrolled

${request.time}

Available in these templates (and versions of these templates with Report Suspicious Activity button):

  • Authenticator Enrolled

  • Authenticator Reset

  • Factor Enrolled

  • Factor Reset

  • Sign In From New Device

${request.location}

Available in Authenticator Enrolled

${request.performedBySubject}

Available in Authenticator Enrolled

${request.factor}

Available in Factor Enrolled

${request.factors}

Available in Factor Reset

${request.ipAddress}

Available in Sign In From New Device

${request.reportSuspiciousActivityToken}

Available in Authenticator Enrolled (with Report Suspicious Activity button)

${request.browser}

Available in Sign In From New Device

${request.relayState}

Available in Forgot Password

${verificationLink}

Available in Email Factor Verification

${verificationToken}

Available in these templates:

  • Email Challenge

  • Email Factor Verification

  • Activation

  • Registration - Email Verification

  • Change Email Confirmation

${emailAuthenticationLink}

Available in Email Challenge

${email}

Available in these templates:

  • Email Challenge

  • Email Factor Verification