.. _recc-cucm-sync-setups:

Recommended Cisco UCM sync setups
----------------------------------

.. _20.1.1|VOSS-551|EKB-6325:

Overview 
.........

This section provides Cisco UCM sync recommendations. 


Bottom-up user sync
....................

If using bottom-up sync into Cisco UCM, the users are added to UCM via LDAP. In this scenario they do not 
appear in Automate in order to be managed until they're synced in. 

.. note::
   If you use this sync in a multi-cluster environment, additional
   guidance on the user sync setup is provided in the 
   Multi-Cluster Deployments Technical Guide.


* Recommended setup 

  * Model Type List - ``device/cucm/User``
  * Actions - Add/Update/Del all enabled.  
  * When to use - scheduled.  The most frequent this should run is in line
    with the LDAP->UCM sync time (typically once every 24hrs but minimum of every 6hrs or so).
    The length of this sync should consider the maximum allowable time for
    an end user to be in the system in typical business practices.
    Edge cases can always be handled in between scheduled syncs by running the sync
    manually if required - that is often better than having a very frequent
    sync that is not typically needed.
  * Events - the different actions (add/update/del) have different post execution
    events for the ``device/cucm/User`` model type that need to occur. These handle
    various aspects of the user setup. See below for a screenshot of the
    setup for an example:

    * Add Operation workflow = ``UserCucmSyncAdd``
    * Update Operation workflow = ``UserCucmSyncUpdate``
    * Delete Operation workflow = ``UserCucmSyncRemove``
  * Change notification should be used for this sync to manage load
    (except if using a model instance filter).

Workflows fields of the event setup on the Cisco UCM user sync:

* **Model Type**: ``device/cucm/User``

  **Operation**: Add

  **Phase**: Post Execution

  **Workflow**: ``UserCucmSyncAdd``
* **Model Type**: ``device/cucm/User``

  **Operation**: Update

  **Phase**: Post Execution

  **Workflow**: ``UserCucmSyncUpdate``
* **Model Type**: ``device/cucm/User``

  **Operation**: Delete

  **Phase**: Post Execution

  **Workflow**: ``UserCucmSyncRemove``



Phone types and related entities
................................

This will force Automate to retrieve the latest phone type data from the UCM
and related entities like phone button templates, and so on.
This is not possible via the change notification in Cisco UCM today.  

* Recommended setup:

  * Model type list including: `device/cucm/PhoneType`, `device/cucm/PhoneTemplate`, `device/cucm/securityProfiles`
  * Actions - Add/Update/Del all enabled
  * When to use - Not scheduled - run ad hoc as needed.  This includes post UCM upgrades,
    installation of a new device COP file in UCM, managing phone button templates, managing device security profiles.
    If you are not seeing a phone type of the button template in Automate that you are expecting,
    running this sync will likely resolve it.


Other syncs
...........

Additional syncs can be set up for specific requirements, based on the implementation.  

.. important::
   
   In setting up processes that sync any new entities into Automate, these will add the entities to the hierarchy
   level of the sync.  So this will require the use of overbuild or ad hoc move processes to get the entities
   into the right site, for example, if needed (such as users, phones, lines, and so on).



