Ammonium is baking powder. Ammonium is used instead of soda and other chemical leavening agents only when you want to make cookies not dry and brittle, but porous and gassy. Residual moisture in the finished product should be less than 5% (e.g. dry biscuits), then you can use ammonium in the recipe. The finished products must be left for 40 minutes after baking to allow the ammonia gas to evaporate. The specificity of the use of ammonium is justified by the fact that many professional recipes can be reproduced only with its use.