So sometimes you want your sonos to ring when a door opens, but other times you don’t want it to?
It sounds like modes and routines are what you want to use.
What smartapp are you using now to notify you that your door is open?
In general, you create mode #1 and routine #1. You setup routine #1 so that when it runs, mode #1 becomes active. Then in the smartapp you’re using to make the sonos ring, you would limit the execution to only occur in mode #1. When your door opens and ST is in mode 1, your sonos will ring.
Then you create mode #2 and routine #2. Routine #2 is set to switch to mode #2. If ST is in mode #2, your sonos won’t ring.
Name the modes and routines whatever you want so you know what’s what. You manually trigger the running of routine #1 or routine #2. Or you could try to automate it based on a presence sensor or some other trigger.
You should check out the wiki created by the community. http://thingsthataresmart.wiki
You can probably find instructions on how to create new modes and routines within the mobile app on the wiki. And you can read about how to add custom smartapps. That’s done from a web browser.