Move request ticket back 1 phase if Denied

Hi Team 

We have a requiremnet to move the quote a phase back automatically, when it has been denied . I am trying to use $phasepntr variable, but it is not helpping . Can someone guide me  on how to approach the same . 

Regards 

AA