.. _concepts_config_templates: Configuration Templates ----------------------- Configuration templates are used to define values for attributes of any model. The values can be fixed values or existing macros visible from the hierarchy context where the configuration template is applied. The templates provide a useful way to define default values for items that are exposed in the Admin Portal (visible, invisible or read-only). They also provide a mechanism to map data from data input via the Admin Portal or device model events to other models or Provisioning Workflows in the system. One may want to hide attributes of a model while setting them to a specific fixed value (for example a hard-coded setting); or one may wish to derive the value based on a macro (for example, look up the value based on data in the system). For example, if a model has an attribute that is defined to be a date string, a Configuration Template for the attribute can be defined as a macro ``{{fn.now \"%Y-%m-%d\"}}`` in order to set the current date stamp as the value, such as ``2013-04-18``. Designers can access reference material for details on macros. Another example is a model such as the Quick Add Subscriber that limits the user input to a few fields, whilst deriving the value of other hidden attributes from various Configuration Templates that are each applied to different underlying models that make up a Subscriber (for example, Voicemail account settings, conference account settings, phone, line, device profile settings, and so on). When an instance of the model is added or updated, the Configuration Template that has been enabled for the model applies. For array elements of data models, a list and a variable can be specified to be looped through so that a value is applied to each element in the model array. More than one Configuration Template can be created for a model. These can then be used as needed. Configuration Templates can also be applied to models in the design of for example Provisioning Workflows. A Menu Layout that can be associated with a user role can also apply a Configuration Template to a model that is selected as a menu item. For administrators at Provider Administrator level or higher, a quick way to create a Configuration Template would be to open a similar template from for example the **Configuration Templates** menu and to customize a clone of it. Administrators at levels above the Site Administrator can also customize these templates, including Field Display Policies. .. note:: * When modifying Configuration Templates via the Admin Portal, numerical values need to be entered using the ``fn.as_int`` function, for example: ``{{ fn.as_int 14 }}`` * In a multi-cluster environment, Configuration Templates that result in device model drop-down lists on the Admin Portal may contain duplicates. Any duplicated item can be selected by the user. .. |VOSS Automate| replace:: VOSS Automate .. |Unified CM| replace:: Unified CM