You can access the documentId with the ExtLibUtil. Then you can redirect the user in the beforeContentLoad event of the dynamicContent component:
<xe:this.beforeContentLoad>
<![CDATA[#{javascript:
var noteId = com.ibm.xsp.extlib.util.ExtLibUtil.readParameter(facesContext,"documentId");
if( noteId === "ABCD" ){
facesContext.getExternalContext().redirect("http://google.de");
}
}]]>
</xe:this.beforeContentLoad>
[Instead of using the hardcoded noteId you have to do your lookup for your softdelete field]