In a $\triangle ABC,a^2+b^2+c^2=ac+ab\sqrt3$,then the triangle is
Since $0=a^2+b^2+c^2-ac-ab\sqrt{3}=\left(b-\frac{\sqrt{3}}2a\right)^2+\left(c-\frac12a\right)^2\,,$ we have $b=\frac{\sqrt{3}}2a$ and $c=\frac{1}{2}a$. Thus, $\angle A=\frac{\pi}{2}$, $\angle B=\frac{\pi}{3}$, and $\angle C=\frac{\pi}{6}$.
It can be shown that, if $\alpha,\beta,\gamma\in(0,\pi)$ and $\alpha+\beta+\gamma=\pi$, then there is a unique triangle $ABC$, up to scaling, with $BC=a$, $CA=b$, and $AB=c$ such that $$a^2+b^2+c^2=2bc\cos(\alpha)+2ca\cos(\beta)+2ab\cos(\gamma)\,.$$ To show this, one observes that the matrix $$\textbf{X}:=\begin{bmatrix}1&-\cos(\gamma)&-\cos(\beta)\\-\cos(\gamma)&1&-\cos(\alpha)\\-\cos(\beta)&-\cos(\alpha)&1\end{bmatrix}$$ is positive-semidefinite and the eigenspace associated with the eigenvalue $0$ of $\textbf{X}$ is spanned by $\begin{bmatrix}\sin(\alpha)\\\sin(\beta)\\\sin(\gamma)\end{bmatrix}$.
Considering cosine law: \begin{align*} \sum_{abc} (b^2+c^2-a^2) &= \sum_{abc} 2bc\cos A \\ a^2+b^2+c^2&= 2bc\cos A+2ca\cos B+2ab\cos C \end{align*}
One possibility is $\cos A=0$, $2\cos B=1$ and $2\cos C=\sqrt{3}$.
Hence $A=90^{\circ}$, $B=60^{\circ}$ and $C=30^{\circ}$.
Proof of Uniqueness of the above solution:
Rearrange the equality as a quadratic in $b$:
$$b^2-(a\sqrt{3})b+(a^2-ac+c^2) =0 $$
The discriminant: \begin{align*} \Delta &= (-a\sqrt{3})^2-4(a^2-ac+c^2) \\ &=-a^2+4ac-4c^2 \\ &=-(a-2c)^{2} \\ &\leq 0 \end{align*}
To admit a real solution for $b$, $\Delta$ has to be zero. That is
$$a=2c$$
Now, $$3c^2-2bc\sqrt{3}+b^2=0 \implies b=c\sqrt{3}$$
Therefore, $$\fbox{$a^2=b^2+c^2$}$$
$$a^2+b^2+c^2=ac+ab\sqrt3$$ The above equation can be re-written as $$\frac{a^2}{4}-ac+c^2+\frac{3a^2}{4}-ab\sqrt3+b^2=0$$ which is $$(\frac{a}{2}-c)^2+(\frac{\sqrt3 a}{2}-b)^2 = 0$$ which implies that $\frac{a}{2} = c$ and $\frac{\sqrt3 a}{2}= b$ .Based on this it can be concluded that the ratio of sides is 1:$\sqrt{3}$:2, which is a right angled-triangle.I hope this was helpful.