a
The ease of nucleophilic substitution depends upon the nature of leaving group. When the leaving tendency of a group in a compound is high, then the compound is more reactive towards nucleophilic substitution. The nucleophilic acyl substitution is completed in two steps as shown below.
The order of leaving tendency is
$C l^{-}>R C O O^{-}>R O^{-}>N H_{2}^{-}$ and therefore, the order of reactivity of acyl compound is as
$\mathop {ACOCl}\limits_{(Acyl\,chloride)} > \mathop {\begin{array}{*{20}{c}}
{^{RCO}\backslash } \\
{_{RCO}/}
\end{array}O}\limits_{(Acid\,anhydride)} > \mathop {RCOOR}\limits_{(Ester)} > \mathop {RCON{H_2}}\limits_{(Amide)} $
