  We prove the version of Joyce-Song formula for the Behrend function
identities in the motivic setting. The main method we use is the proof of
Kontsevich-Soibelman conjecture about the motivic Milnor fibers by Q. T. Le,
who uses the method of motivic integration for formal schemes and
Cluckers-Loeser's motivic constructible functions. In the Appendix the motivic
formula can be used to provide a different proof that there is an algebra
homomorphism of Kontsevich-Soibelman from the motivic Hall algebra of the
abelian category of coherent sheaves on a Calabi-Yau threefold $Y$ to the
motivic quantum torus of $Y$.
