Environment Variables
  • 3 Minutes to read
  • Dark
    Light

Environment Variables

  • Dark
    Light

Article Summary

An environment variable is a dynamic value that can be included in some shortcuts. These dynamic values can include things like date and time, or information from the nVoq user account (like first name and last name).  

Environment variables do NOT work for Insert Text shortcuts in the 18.0.0 version of Mobile Voice. (They do work in nVoq.Voice.)
These may be fixed in Mobile Voice in a future release. If you'd like to use environment variables in Mobile Voice, let us know.

Basic nVoq Environment Variables

Insert Text, Insert Templates, and Workflow Automations have access to nVoq account information defined in nVoq.Administrator. When accessed from workflow automations, variables are stored as and must be accessed as environment variables.  

The syntax for environment variables is different in an Insert Text or Insert Template shortcut versus a Workflow Automation shortcut. 
Examples of each are shown below.  

These variables are case insensitive.
  • Variable:  NVOQ_FIRST_NAME(Insert Text the user’s first name)
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_FIRST_NAME}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_FIRSTNAME")
  • Variable:  NVOQ_LAST_NAME(Insert Text the user’s last name)
    • How to Use It in Insert Text or Insert Templates: ${NVOQ_LAST_NAME}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_LAST_NAME")
  • Variable:  NVOQ_USERNAME  (Insert Text the user’s user name)
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_USERNAME}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_USERNAME")
  • Variable:  NVOQ_EMPLOYEE_ID(Insert Text the user’s employee ID)
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_EMPLOYEE_ID}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_EMPLOYEE_ID")
  • Variable:  NVOQ_LAST_DICTATION_TEXT(Insert Text the text of the user’s last dictation) 
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_LAST_DICTATION_TEXT}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_LAST_DICTATION_TEXT")
    • This value re-sets when a user logs out of the voice client. If a user has not done a dictation within the current voice client session, the NVOQ_LAST_DICTATION_TEXT environment variable is an empty string.
  • Variable:  NVOQ_FIRST_NAME_INITIAL (Insert Text the initial of the user’s first name)
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_FIRST_NAME_INITIAL}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_FIRST_NAME_INITIAL")
  • Variable:  NVOQ_LAST_NAME_INITIAL(Insert Text the initial of the user’s last name)
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_LAST_NAME_INITIAL}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_LAST_NAME_INITIAL")
  • Variable:  NVOQ_LAST_DICTATION_AUDIO(Insert Text the name of the audio file and the path location of the last dictation)
    • How to Use It in Insert Text or Insert Templates:  ${NVOQ_LAST_DICTATION_AUDIO}
    • How to Use It in Workflow Automations:  EnvGet("NVOQ_LAST_DICTATION_AUDIO")
Other user environment variables (such as NVOQ_SHORTCUT_STATUS or NVOQ_TEXT ) are available for use in certain "trigger" automations.

Date and Time Environment Variables

These date and time environment variables are only supported in Insert Text or Insert Template shortcuts.

  • Variable: date:us
    • How to Use It in Insert Text or Insert Templates: ${DATE:us}
    • Format: MM/dd/YY
    • Example: 05/20/15
  • Variable: date:us:dash
    • How to Use It in Insert Text or Insert Templates: ${date:us:dash}
    • Format: MM-dd-YY
    • Example: 05-20-15
  • Variable: time:12hr
    • How to Use It in Insert Text or Insert Templates: ${time:12hr}
    • Format: hh:mm:ss a
    • Example: 10:48:20 AM
  • Variable: time:24hr
    • How to Use It in Insert Text or Insert Templates: ${time:24hr}
    • Format: KK:mm:ss
    • Example: 10:48:20
  • Variable: date:iso:period
    • How to Use It in Insert Text or Insert Templates: ${date:iso:period}
    • Format: YYYY.MM.dd
    • Example: 2015.05.20
  • Variable: date:iso:slash
    • How to Use It in Insert Text or Insert Templates: ${date:iso:slash}
    • Format: YYYY/MM/dd
    • Example: 2015/05/20
  • Variable: date:euro
    • How to Use It in Insert Text or Insert Templates: ${date:euro}
    • Format: dd/MM/YY
    • Example: 20/05/15
  • Variable: date:euro:dash
    • How to Use It in Insert Text or Insert Templates: ${date:euro:dash}
    • Format: dd-MM-YY
    • Example: 20-05-15
  • Variable: date:euro:underbar
    • How to Use It in Insert Text or Insert Templates: ${date:euro:underbar}
    • Format: dd_MM_YY
    • Example: 20_05_15
  • Variable: date:common
    • How to Use It in Insert Text or Insert Templates: ${date:common}
    • Format: MMM dd, YYYY
    • Example: May 20, 2015
  • Variable: date:4-digit-year
    • How to Use It in Insert Text or Insert Templates: ${date:4-digit-year}
    • Format: MM/dd/YYYY
    • Example: 05/20/2015

Simple Date (and Time) Format Variables

SimpleDateFormat is also supported:

  • Variable: SimpleDateFormat 1
    • How to Use It in Insert Text or Insert Templates: ${simpleDateFormat:EEE MMM dd KK:mm:ss a zzz yyyy}
    • Example: Wed May 20 10:48:20 AM MDT 2015
  • Variable:  SimpleDateFormat 2
    • How to Use It in Insert Text or Insert Templates: ${SIMPLEDATEFORMAT:EEE MMM dd HH:mm:ss zzz yyyy}
    • Example: Wed May 20 10:48:20 MDT 2015
  • Variable:  SimpleDateFormat 3
    • How to Use It in Insert Text or Insert Templates: ${simpleDateFormat:EEEE, MMMM dd, yyyy HH:mm:ss zzz}
    • Example: Wednesday, May 20, 2015 10:48:20 MDT
  • Variable:  SimpleDateFormat 4
    • How to Use It in Insert Text or Insert Templates: ${simpleDateFormat:EEEE, MMMM dd, yyyy KK:mm:ss a zzz}
    • Example: Wednesday, May 20, 2015 10:48:20 AM MDT
For more information about the SimpleDateFormat, see http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Example of Insert Text or Insert Template with Environment Variable

Use the syntax ${ENVIRONMENT_VARIABLE} in the written form to include the value of any of the basic or extended environment variables in the text of an Insert Text or Insert Template.

 

${date:common}

 

Thank you for contacting support.

 

Sincerely,

${NVOQ_FIRST_NAME_INITIAL}. ${NVOQ_LAST_NAME}

GoTo Company

123 Main Street

USA

Example of Workflow Automation with Environment Variable

Use the EnvGet function to retrieve the value of any of the basic environment variables.

 

$name = EnvGet("NVOQ_FIRSTNAME")

 

$msg = $msg & "Thank you," & @CRLF & $name

Send($msg)