In theory, they combine those things to decide whether to just knock on the door and walk in or bring SWAT along.
This happens different between agencies and what parts of the country.
But, codifying these guidelines / rules into a law probably wouldn't hurt. Sometimes it is hard to capture the nuances of the situation into a formal law though.
Also, remember that like 10-100's of these things are probably executed daily, peacefully, without any conflict or issues. You only hear about it when they go wrong (or some asshole fed is in a bad mood or something I guess).