.. _add_custom_variables:

Add Custom Variables
--------------------

System administrators can create custom macros for use in for example 
custom Configuration Templates. 

.. note::

   * The macro needs to be evaluated at the hierarchy that it is created.
   * The same macro variable can be defined to have different values at different hierarchies.

1. Choose **Advanced Tools > Custom Variables** and click **Add**.
2. Enter the macro name, optional description and value. The name must be prefixed with ``CV_``.
   For details on macro syntax, refer to the "Advanced Configuration Guide".
3. Click **Save**.

To test the macro, enter it in the macro evaluator at **Administration Tools > Macro Evaluator**.
   

Example
.......


Create:

::

   CV_current_time

   Current time is: {{ fn.now }}


Invoke:

::
  
  {{ macro.CV_current_time }}


Output example:

::

  Current time is: 2017-03-31 13:20:18.509871



.. |VOSS-4-UC| replace:: VOSS-4-UC
.. |Unified CM| replace:: Unified CM
.. |CUC| replace:: Cisco Unity Connection