Did you follow the link I just gave you? I know the forum is a little bit confusing, you have to click twice on the little tiny arrow that is pointing right on the far right side of the quote, and it will take you to that Thread.
Step two in that thread discusses exactly that issue. And gives you the link to a smart app, Alexa Helper, to do just that. 😎
Normally, you would connect the two by having a routine that triggers what you want to have happen after your virtual switch comes on.
So let's say you want your virtual switch to lock your door.
You set up a routine that does nothing except lock that door.
Then you use Alexa helper or a similar smartapp to connect your virtual switch to that routine.
So here are the exact steps:
One) create a virtual switch
Two) create a routine to do whatever you want to have happen when you flip that virtual switch
Three) use "Alexa helper" or a similar smartapp to tie the virtual switch to the routine
Again, see the link in my previous post.