# Auto tag rule for custom devices, using a dynamic value for the tag value

**URL:** <https://community.dynatrace.com/t/auto-tag-rule-for-custom-devices-using-a-dynamic-value-for-the-tag-value/45070>\
**Category:** Open Q&A\
**Tags:** tagging\
**Created:** [April 10, 2024, 12:47am UTC](https://community.dynatrace.com/t/auto-tag-rule-for-custom-devices-using-a-dynamic-value-for-the-tag-value/45070 "2024-04-10T00:47:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [April 10, 2024, 12:47am UTC](https://community.dynatrace.com/t/auto-tag-rule-for-custom-devices-using-a-dynamic-value-for-the-tag-value/45070/1 "2024-04-10T00:47:38Z")

</div>

Is there a way to create an auto tag rule to apply the tag value of the management\_zone property from the api response below? Specifically this would be done on a custom device.

I’m looking for an auto tag rule to apply this, the tag values will be dynamic, I can’t use a static value. I also prefer not to deal with creating a script to run daily to add this tag. I’m hoping this can be done natively within the tool. Is this possible? I’ve created a 2.0 extension and have added some properties to the custom device, I’m now wanting to have an auto tag rule add these values.

```markup
{
    "totalCount": 1,
    "pageSize": 50,
    "entities": [
        {
            "entityId": "some-value",
            "type": "some-value",
            "displayName": "some-value",
            "properties": {
                "management_zone": "some-value",
                "ticket_group": "some-value",
                "device": "some-value"
            },
            "managementZones": []
        }
    ]
}

```

This is what the properties and tags section looks like for the custom device

 ![sivart_89_0-1712709814472.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/3a607bd669337893fc67d8caeaba587c83eb7301.png)

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [April 10, 2024, 6:19am UTC](https://community.dynatrace.com/t/auto-tag-rule-for-custom-devices-using-a-dynamic-value-for-the-tag-value/45070/2 "2024-04-10T06:19:22Z")

</div>

I’m afraid is not directly possible, but you can replicate the filter you’re using in the management zone to create the autotag.
