Manipulation of acoustic wave fronts by thin and planar devices, known as metasurfaces, has been extensively studied, in view of many important applications. Reflective and refractive metasurfaces are designed using the generalized reflection and Snell's laws, which tell that local phase shifts at the metasurface supply extra momentum to the wave, presumably allowing arbitrary control of reflected or transmitted waves. However, as has been recently shown for the electromagnetic counterpart, conventional metasurfaces based on the generalized laws of reflection and refraction have important drawbacks in terms of power efficiency. This work presents a new synthesis method of acoustic metasurfaces for anomalous reflection and transmission that overcomes the fundamental limitations of conventional designs, allowing full control of acoustic energy flow. The results show that different mechanisms are necessary in the reflection and transmission scenarios for ensuring perfect performance. Metasurfaces for anomalous reflection require nonlocal response, which allows energy channeling along the metasurface. On the other hand, for perfect manipulation of anomalously transmitted waves, local and nonsymmetric response is required. These conclusions are interpreted through appropriate surface impedance models which are used to find possible physical implementations of perfect metasurfaces in each scenario. We hope that this advance in the design of acoustic metasurfaces opens new avenues not only for perfect anomalous reflection and transmission but also for realizing more complex functionalities, such as focusing, self-bending, or vortex generation.