in WKB the quantization conditions are
$$ \oint _{C} p.dq =2\pi n \hbar \tag{1}$$
and the wave function is $$ \Psi(x)= exp \left( \frac{iS[y(x)]}{\hbar} \right), \tag{2}$$
but what boundary conditions must I impose to this wave function if I want to obtain borh sommerfeld conditions ??