A complete set of conditions describing the transition across the dissipationless undular bore (dispersive shock) is derived for nonlinear weakly dispersive conservative systems that generally are not integrable by the inverse spectral transform method. In the absence of integrable structure, we postulate modulation description of the undular bore with the aid of the averaged Whitham equations complemented by the Gurevich-Pitaevskii type natural boundary conditions. The main assumption used is that of the hyperbolicity of the Whitham system. The undular bore transition conditions are obtained in a general form by finding a set of integrals available for the similarity reductions of the Whitham systems regardless of the existence of the Riemann invariants. The obtained set of conditions can be viewed as a "dispersive" replacement of the classical shock conditions and allow one to fit an unsteady undular bore into the solution of the ideal dispersionless equations. We apply the obtained general conditions to (integrable) Kaup-Boussinesq shallow-water system and to (non-integrable) system describing fully nonlinear ion-acoustic waves in collisionless plasma. A complete agreement with previous analytical and numerical solutions is demonstrated.