Thermostat Schedule Logic vs Motion Sensor / AutoSwitch / Alexa Routine

Here is the story: Both of us at home work sometimes from home other times from office, trying to figure out what to do since AutoSwitch just works with one person. To do that I would like to know what the thermostat logic is.
What is the priority when it has to decide which temperature setting is going to use:
The schedule first or motion sensor or auto switch… What if I just cancel every schedule and deactivate auto switch? Setting Alexa to handle it with routines that include geo location features also, but the question is: would thermostat follow only alexa’s orders? On the other side we have the motion sensor which we know activates the home feature when detects motion.

Any suggestions, experience.

Thanks

Right now we don’t have an official doc saying this but my experience is this:
Schedule > Autoswitch > Motion Sensor