Lets say we have conservative vector field $\mathbf{F}(x,y,z)=y\sin{z}\mathbf{i}+x\sin{z}\mathbf{j}+xy\cos{z}\mathbf{k}$
I found it's potential function like this $$\begin{cases} \frac{\partial{\phi}}{\partial{x}} = y\sin{z} \\ \frac{\partial{\phi}}{\partial{y}} = x\sin{z} \\ \frac{\partial{\phi}}{\partial{z}} = xy\cos{z} \end{cases}\int \to \begin{cases} \phi(x,y,z) = xy\sin{z}+C_1(y,z) \\ \phi(x,y,z) = xy\sin{z}+C_2(x,z) \\ \phi(x,y,z) = xy\sin{z}+C_3(x,y) \end{cases}$$
Stupid question but is the constant of the potential function $C(x,y,z)$ or C. Because in my books solution its C and I think it has to be $C(x,y,z)$.
It seems that it has to be constant. From the first coordinate of vector field you obtain that $\phi (x,y,z)$ must be of form $\phi(x,y,z) = xy\sin z + C_1(y, z)$. Now you have to compare the vector field which is generated by this potential with your initial vector field. They agree on the first component, but you have to check 2nd and 3rd yourself. It's necessary that $x\sin z = \frac{\partial \phi}{\partial y} = x\sin z + \frac{\partial C_1(y, z)}{\partial y}$, so $\frac{\partial C_1(y, z)}{\partial y} \equiv 0$ and $C_1(y,z)$ has no dependence on $y$. Then you check third coordinate $xy \cos z = \frac{\partial \phi}{\partial z} = xy\cos z + \frac{\partial C_1(z)}{\partial z}$. From here it follows that $\frac{\partial C_1(z)}{\partial z} \equiv 0$ and $C_1(x,y,z)$ is constant.