In the phrase "digital transformation", the key word is "transformation", which implies the algorithmization of not only customs activities, but also regulatory legal acts governing legal relations in the field of customs, and regulatory and technical documents governing the requirements for the products of this activity. Algorithmization will reveal gaps, contradictions in the norms and tautological definitions of terms in the norms that are in the Customs Code of the EAEU and the Federal Law "On Customs Regulation in the Russian Federation". This is especially true of the rules governing the use of a complex and knowledge-intensive legal instrument of special knowledge in an expert form. In particular, the Federal Customs Service of the Russian Federation does not have an order approving the customs procedure (order) for the appointment of a customs expert examination. The purpose of the customs examination is related to the selection of samples of controlled goods, which implies the application of an appropriate customs procedure for customs control. Unfortunately, the Federal Customs Service of the Russian Federation still lacks a scientific substantiation of statistically significant norms for the minimum quantity of goods by groups of goods. The purpose of this article is to solve the problems of analyzing legal shortcomings in the EAEU Customs Code in order to eliminate gaps, logical contradictions and tautological definitions of concepts in the EAEU Customs Code chapter on customs expert examination, as well as the correlation of the legal categories "customs expert examination" and "forensic expert examination" assigned by customs. On the basis of a systematic approach, the article substantiates the need to correct these shortcomings and offers scientifically grounded recommendations on how to correct the defects of the legal institution of customs examination, which regulates the use of a legal instrument of customs expert examination as a measure of customs control.