How to create virtual sensor?

To trigger Alexa I read you can use a virtual sensor.
But how do you make them in the new app?

You will copy the code and paste it into the IDE, which is the web portal to your smartthings account. The instructions are in the community FAQ:

FAQ: Can I trigger an Echo Action without Speaking to It?