When ever possible, greywater should be diverted downstream of the fixture’s p-trap and vent (this is also required by most codes). In some situations it’s much more convenient to install the diverter valve before the p-trap and vent, and it’s safe to do so, here’s why:
In standard plumbing, drain flowing to the sewer/septic system needs a P-traps to prevent sewer gasses from coming up the drain and into the building. However, when a diverter valve is installed in the drain and the sewer/septic side is turned “off” (directing water to the greywater system) the sewer connection is physically blocked by the valve, preventing any sewer gasses from passing it. In this situation no P-trap is needed on the greywater line.
It’s common in a sink greywater systems to install the valve (and divert the greywater flow) in the trap arm of the sink, so that the user can control the flow of greywater from inside the home.
Vents release gasses from the sewer, prevent the water in the trap from being siphoned out, and help the water flow down the drain. All standard fixtures need a vent, but the greywater side of a diverted drainline can operate safely without one, because there are no sewer gasses. If you have a greywater line with no vent you may have slower draining and hear gurgling, but it will still function.