# Dynamic virtual device IDs in Workflows

**URL:** https://forums.losant.com/t/dynamic-virtual-device-ids-in-workflows/199
**Category:** Feature Request
**Created:** [July 11, 2016, 6:12pm UTC](https://forums.losant.com/t/dynamic-virtual-device-ids-in-workflows/199 "2016-07-11T18:12:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Travis\_Geis](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/travis_geis/32/193_2.png) [@Travis\_Geis](https://forums.losant.com/u/Travis_Geis)
#### Post date: [July 11, 2016, 6:12pm UTC](https://forums.losant.com/t/dynamic-virtual-device-ids-in-workflows/199/1 "2016-07-11T18:12:51Z")

</div>

Hi again,

Right now I’m setting up workflows, and I would like to be able to create a derived attribute on a device, i.e. one that the device does not report directly, but that I can compute from what it reports. It looks like I should use a virtual device for attributes that I set in workflows.

Since I have more than one hardware device, I’d like for each of them to have a corresponding virtual device. However, from what I can tell in the workflow editor, the “Virtual Device” node needs a constant device ID known ahead of time. Is there a way I can use the device ID from the workflow trigger to select a virtual device to update? Essentially, I’d like to use a template to find the virtual device corresponding to the real one. I could associate them perhaps by storing the virtual device’s ID as an attribute on the real device.

Thanks!

---

<div class="post-metadata">

### Author: ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)
#### Post date: [July 12, 2016, 7:10pm UTC](https://forums.losant.com/t/dynamic-virtual-device-ids-in-workflows/199/2 "2016-07-12T19:10:09Z")

</div>

Great feature request! We did implement this functionality on the [Device Command](https://docs.losant.com/workflows/outputs/device-command/) node and will roll it out as soon as possible to the Virtual Device node as well.

---

<div class="post-metadata">

### Author: ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)
#### Post date: [August 10, 2016, 8:14pm UTC](https://forums.losant.com/t/dynamic-virtual-device-ids-in-workflows/199/3 "2016-08-10T20:14:50Z")

</div>

Our release today does provide support for specifying the virtual device ID from the payload when setting virtual device state. Thanks for being patient!
