It would be setup in the routines in the Alexa app. Motion and contact sensor support was added a little while ago. There have been reported issues with routines in the Alexa app the last few days. I have no idea of the specifics or if they even still exist.