.. _reference-macros-sync-delete-threshold: Pull Sync Delete Threshold ---------------------------- .. _21.1|EKB-7436: .. _19.3.4-PB1|EKB-7436: During a data sync where you delete a VOSS Automate resource from the device so that the key is in the VOSS Automate list but not in the 'device' list, a pull sync will remove the resource in VOSS Automate. In order to manage the number of resources that are deleted on VOSS Automate during this process, a named macro should be added to the system, with the following values: * ``name``: *PULL_SYNC_DELETE_THRESHOLD_* * ``macro``: number * ``hierarchy``: the hierarchy where the sync takes place. Upon a data sync of the device type, a check for the named macro at the hierarchy will take place and local deletes will be restricted to the number defined in the macro. .. note:: * The ``macro`` value is a JSON string containing the number, e.g. ``"macro": "2"``. If the macro is created on the GUI, simply type in the number as value. * The ```` value is obtained from the model name component of the ``connection_parameters_type`` field of the ``data/DeviceModelMapping`` model. Refer to the table below. In JSON format, the named macro is for example as in the snippet below: :: [...] "meta": { "model_type": "data/Macro", "hierarchy": "sys.hcs.CS-P.CS-NB.AAAGlobal", "tags": [] }, "data": { "macro": "2", "name": "PULL_SYNC_DELETE_THRESHOLD_skypeforbusinessonline", "description": "PULL_SYNC_DELETE_THRESHOLD_skypeforbusinessonline" } [...] .. note:: The model name following the ``data/`` model type is inserted into the macro name. The table below maps the device type names as seen on the Data Sync GUI to the related model in full (remove ``data/`` in the macro) : .. tabularcolumns:: |p{9cm}|p{6cm}| .. csv-table:: Pull Sync Table :file: pull-sync-table.csv :class: longtable :header-rows: 1 :widths: 3 2 If during a sync the macro is available and the number value in the macro is reached while there are more instances, the sync log will also show an error. If no macro is defined as above, then the pull sync will remove all local instances on VOSS Automate.