Introduction

To comprehensively improve the level of product quality and promote the development of a strong trading nation, in 2023, the Chinese State Council issued the Outline for the Construction of a Strong Quality Country, declaring the need for China to shift from promoting development to improving quality and efficiency, raising the quality of exported products and the value of exported units and realising product quality upgradingFootnote 1. Agriculture is the foundation of the country, quality safety is the basis of improving the quality of agricultural products, and vigorously improving agricultural products’ quality is essential for advancing the country’s high-quality development. China has become more involved in raising the incomes of the country’s 600 million farmers. However, issues related to sanitary and phytosanitary (SPS) measures which are frequently encountered in exports such as excessive pesticide residues, preservatives, microbial contamination and metallic foreign objects have become critical factors hindering Chinese agricultural product exports; thus, agricultural products are caught in the quality upgrading dilemma (Liu and Dong 2021). Statistics released by the Korea Food and Drug Administration on irregularities in food products imported in South Korea show that 75 cases arose from Chinese agri-food products from April to June 2023, indicating a 23% increase compared with the same period in 2022Footnote 2. In the first half of 2023, the US Food and Drug Administration identified 975 batches of products from China, of which 418 cases were agri-food products, representing an annual increase of 13.9%, accounting for 42.87% of the notified products from ChinaFootnote 3. Consequently, to promote the high-quality development of China’s agricultural trade, it is essential to transition exported agricultural products from quantity to quality and urgently improve the quality and safety of Chinese exported agricultural products. In November 2021, the Ministry of Commerce issued the 14th Five-Year Plan for the High-Quality Development of Foreign Trade, which listed ‘digital trade’ as a key project of foreign trade and proposed to advance digital empowerment, accelerate digital transformation, promote the in-depth fusion of digital technology and trade development and continuously strengthen the engine of foreign trade developmentFootnote 4. Based on the digital transformation of promote the development of export trade, is undoubtedly the important way to realising the strategic goal of trade power.

Enterprise digitalisation refers to the process of enterprises’ industrial upgrading and transformation using emerging technologies (Zhang et al. 2021). As the main body of the agricultural industry chain, digital transformation has altered the value creation and value capture of the agricultural industry chain and transformed the agricultural enterprise model (Yi et al. 2021). Central Document No. 1 of 2023 noted that the implementation of in-depth digital village development should be conducted, promoting research and development (R&D) and digital application scenariosFootnote 5. The Party Central Committee clearly attaches considerable importance to digital economy development as an important aspect of high-quality agricultural development through the deep integration of the digital economy in rural industry for prosperity, agricultural modernisation and development to provide inexhaustible water and sustained momentum. The scale of the agricultural digital economy is expected to reach 1.26 trillion yuan by 2025, 7.8 trillion yuan by 2035 and 24 trillion yuan by 2050Footnote 6. From a theoretical perspective, enterprises’ digital transformation can improve the control and supervision of production processes through intelligent monitoring and optimising the digital management of the supply chain to improve the standardisation and safety of agricultural production (Wu and Yao 2023). Furthermore, digitalising data and information can improve information transmission and sharing efficiency to promote the continuous exchange of information between enterprises and consumers and improve the safety and credibility of agricultural products (Li et al. 2023). As primary participants in market economic activities and the source of vitality for economic and social development, can agricultural enterprises improve the quality and safety of exported products and address the quality and safety problems associated with exported agricultural products through digital transformation? If so, what are the mechanisms of action? Is there heterogeneity in the impact of digital transformation among agricultural enterprises? It is of great theoretical value and practical significance to answer the above questions from the micro level. In theory, it enriches and expands the theoretical framework of the impact of digital transformation on the export of enterprises, and lays the foundation for the high-quality development of China’s foreign trade by evaluating the digitalisation of enterprises. At the same time, it helps to deeply understand the new driving mechanism for upgrading the quality and safety level of enterprises’ export agricultural products in the digital era, and also provides strong empirical evidence for helping Chinese foreign trade enterprises to ride the ‘digital revolution’ and achieve high-quality export development.

The remainder of this paper is structured as follows. Section “Literature review” presents the literature review. Sections “Theoretical research and hypothesis formulation” conducts theoretical and mechanism analyses. Section “Model setting, variable construction and data sources” describes the empirical model, data and estimation strategy. Section “Empirical results and analysis” details the results. Section “Mechanism of action test” presents the mechanism testing and Section “Conclusions and policy implications” concludes.

Literature review

Three strands of literature are closely related to this study. The first strand of literature has examined the quality of agricultural exports. Studies on product quality were first proposed by Linder (1961), who argued that the level of per capita income has a direct impact on trade development and that income levels are highly correlated with national product quality requirements. Melitz (2003) argued against the assumption of homogeneity among production enterprises, proposing a novel trade theory, and research began to really consider the heterogeneity of enterprises’ product quality. Regarding the measurement of agricultural product quality, the most common models have included unit value (Schott 2004), ex-post backcasting (Khandelwal et al. 2013; Shi 2014) and nested logit (Dong and Huang 2016) methods. Regarding the influencing factors of the quality of exported agricultural products, some studies have found that trade measures such as the positive list system (Chen and Xu 2017), SPS measures in importing countries (Dong and Liu 2019), maximum residue limitation standards (Jiang and Yao 2019) and the development of digital finance (Li and Wang 2024) have compelled the quality upgrade of China’s exported agricultural products.

The second category is research on enterprise digitalisation, which focuses on its connotations, measurement and related economic effects. Studies have found that digital transformation refers to the comprehensive transformation and optimisation of business models, operating processes, value creation and delivery methods by organisations or enterprises using digital technologies and information technology to enhance their competitiveness, innovation and sustainable development (Vial, 2019; Verhoef et al. 2019). Digitalisation measurement has included three aspects of investment, application and business transformation, using annual reports of Chinese listed companies in different sample years and examining machine learning word frequency statistics to measure the digital transformation of Chinese enterprises (Liu, 2020; Du et al. 2022). In terms of the economic effects of digitisation, scholars have focused on the impact of digitalisation on enterprises’ total factor productivity, innovation, international trade, input-output efficiency and specialised division of labour. For example, Zhao et al. (2021) studied that digital transformation can promote total factor productivity by improving innovation capacity, optimising human capital structure, and reducing costs. Chaney (2014) suggested that the widespread use of information technology (ICT) can promote export growth by reducing information search and distribution costs. Loebbecke and Picot (2015) found that digital transformation can reduce the cost of effective information acquisition, optimise the enterprise’s R&D model and improve the efficiency of innovation investment. Yuan et al. (2021) argued that the digital transformation of enterprises has significantly improved the specialisation level of listed enterprises in China. Liu et al. (2021) found that there is a inverted U-shaped relationship between enterprise digital investment and efficiency.

The third strand of literature has examined the impact of firms’ digital transformation on export trade. Freund and Weinhold (2004) first suggested that adopting digital technologies removes information barriers between trading parties, widening the network of trade links between countries and expanding trade flow and scope. It has also been argued that the digital skill factor is increasingly replacing the labour factor as the main driver of firms’ production and exports (Acemoglu and Restrepo 2020). Qi and Cai (2020) found that digital transformation can expand exports, reduce entry costs and increase the number of exports, product variety and trading partners. Meijers (2014) argued that firms’ digital innovation in an industry improves the added value of products and facilitates advancement to the middle and high end of the global value chain. Nambisan et al. (2017) found that enterprises can realise rapid iterative upgrading of export products digital transformation, expediently adjust the range of export products and export high-quality products that are adapted to international market demands. For the study of agricultural trade, Liu and Gao (2022) used a vector auto-regressive model, revealing a stable dynamic relationship between the digital economy and the total number of imported and exported agricultural products. The authors also demonstrated that different agricultural products have different characteristics and the digital economy can explain the total import and export amount of animal products, grains and fruits to a greater extent. Ma and Guo (2023) found that the digital economy can expand the scale of agricultural exports and increase the technical complexity of agricultural exports.

Examining previous literature reveals that researchers have paid limited attention to the impact of enterprises’ digital transformation on agricultural product exports, and even less research has analysed the impact mechanism of digital transformation on the quality and safety of exported agricultural products according to the characteristics of agricultural products. Although Du et al. (2022) and Hong et al. (2022) both emphasized the positive impact of digital transformation on the quality of export products of enterprises, they failed to analyse the impact of digital transformation on the quality and safety of export agricultural products from the perspective of quality and safety based on the characteristics of agricultural products. Compared with industrial products, the biggest challenge facing the quality and safety of exported agricultural products is food safety and quality, which refers to ensuring that the whole process of agricultural products, from production, to processing to export, meets the quality and safety standards of importing countries and keeping them fresh and safe during transport, storage and sale. In the context of strongly advocating the empowerment of traditional agriculture with digital technology and comprehensively promoting the digital transformation of agriculture, it is essential to leverage enterprise digital transformation to address the challenges of ensuring food safety and the quality of exported agricultural products. This study uses the data of Chinese listed companies and Chinese Customs data from 2007 to 2016 to examine the of digital transformation intensity of listed companies exporting agricultural products using Python crawler technology and adopts a staggered difference-in-differences (DID) model to explore the effect and mechanism of the influence of enterprise digital transformation on the quality and safety of exported agricultural products.

Compared with the existing literature, the marginal contributions of this study are reflected in the following three aspects. (1) In terms of research perspective, this study constructs an indicator system for the quality and safety level of agricultural products from four dimensions of quality tracing, information communication, quality control, and risk prevention and focuses for the first time on the impact of enterprises’ digital transformation on the quality and safety of exported agricultural products from the perspective of food safety, expanding the research scope of the economic effects of enterprises’ digital transformation and exploring the issue of its intrinsic impact mechanisms, laying the foundation for assessing the impact of enterprises’ digitalisation on the high-quality development of China’s foreign trade. (2) In terms of research content, this paper enriches and expands the theoretical framework of the impact of digital transformation on the export of enterprises, introduces digital transformation into the heterogeneous trade model of enterprises, and discusses the impact and specific mechanism of digital transformation on the quality and safety level of export agricultural products based on the general equilibrium perspective and combined with the characteristics of agricultural products. (3) In terms of research data and modelling methodology, this study combines data from Chinese listed companies with Chinese Customs data, uses crawler technology to quantify the intensity of the digital transformation of listed companies exporting agricultural products in five dimensions: digital technology application, digital information system, digital intelligent management, digital marketing model, digital efficiency enhancement and explores the impact effect of enterprise digital transformation on the quality and safety of exported agricultural products and the mechanisms of impact based on a staggered DID model, providing micro-level evidence regarding enterprises’ digital transformation.

Theoretical research and hypothesis formulation

Theoretical models

Based on the heterogeneous trade model proposed by Melitz (2003) and Antoniades (2015), this paper incorporates the factors of digital transformation into an open economic framework, comprehensively considering the personalised needs of consumers and the cost characteristics of manufacturers. By solving for the maximisation of consumer utility and enterprise profit, the equilibrium of enterprise quality investment is obtained, and the impact of digital transformation on the quality and safety level of exported agricultural products is theoretically discussed.

Consumers

Assume that firms in the country \(i\) export products to the country \(j\) where \(i,j\in 1,\mathrm{..}.N\), the country \(j\) has \({L}_{j}\) consumers who consume the product set \({\varOmega }_{j}\) and that the utility function of the consumers is of the Dixit–Stiglitz form, which can be expressed as follows:

$${U}_{j}={\left\{{{\int_{\omega \in {\varOmega }_{j}}}{\left[{q}_{ij}(\omega ){x}_{ij}(\omega )\right]}}^{\frac{\sigma -1}{\sigma }}d\omega \right\}}^{\frac{\sigma -1}{\sigma }}$$
(1)

In Eq. (1), \(\sigma > 1\) denotes the elasticity of substitution between different commodities. \({q}_{ij}(\omega )\) is the quality of the product \(\omega\), and \({x}_{ij}(\omega )\) represents the demand of the country \(j\) for the product \(\omega\) in the country \(i\), which can be expressed as follows:

$${x}_{ij}(\omega )={q}_{ij}{(\omega )}^{\sigma -1}{p}_{ij}{(\omega )}^{-\sigma }{P}_{j}{(\omega )}^{\sigma -1}{E}_{j}$$
(2)

Equation (2) represents the optimal demand of consumers in the country \(j\) for the product \(\omega\) in the country \(i\). \({p}_{ij}(\omega )\) is the price of the product \(\omega\), \({P}_{j}(\omega )=\{{{\int }_{\omega \in {\varOmega }_{j}}[{p}_{ij}(\omega )/{q}_{ij}(\omega )]}^{1-\sigma }]d\omega {\}}^{\frac{1-\sigma }{\sigma }}\) is the total price index of all products consumed in the country \(j\), and \({E}_{j}\) is the total expenditure on these products in the country \(j\). As the price of a product falls or the quality improves, consumer demand increases.

Enterprises

Assuming that the firm is in a monopolistically competitive market, the firm faces two types of fixed costs, namely fixed export costs \({f}_{ij}\) (excluding trade variable costs \({\tau }_{ij}\)) and fixed production costs \({f}_{d}{q}_{ij}^{\beta }\). \({f}_{d}\) denotes the fixed cost of production in the absence of quality adjustment. \(\beta > 0\) denotes a measure of the elasticity of fixed production costs with respect to the quality of the product, which usually consists of fixed capital inputs that include the firm’s R&D or production equipment inputs. Since the digital transformation of a firm reduces the cost of search and the cost of information exchange, \({\tau }_{ij}=\alpha f(\cdot ){e}^{-dig}\), \({\tau }_{ij}^{\text{'}}=-dig\ast \alpha f(\cdot ){e}^{-dig-1} < 0\). Assuming that the unit cost of a firm’s quality inputs is \({\mu }_{i}\), its relationship with digital transformation can be expressed as \({\mu }_{i}(dig)\), \({\mu }_{i}^{\text{'}}(dig) < 0\). Here, \({\mu }_{i}\) is also influenced by other factors of production such as labour and capital. Using \(c(\cdot )\) as a measure of the unit cost of other influences on the quality inputs of the firm, the cost of quality due to digital transformation is denoted as: \({\mu }_{i}=\frac{c(\cdot )}{{e}^{dig}}\).

Define \({\theta }_{L}\) as the productivity of a firm’s labour force, and the relationship between the productivity of a firm’s labour force and the digital transformation of a firm as \({\theta }_{L}(dig)\), where \({\theta }_{L}^{\text{'}}(dig) > 0\). Assuming that each labour force has increased its productivity by acquiring better technology (\(\xi\)), it follows:

$${\theta }_{L}=\frac{Y}{L}=\frac{{(K{e}^{dig})}^{{\beta }_{1}}{(\xi L)}^{{\beta }_{2}}}{L}={{e}^{{\beta }_{1}}}^{dig}\left(\frac{K}{L}\right){\xi }^{{\beta }_{2}}{L}^{{\beta }_{1}+{\beta }_{2}-1}$$
(3)

Assuming that quality is positively related to the marginal cost of production, the total factor productivity (TFP) function per unit of firm in the country \(i\) can be defined as:

$$\varphi ({\theta }_{k},{\theta }_{L})=\varphi =C{\theta }_{L}^{{\rho }_{1}}{\theta }_{K}^{{\rho }_{2}},\,{\rho }_{1}+{\rho }_{2}=1$$
(4)

In the above equation, \(\varphi ({\theta }_{k},{\theta }_{L})\) increases as \({\theta }_{k}\) and \({\theta }_{L}\) increase. Therefore, the marginal cost of production of a product exported from the country \(i\) to the country \(j\) should be \({\mu }_{i}{\tau }_{ij}{q}_{ij}^{\alpha }/\varphi ({\theta }_{k},{\theta }_{L})\). Where \(\alpha \in (0,1)\) represents the elasticity of marginal cost with respect to product quality.

Balanced quality inputs from enterprises

Combining the consumer utility function and the firm’s production function, the firm’s profit from exports from the country \(i\) to the country \(j\) should be:

$$\mathop{max}\limits_{{p}_{ij},{q}_{ij}}\left({p}_{ij}(\omega )-\frac{{\mu }_{i}{\tau }_{ij}{q}_{ij}^{\alpha }}{\varphi ({\theta }_{K},{\theta }_{L})}\right){q}_{ij}{(\omega )}^{\sigma -1}{p}_{j}{(\omega )}^{\sigma -1}{E}_{j}-{f}_{d}{q}_{ij}^{\beta }(\omega )-{f}_{ij}$$
(5)

For the first order condition, this yields:

$${p}_{ij}(\omega )=\frac{\sigma }{\sigma -1}\frac{{\mu }_{i}{\tau }_{ij}{q}_{ij}^{\alpha }}{\varphi ({\theta }_{K},{\theta }_{L})}$$
(6)
$$\frac{\sigma -1}{\sigma }{q}_{ij}^{\sigma -2}(\omega )\frac{{p}_{ij}{(\omega )}^{1-\sigma }}{{p}_{ij}{(\omega )}^{1-\sigma }}{E}_{j}=\beta {f}_{d}{q}_{ij}^{\beta -1}(\omega )$$
(7)

From Eqs. (6) and (7), the optimal quantity decision made by the firm can be determined by the following conditions:

$${q}_{ij}^{\beta -(1-\alpha )(\sigma -1)}(\omega )=\frac{\sigma -1}{\beta \sigma {f}_{d}}{\left(\frac{\sigma }{\sigma -1}\frac{{\mu }_{i}{\tau }_{ij}{q}_{ij}^{\alpha }}{\varphi ({\theta }_{K},{\theta }_{L})}\right)}^{1-\sigma }\frac{{E}_{j}}{{p}_{j}{(\omega )}^{1-\sigma }}$$
(8)

In Eq. (8), \(\beta -(1-\alpha )(\sigma -1) > 0\), holding all other factors constant, the firm’s optimal quality increases as the cost of trade \({\tau }_{ij}\) decreases (\(1-\alpha < 0\)). Combined with the conditions of \({\tau }_{ij}^{\text{'}} < 0\), the hypothesis can be obtained:

Hypothesis 1: Digital transformation of enterprises improves the quality and safety of exported agricultural products.

Mechanisms

Enterprise digital transformation raises the quality and safety of exported agricultural products through technological innovation, product tracing, information sharing and quality assurance effects (See Fig. 1).

Fig. 1
figure 1

The mechanism of the digital transformation of enterprises and the quality and safety of exported agricultural products.

Technological innovation effect

Innovation is a powerful tool to strengthen enterprises’ competitive advantage and the primary driving force for incentivising enterprises to enter the global market and advance export quality upgrading (Carboni and Medda 2020). First, the digital transformation of enterprises brings digital production factors to agricultural trade. Digital production factors such as the Internet of Things, big data analytics and artificial intelligence have improved the efficiency of agricultural production and management, increased the transparency of the market, and promoted cross-border cooperation and innovation, creating good conditions for the sustainable development of agricultural trade and the income growth of farmers (Wen and Chen 2020). Second, digital transformation transforms agricultural production. The addition of digital production factors change the practices of traditional agricultural production, which are predominantly guided by human experience and promotes the transformation of crude and non-standard traditional agricultural practices to standardised and accurate agricultural production. These benefits advance the improvement of agricultural production efficiency and the quality and safety of exported agricultural products (Sun et al. 2023). Second, digitalisation enables technical information sharing. Digital technologies such as the internet promote users’ access to explicit and implicit knowledge and technology sharing (Grant et al. 2010), and enterprises can employ digital technologies to access and learn to navigate new agricultural technology resources such as Good Agricultural Practices audit implementation, enhanced planting and cultivation practices and external knowledge on the rational use of pesticides and chemical fertilisers and introduction to new technology and promote the continuous optimisation and innovation of agricultural products, promoting continuous quality improvement of exported agricultural products. Therefore, this study proposes the following:

Hypothesis 2: Digital transformation improves the quality and safety of exported agricultural products through technological innovation effect.

Product traceability effect

First, digitalisation enables the traceability of agricultural products’ entire production chain. By using digital technology, enterprises can establish a complete archive and information database of the production process, recording key data and information regarding all aspects of agricultural products’ planting, breeding, production, processing, packaging and transport. This information can help enterprises trace the source, production conditions, direction of flow and other important information of agricultural products to strengthen quality control and ensure quality and safety (Tan et al. 2015). Agricultural export enterprises face risks such as freshness and obstruction of traffic and logistics in transport, and digital transformation can improve agricultural export enterprises’ information circulation efficiency, enable enterprises to obtain timely and effective market information and logistics information more expediently, facilitate efficient communication between upstream farmers and downstream enterprises, conduct risk prediction and prevention and reduce supply chain risk (Song et al. 2023). These benefits subsequently ensure enterprises’ production efficiency and improve the quality and safety of export products. Second, digitalisation enables rapid recall and location of agricultural products’ problems. When quality and safety problems arise for exported agricultural products, enterprises can rapidly locate and investigate the root causes of food safety problems using efficient digital traceability system, expediently implement corrective measures, implement precise recall or treatment measures, reduce the quantity and scope of affected agricultural products and protect the rights and interests of consumers (Rauniyar et al. 2023), which leads to the hypothesis:

Hypothesis 3: Digital transformation improves the quality and safety of exported agricultural products through product traceability effect.

Information sharing effect

Through digital transformation, companies can share more information with consumers regarding product origins, quality and production processes, increasing product transparency and traceability, reducing food safety issues and promoting the production and export of high-quality agricultural products. First, digital traceability information sharing can be implemented as enterprises can establish a supply chain system with higher transparency and traceability using digital technology (Zhang and Gu 2023). By scanning the QR code on the product packaging or using mobile phone apps and other digitally enabled techniques, consumers can obtain information on the entire trajectory of agricultural products’ planting, breeding, production and processing in addition to quality test results, including data on pesticide residues, heavy metal content, nutrient content and other relevant considerations. This transparency effectively alleviates the information asymmetry between producers and consumers and increases consumers’ trust in product quality and safety (Cuesta et al. 2013). Companies can also employ big data analytic to monitor and analyse key indicators in the production process in addition to market and consumer behaviour data. Using this information, enterprises can proactively establish early warning systems to early detection systems for potential food safety issues and implement appropriate measures to intervene and improve the quality of exported agricultural products. Second, digital transformation enables companies to expediently collect, analyse and respond to consumer feedback and monitoring information (Zhang et al. 2023). Consumers can share opinions and suggestions on the quality of exported agricultural products and food safety through social media, online surveys, evaluation platforms and other channels. Enterprises can use this information to quickly identify and address potential problems and apply measures to improve the quality of exported agricultural products and production processes. Therefore, we propose the following hypothesis:

Hypothesis 4: Digital transformation improves the quality and safety of exported agricultural products through information sharing effect.

Quality assurance effect

Enterprises can use digital technology to establish a digital product certification system to manage and verify agricultural products’ quality certification and labelling information more efficiently and accurately, enhance market trust and reduce the occurrence of food safety incidents (Wang et al. 2023). First, quality assurance systems ensure the authenticity and integrity of agricultural products’ certification information. Compared with paper certifications, electronic certification uses technical means such as encryption algorithms and digital signatures, reducing the risk of tampering and facilitating traceability and verification (Dogui and Ivanov 2022) and guaranteeing the quality and safety of exported agricultural products. Second, enterprises can present quality certification and labelling information for consumers on digital platforms, demonstrate product quality through visual elements that confirm safety information in the form of certificates and certification marks and externalise intrinsic quality information of the products, transforming the attributes of agricultural products from trusted goods to searched goods (Hong and Cho 2011). Consumers in importing countries can verify the certification status of the products online, providing real-time information regarding the products’ characteristics and quality, which improves the level of food safety compliance and enhances the credibility and competitiveness of the exported agricultural products. Therefore, this study proposes the final hypothesis:

Hypothesis 5: Digital transformation improves the quality and safety of exported agricultural products through quality assurance effect.

Model setting, variable construction and data sources

Modelling

To quantify the impact of agricultural export enterprises’ digital transformation on the quality of exported agricultural products, based on the theoretical analysis above, this study adopts the two-way fixed effect model and uses the staggered DID model for empirical testing (Nunn and Qian 2011). The basic idea for this approach is that because enterprises have undergone digital transformation at different points in time and to varying degrees, ordinary DID models cannot measure the change and degree of digital transformation. This study subsequently adopts a staggered DID model for testing, setting enterprises with no digital transformation as the control group and enterprises with any degree of digital transformation as the experimental group. In the sample observation period, most enterprises’ degree of digital transformation has undergone a shift from 0 to non-0, in alignment with the design of the intensity variable in the staggered DID, which provides a better quasi-natural experimental environment for this study, and the specific model is constructed as follows:

$$qua\,{\_}\,sa{f}_{fkjt}=\alpha +\beta digita{l}_{ft}\ast pos{t}_{ft}+\gamma \sum Contro{l}_{kjt}+{\delta }_{ik}+{\delta }_{jk}+{\delta }_{ij}+{\delta }_{kt}+{\varepsilon }_{fkjt}$$
(9)

Where \(f\), \(k\), \(j\) and \(t\) denote the enterprise, product, destination country and year respectively. The explanatory variable \(qua\_sa{f}_{fkjt}\) is the quality and safety of agricultural products exported by the enterprise, the core explanatory variable \(digita{l}_{ft}\) is the degree of digital transformation of the enterprise \(f\) in the year \(t\), \(pos{t}_{ft}\) indicates whether the enterprise has undergone digital transformation in the year \(t\), if yes, then it takes 1, otherwise it takes 0; \(Contro{l}_{kjt}\) represents the control variables. This paper also controls the two-dimensional combination of the enterprise-product fixed effect \({\delta }_{ik}\), the two-dimensional combination of the destination country-product fixed effect \({\delta }_{jk}\), and the firm-destination country fixed effects \({\delta }_{jk}\), and further controls for product-year fixed effects \({\delta }_{kt}\), so as to control for all individual effects related to firms, products and destinations that do not change over time; \({\varepsilon }_{fkjt}\) is the error term, and \(\beta\) is the core estimation parameter representing the net effect of the impact of firms’ digital transformation on the quality and safety of China’s exported agricultural products.

Measurement and description of variables

Explained variable

The explanatory variable is the quality and safety level of exported agricultural products (\(qua\,{\_}\,sa{f}_{fkjt}\)). Since the concept of ‘Food Safety’ was put forward by the Food and Agriculture Organisation of the United Nations in 1974, food safety can be divided into two levels: Food security and Food safety. Food security refers to the availability of adequate food at the global, national and regional levels, and household levels (Pinstrup-Andersen 2009). Food Safety, mainly from the perspective of food hygiene and safety, requires that food should avoid the threat of food-borne diseases in the production process (Kirch 2008). In demonstrating the practicability and feasibility of systematic evaluation of food and feed safety, experts from the European Food Safety Authority (EFSA) believe that food safety is a multi-faceted concept that needs to be comprehensively considered from the four perspectives of human health, plant health, animal welfare and environment (Aiassaa et al. 2015). Food safety is a macro concept involving many factors. At present, food safety is defined through the three dimensions of quantity safety, quality safety and sustainability, and an indicator system for evaluating food safety is built on this basis, which has gained wide consensus. For example, the food safety evaluation index system built by the Economist takes quantitative safety, quality safety and sustainability as three first-level indicators.

The quality and safety of agricultural products covers all the quality attributes of agricultural products and highlights the safety attributes, highlighting the overall quality safety concept of agricultural products management. The quality and safety information of agricultural products is the effective information that can reflect the quality characteristics of agricultural products such as the safety of agricultural products, packaging of agricultural products and production process of agricultural products. Therefore, this paper uses content analysis to define and measure the quality and safety information disclosure of sample enterprises, in accordance with the provisions of the national food safety standard ‘General Hygiene Standards for Food Production’ (GB 14881-2013), referring to the social responsibility index system in Guide 3.0 for Food Enterprises issued by the Chinese Academy of Social Sciences, and with reference to the research of Alix-Garcia et al. (2013), Sumner and Ross (2002), Chen (2016) and Cheng et al. (2019). Based on the perspectives of food quality and safety assurance, food quality and safety information disclosure and customer responsibility, the words ‘traceability’, ‘product quality’, ‘certification’, ‘risk management’ and ‘food safety’ were retrieved from the annual report, internal control self-evaluation report and social responsibility report of the sample enterprises, from the four dimensions of quality traceability, information communication, quality control and risk prevention. A total of 18 indicators were used to measure the quality and safety level of the sample enterprises (see Table 1). Score item by item according to the actual disclosure situation of the quality safety level of export agricultural products of the enterprise, and assign 1 value to each disclosure content, that is, if the sample enterprise discloses one of the indicators, assign 1 value, otherwise, 0 value, and summarise the score value of the quality safety level of export agricultural products of the enterprise. As enterprises attach different importance to core and peripheral products, enterprises will tilt internal resources and management focus to core products, adjust product mix and improve the quality of core products (Sun et al. 2022), including more and better production factors and a larger share of R&D investment, so as to improve the quality of core products. Therefore, this paper takes the export value as the weight, and refines the quality and safety level of export agricultural products from the enterprise level to the product level.

Table 1 Indicators for evaluating information on the quality and safety level of exported agricultural products by enterprises.

Policy variable

The Policy variable is enterprise digitalisation transformation index (\(digita{l}_{ft}\)). This study uses the Python crawler function to identify keyword word frequencies in the annual reports of listed companies exporting agricultural products, constructs a thesaurus and quantifies the word frequencies to determine listed companies’ degree of digital transformation (see Table 2). This measurement method makes up for the insufficiency of dummy variables used in previous studies, quantifies the differences in digital transformation intensity and also establishes a suitable data environment for conducting a quasi-natural experiment with staggered DID (Yuan et al. 2021). Based on the above analyses, we use the text analysis method to delineate indicators of enterprises’ degree of digital transformation. Specifically, in the initial step, we first screen keywords indicating digital transformation from policy documents on advancing the digital economy released by the state, digitalisation themes and literature related to agricultural digitalisation. According to the research intent of this study, words related to food safety, agricultural production and agricultural trade are then selected from the keywords of digital transformation. In the second step, we supplemented the keyword thesaurus by examining agriculture- and digitalisation-related words that appear more frequently in the annual reports of listed companies. In the third step, we referenced the 2021 Research Report on the Digital Transformation of Central Enterprises, the 2022 Research Report on the Digital Transformation of Chinese Private Enterprises and the 2022 Report on the Development of China’s Digital Countryside, dividing the keywords into five dimensions according to ‘digital technology application’, ‘digital information system’, ‘digital intelligent management’, ‘digital marketing model’ and ‘digital efficiency improvement’. In the fourth step, using the keyword thesaurus formed in the above steps, we count the frequency of words involving the above keywords in the annual reports of listed companies exporting agricultural products and take the logarithm of the frequency of the words to establish an indicator of enterprises’ degree of digital transformation (\(digita{l}_{ft}\)), where a larger the indicator value indicates a higher degree of enterprise digital transformation.

Table 2 Enterprise digital transformation index construction and keyword selection.

Control variables

This paper also controls for other variables that affect the quality and safety of exported agricultural products, of which \(SP{S}_{kjt}\) is the importing country’s SPS measure, measured by the number of notifications made by the importing country to the HS 2-digit code level in the period of \(t-1\); \(ope{n}_{jt}\) is the importing country’s level of openness to the outside world, which is expressed by the importing country’s total imports and exports in terms of the share of its GDP, and is used to measure the relevance of the importing country to the outside economy; \(pgd{p}_{jt}\) is the importing country’s level of per capita income, which measures \(exchang{e}_{jt}\) is the exchange rate of RMB, which is converted using the US dollar as an intermediary measure to control the impact of trade costs; tariffs of importing countries’ products (\(tarif{f}_{jt}\)) are expressed as tariff rates corresponding to HS6-coded products, which are used to control the impact of tariff barriers, and missing values are replaced by tariff rates of HS4- or HS2-coded industries; geographic distance (\(distanc{e}_{jt}\)) is measured as the geographic distance between the capitals of China and the importing countries.

Data description and descriptive statistics

The data used in the empirical research of this study are obtained from the China Customs Database, the Cathay Pacific Financial and Economic Database (CSMAR), the RESSET Financial Research Database and listed companies’ annual financial reports. Considering that all listed companies began to implement the new accounting standard system on 1 January 2007, and some indicators are only counted from 2007 onwards and currently available Chinese Customs data cover 2000–2016, to ensure the consistency of our data indicator measurements, this study uses data from 2007 to 2016 for the study. After matching the above data, we cleaned the data as follows. (1) Excluding financial, ST and *ST enterprises, and retaining only A-share listed companies. (2) Excluding data with missing values for key indicators such as total assets, revenue and number of employees or data that do not comply with accounting rules. Among the control variables, the data for importing countries’ per capita GDP, population size, degree of openness to the outside world, product tariffs and exchange rates are obtained from the World Bank database, geographic distance data are obtained from CEPII-GeoDist database and SPS measures data are obtained from the World Trade Organisation’s notification system for SPS measures. Descriptive statistics of the variables are detailed in Table 3.

Table 3 Variable definitions and descriptive statistics.

Empirical results and analysis

Typical facts and a priori judgements

In order to reflect more intuitively the changes in the quality of exported agricultural products in the experimental and control groups over the sample period, this paper uses curves to portray the trends in the average quality index of exported agricultural products in the experimental and control groups, respectively, as shown in Fig. 2. China’s substantial policies regarding the development of digital transformation began in 2013, and the creation of new types of digital economy businesses mainly occurred after this (Ma et al. 2015; Du and Zhang 2021). As can be seen from Fig. 2, before 2013, there were fluctuations in the quality index of exported agricultural products in the experimental group and the control group, and after 2013 the quality index of exported agricultural products in the experimental group and the control group generally showed an upward trend, and for the experimental group, the trend of growth in the quality of the export was significantly stronger than that of the control group. Among them, the experimental group’s export agricultural product quality index increased more after 2013, indicating that the quality of export agricultural products was affected by factors such as digital transformation and changes in the international trade environment. As an ex ante test, Fig. 2 reflects from the side that the difference in the change in the quality of exported agricultural products between the experimental group and the control group is correlated with the digital transformation of enterprises, which provides an a priori judgement for this paper’s empirical research using the staggered double-difference model.

Fig. 2
figure 2

Trends in the quality and safety level of exported agricultural products.

Parallel trend test

The DID model requires that the data satisfy the parallel trend assumption that prior to firms’ digital transformation, digitally transformed (treat group) and non-digitally transformed (control group) firms essentially maintained the same trend in terms of changes in export quality. Under this assumption, changes that occur in exported agricultural products’ quality after firms’ digital transformation can then be considered as the effect of policy intervention. This study references Beck et al. (2010), examining the dynamic changes in the quality of exported agricultural products before and after enterprises’ digital transformation. If the quality of exported agricultural products did not improve significantly before the digital transformation of enterprises, but improved significantly after the transformation, this indicates that this improvement is indeed attributable to digital transformation, and the conclusions drawn from the baseline regression are plausible. Considering the limitation of data length, this study selects four years prior to mutual recognition and three years following mutual recognition to conduct the dynamic trend test, establishing the fixed effect model shown below:

$$qua\,{\_}\,sa{f}_{fkjt}=\alpha +\mathop{\sum }\limits_{n=-4}^{3}{\xi }_{n}{D}_{fn}+\gamma \sum Contro{l}_{kjt}+{\delta }_{ik}+{\delta }_{jk}+{\delta }_{ij}+{\delta }_{kt}+{\varepsilon }_{fkjt}$$
(10)

In Eq. (10), \(n=t-year\) and \(year\) denote the year of the enterprise’s digital transformation shock, and \({D}_{fn}\) is a dummy variable; if the enterprise \(f\) is a digitally transformed enterprise and the year is \(year\) from the year of the transformation shock, \({D}_{fn}\) is set to take the value of ‘1’, otherwise it is ‘0’. Here, the time interval before and after the transformation impact is narrowed to the first 4 and the last 3 periodsFootnote 7, so that \({D}_{in}\) is a set of variables including \([{D}_{i(-4)},{D}_{i(-3)},\mathrm{..}.,{D}_{i(0)},\mathrm{..}.{D}_{i(3)}]\). The remaining variables in Eq. (10) have the same symbolic meaning as in Eq. (9). The parallel trend test focuses on the changes in a series of coefficients \({\xi }_{n}\).

Based on the size and significance of the economic effect in each period in Fig. 3, the positive impact effect in each period after digital transformation is greater, changing from an insignificant effect to a significant effect, confirming that before digital transformation, no significant difference is evident between the transformed and non-transformed enterprises in the quality of exported agricultural products. In contrast, after the transformation shock, the quality of the exported agricultural products of the transformed enterprises compared to the non-transformed enterprises significantly improved, indicating the effectiveness of digital transformation. In terms of the trend of change in the effect of digital transformation, the positive impact effect increasingly rises, which lasts until the third period after the digital transformation, indicating that enterprises’ digital transformation has a medium- to long-term effect in promoting the quality of exported agricultural products.

Fig. 3
figure 3

Dynamic effects of quality and safety of exported agricultural products.

Estimated results of the benchmark regression

Considering that the occurrence of ‘zero trade flow’ prevails in reality due to excessive trade costs, and that the trade impact identification model of enterprise digital transformation includes fixed effects at country, enterprise, product and time levels, we reference Correia et al. (2020), testing the impact of enterprises’ digital transformation on the quality of exported agricultural products using Poisson pseudo-maximum likelihood method and Stata software. The regression results are presented in Table 4.

Table 4 Benchmark regression results.

Examining the baseline regression analyses in Table 4, the coefficients of digital in columns (1)–(3) are significant and positive after the inclusion of control variables and fixed effects variables, indicating that enterprises’ digital transformation significantly improves exported agricultural products’ overall quality and alleviates the food safety concerns of exported agricultural products, which improves the quality of China’s exported agricultural products, supporting Hypothesis 1. For example, Yantai Shuangta Foods Co., Ltd, which is a leading manufacturer of Longkou vermicelli, focuses on the digital economy and uses enterprise big data, establishing an information technology software system, information technology hardware and the fusion of digitalisation and business operations to develop an internal data source for the enterprise. Through digital empowerment, the company realises the fusion of digital and production management, successfully making the ‘green factory’ list, which is a national green food manufacturing benchmark for enterprises. From 2023 January to October, Yantai Shuangta Foods exported 820 million yuan in product export value, representing an average annual growth rate of 5%Footnote 8.

The coefficients of the control variables are in line with expectations, with positive coefficients for the variables of GDP per capita in the importing country and the degree of openness to the outside world, indicating that a high level of economic level in the importing country and a high degree of openness to the outside world can help to improve the quality and safety of China’s agricultural exports. The negative coefficients on the variables of tariffs on products from importing countries, RMB exchange rate, and geographical distance indicate that high tariffs in importing countries, RMB appreciation, and China’s distance from importing countries hinder the quality upgrading of China’s exported agricultural products.The coefficient of the SPS on the upgrading of agricultural products is uncertain, possibly because the effect of SPS measures on quality upgrading depends on the magnitude of the cost of compliance and the cost of market shifting (Liu and Dong 2021).

Robustness tests

This study conducts five robustness tests to ensure the accuracy of the baseline regression results.

Dependent variable replacement

In this paper, the quality of the current period is worse than that of the previous period to represent the quality upgrade (\(qualit{y}_{fjkt}^{\text{'}}\)). As for the measurement of product quality, according to the research of Khandelwal et al. (2013) and Shi (2014), Eq. (11) is regression:The results presented in column (1) of Table 5 are basically the same as those of the benchmark regression, validating that the benchmark regression results are robust.

$$ln{q}_{fjkt}+{\sigma }_{k}ln{p}_{fjkt}={\delta }_{k}+{\delta }_{jt}+{\varepsilon }_{fjkt}$$
(11)

Where \({q}_{fjkt}\) and \({p}_{fjkt}\) are the number of products exported by the firm and the price of the exported products, \({\sigma }_{k}\) is the elasticity of substitution of the product \(k\), \({\delta }_{k}\) and \({\delta }_{jt}\) are the product fixed effects, time fixed effects of the importing country, and \({\varepsilon }_{fjkt}\) is the residual component. Using the sample data of price and quantity, OLS regression of the above equations gives the quality of the product being estimated, which is expressed in the form:

$$qualit{y}_{fjkt}=\frac{{\hat{\varepsilon }}_{fjkt}}{{\sigma }_{k}-1}$$
(12)
Table 5 Regression results of dependent variable replacement, sample truncation and Heckman two-step test (Robustness test).

The final expression for product quality can be obtained by normalising the results of Eq. (12),

$$qualit{y}_{fjkt}^{\text{'}}=\frac{qualit{y}_{fjkt}-minqualit{y}_{fjkt}}{maxqualit{y}_{fjkt}-minqualit{y}_{fjkt}}$$
(13)

Where \(maxqualit{y}_{kt}\) and \(minqualit{y}_{kt}\) denote the maximum and minimum values of the quality of the product \(k\) exported to all destination countries in the year \(t\), respectively, and \(qualit{y}_{fjkt}^{\text{'}}\) is the quality of the firm \(f\) exporting the product \(k\) to the country \(j\) in the year \(t\).

Sample shrinkage and truncation treatment

To effectively avoid the impact of outliers on the estimation results, this study references Crinò and Ogliari (2015), conducting bilateral shrinking and bilateral truncation for the sample (i.e. all the results in the 1% and 5% quartiles are directly excluded as outliers, and the re-estimating Eq. (9)). Combined with the results in columns (2) and (3) of Table 5, digital is basically consistent with the regression results in Table 3 in terms of coefficient size, sign and significance, further verifying our benchmark results.

Overcoming sample selection bias

We next apply the Heckman two-step approach to overcome sample selection bias. We use whether firms had exporting behaviour in the previous period as the exclusion variable (Chatterjee et al. 2013) and the test results are reported in column (4) of Table 6, with significant coefficients on the inverse Mills ratio, indicating that firms’ digital transformation still significantly improves the quality upgrade of exports.

Table 6 Regression results of digital transformation shock point selection and placebo test (Robustness test).

Digital transformation shock time selection

In order to test the effectiveness of digital transformation time point selection, on the one hand, the digital transformation time point is set as two years before the digital transformation time, one year before and one year after the digital transformation time for testing. The results of columns (1)–(3) in Table 6 show that the two years before the digital transformation time and one year before the digital transformation time have no significant impact on the quality and safety level of export agricultural products. One year after the digital transformation, the quality and safety level of export agricultural products had a positive promoting effect.

Placebo test

To test whether the effects of digital transformation derived above are potentially driven by unobservant factors at the country-product-year level, we next conduct a placebo test by randomly assigning mutually recognised products (Cai et al. 2016). Firms are randomly selected as the treatment group and assumed to have undergone digital transformation, while others are non-digitally transformed firms, establishing ‘pseudo’ treatment and control groups. In this paper, the quality upgrading of China’s exported agricultural products is regressed 1000 times as an explanatory variable. The estimated coefficients of digital in column (4) of Table 6 are insignificant, once again confirming that the baseline regression results are robust.

Endogeneity test

Considering that firms exporting high-quality products can be considered to have particular incentives to take the initiative to implement digital transformation, this creates a potential two-way causation problem. To address the potential reverse causation problem, this study uses a lagged period of digital transformation data, which is based on the fact that since enterprises’ digital transformation is a continuous process, the degree of digital transformation in the previous year is the basis for the digital transformation of the current year, and at the same time, a certain time lag effect of the impact of digital transformation on exports is expected. Therefore, the degree of digital transformation in the previous year should have an impact on exports in the current year, but the enterprise’s exports in the current year will not impact the digital transformation of the previous year. The results of the test are as shown in column (1) of Table 7.

Table 7 Endogeneity test.

To address the possible omitted variables problem, this paper uses the instrumental variable two-stage least squares (IV-2SLS) method for testing. First, referencing Du et al. (2022), we use the density of long-distance fibre-optic cable lines in the province where the listed company is located as an IV for enterprise digital transformation (i.e. instrumental variable = long-distance fibre-optic cable lines in the province where the listed company is located/area of the host province and city). First, Internet access and continuously updated data are the crucial components of enterprises’ digital transformation, and long-distance cable lines are important infrastructure for data transmission, where denser long-distance cable lines in a province indicate better the digital infrastructure in the province and a higher degree of satisfaction of the external conditions for enterprise digital transformation. Therefore, the degree of enterprise digital transformation is highly correlated with the density of long-distance cable lines in the province where the company is located. Second, the density of long-distance cable lines is a function of the area of the province where the listed company is located, and the density of long-distance cable lines is controlled by the four major network operators in China, meaning that enterprises cannot change or control the density of long-distance cable lines according to their own needs. Thus, the density of long-distance cable lines cannot impact the export scale or product quality of the enterprises in this province, which meets the conditions for the use of IVs. The results of the test are presented in column (2) of Table 7.

Second, as listed companies are distributed in various cities, and even in the same province, and each city has differences in development, we reference Huang et al. (2019) and use the number of post offices per million population in each city in 1984 as an IV for firms’ digital transformation, and further introduce city fixed effects. Historically, post and telecommunications have been important means of communication, and the number of post and telecommunications in history is expected to affect the local acceptance of information technology, with an impact on the application and promotion of information technology in the local area. Therefore, a certain degree of correlation is assumed between the number of post and telecommunications in a city and firms’ digital transformation. Furthermore, post and telecommunications are social and public service facilities focusing on the provision of communications for the general public; therefore it does not have an impact on enterprises’ export scale and product quality, satisfying the conditions for the use of instrumental variables. Since the 1984 post and telecommunications data are cross-sectional data, while the data used in this study are panel data, we reference Zhao et al. (2020), using and the cross-multiplier terms of the number of post and telecommunications per million people in each city in 1984 and the number of people who have accessed the internet nationwide in the previous year as the IV data for enterprises’ digital transformation. The results of the test are shown in column (3) of Table 7, revealing that the impact of firms’ digital transformation on the quality of exported agricultural products remains significantly positive, indicating that the estimation results are still robust after addressing endogeneity problems caused by reverse causation and omitted variables. In addition, in the estimation results of IV method, the p-values of Kleibergen-Paap rk LM statistics are all 0, rejecting the original hypothesis that IVs are not identifiable at the 1% level. In addition, the Kleibergen-Paap rk Wald F-values are all greater than the 10% critical value of 16.38; thus, the original hypothesis of weak IVs is rejected, indicating valid IVs.

Heterogeneity test

Heterogeneity in the level of export destination countries’ economic development

The impact of enterprises’ digital transformation on upgrading the quality of exported agricultural products may also vary depending on export destination countries’ economic development. We examine the impact of firms’ digital transformation on the quality of agricultural exports from developed and developing countries separately according to the World Bank’s classification of developed and developing countries. Columns (1) and (2) of Table 8 reveal that the impact of firms’ digital transformation on the quality of agricultural products exported to developed and developing countries is positive and has a greater impact on exports to developed countries than developing countries. The possible rationale for this outcome is that in countries with a high level of economic development, consumers’ shopping habits and behavioural patterns tend to be more online, which provides a new sales channel for digitally transformed firms exporting agricultural products, through which they can directly reach consumers, reduce sales costs and improve transparency and transaction efficiency. This means more sales channels and higher sales efficiency for digitally transformed enterprises, which improves the quality of exported agricultural products. In addition, consumers in developed countries usually have more disposable income to spend on high-quality agricultural products and are more concerned about the quality, safety and nutritional value of the food, agricultural production methods and the impact on the environment and animal welfare.

Table 8 Heterogeneity test results for the level of economic development of importing countries and exporting firms.

Heterogeneity of exporting firms

At the level of export enterprises, the regions where export enterprises are located and enterprise ownership are important factors that can affect enterprises’ digital transformation of upgrade the quality of exported agricultural products. Among them, for the region where the export enterprises are located (\(area\)), considering the differences in the digital development of enterprises in different regions, this study divides the sample into eastern, central and western regions according to the region where the enterprises are located to conduct regressions. For enterprise ownership (\(ownership\)), this study divides the enterprises into state-owned and non-state-owned samples for regression according to the nature of the actual controller of the enterprise. The results in columns (3)–(5) of Table 8 show that the coefficient of enterprise digital transformation on the quality of exported agricultural products in the eastern region is significantly positive, while the regression results for enterprises in central and western regions are not significant. The possible reasons for this are that with the higher level of economic development in the eastern region, which generally has a leading role in the development of high-end digital industries, with more complete information infrastructure and more advanced technology, enterprises can obtain more opportunities for digital development, and also have access to better external agricultural resources and technical support, while the economic development of the central and western regions is relatively slow, with a relative lack of digital talent, technology and agricultural resources; thus, enterprises’ ability to obtain more digital development opportunities are relatively scarce, resulting in differences in enterprise development. The results in columns (6) and (7) of Table 8 show that the digital transformation of both state-owned and non-state-owned enterprises has a significant upgrading effect on the quality of exported agricultural products; however, the quality upgrading effect is greater for non-state-owned enterprises. The management, operation mechanism and corporate culture of state-owned enterprises are more inclined towards maintaining operational stability and security, and decisions to conduct digital agricultural production and activities will be relatively cautious and conservative; thus, the degree of digital transformation is lower. In addition, because the main body of agricultural exports are from state-owned enterprises, which have relative advantages in policy support, government subsidies, credit financing and other support, the agricultural exports of state-owned enterprises are subject to less competitive pressure (Shen et al. 2012). This will lead to the lack of intrinsic incentives for state-owned enterprises to innovate in agriculture, affecting improvement in the quality of exported agricultural products.

Heterogeneity of agricultural product types

We next examine the differences in the impact of digital transformation of enterprises on the quality of exported agricultural products are examined based on types of exported agricultural products. First, we classify exported products into bulk, intermediate, consumer-oriented and other related agricultural productsFootnote 9. Second, in terms of export product quality, we calculate the average product quality of each firm during the sample period, classifying the top one-third of products with the highest product quality in each HS 2-digit code as high-quality products, and the rest as medium- and low-quality products in a sub-sample regression.

The results in columns (1) and (2) of Table 9 show that firms’ digital transformation enhances the quality of low- and medium-quality agricultural products more than that of high-quality agricultural products. There is more room for improvement of lower quality products, and firms’ digital transformation will promote them more; thus, digital transformation is more likely to affect low- and medium-quality agricultural products. The regression results in columns (3)–(6) of Table 9 show that the effect of digital transformation on the quality of exported bulk and consumer-oriented agricultural products is significantly positive, while that on intermediate and other related agricultural products is not significant. The possible reason for this is that bulk and consumer-oriented agricultural products have high standards and requirements in all aspects of the production process, processing and packaging and the application of digital technology can improve the quality and safety performance of these products, obtaining a higher market value. For intermediate and other related agricultural products, the impact of digital transformation is relatively small because the quality and safety performance of these products are relatively low, and the application of digital technology has limited effect on improvement. In addition, the market competitiveness of these products primarily depends on market demand and price factors, and the application of digital technology has limited impact on market demand and price.

Table 9 Results of heterogeneity test for agricultural products.

Mechanism of action test

Model setting

Our findings demonstrate that digital transformation of firms facilitates the quality upgrade of exported agricultural products. The question that arises is through what mechanism does this process occur? This paper draws on the research of Jiang (2022) to further investigate whether enterprise digital transformation will contribute to the quality upgrading of export agricultural products through the product traceability effect, technological innovation effect, information sharing effect and quality assurance effect, and the model is constructed as follows:

$${T}_{fkjt}=\alpha +{\beta }^{\text{'}}digita{l}_{ft}\ast Pos{t}_{ft}+\gamma \sum Contro{l}_{kjt}+{\delta }_{ik}+{\delta }_{jk}+{\delta }_{ij}+{\delta }_{kt}+{\varepsilon }_{fkjt}$$
(14)

In Eq. (14), \({T}_{fkjt}\) represents the proxy variables for the technological innovation effect (\(tech\,{\_}\,in{n}_{fkjt}\)), product traceability effect (\(pro\,{\_}\,trac{e}_{fkjt}\)), information sharing effect (\(inf\,{\_}\,shar{e}_{fkjt}\)) and quality assurance effect (\(qua\,{\_}\,as{s}_{fkjt}\)), respectively, and the rest of the variables are consistent with the benchmark regression, with the coefficient \({\beta }^{\text{'}}\) being the core coefficient of interest in this paper.

Description of variables

Technological Innovation Effect (\(tech\,{\_}\,in{n}_{fkjt}\)). In this paper, we use the research and development (R&D) investment intensity (RD) of enterprises, i.e., the logarithm of the R&D investment of enterprises in the current year, to measure as a proxy variable for enterprise technological innovation, and take the natural logarithm after adding 1 to it. At the same time, the improvement of innovation level as well as technology introduction will lead to technological progress, so this paper refers to Sheng and Mao (2017), and also uses the technological complexity of export products as a proxy variable for enterprise innovation to further explore the mediating effect.

Product traceability effect (\(pro\,{\_}\,trac{e}_{fkjt}\)). In this paper, the statistics of the electronic certification mark displayed on the official website of the enterprise and Wechat public number are carried out, including the electronic certification certificate of agricultural products, the green certification of agricultural products, the organic certification, the geographical indication certification and other picture information, and the number of pictures, videos, and two-dimensional code information that provide the electronic certificate certification are cumulatively summed up, and the product traceability index of the enterprise is obtained in the end.

Information sharing effect (\(inf\,{\_}\,shar{e}_{fkjt}\)). The opening of the official website of the enterprise can facilitate consumers to understand the production process of the enterprise, and understand the relevant raw material procurement, agricultural production and processing information of the enterprise in a more graphic manner, and the establishment of the enterprise’s applet is a reflection of the enterprise’s willingness to communicate with consumers and the degree of information sharing. Therefore, this paper measures the information sharing effect through the opening of enterprise homepage and applets.

Quality assurance effect (\(qua\,{\_}\,as{s}_{fkjt}\)). An enterprise’s product quality assurance capability can be measured by establishing a sound quality management system, setting up product files, actively participating in certification assessment, and utilising technological means (Guo and Xiao, 2022). Therefore, this paper applies whether the enterprise obtains quality management certifications such as ISO9001, ISO22000, HACCP, and product certification information such as QS and CCC to measure the product traceability effect, and if it is, then it takes 1 and sums up to obtain a proxy variable for the quality assurance effect.

Mediating mechanism test

The test results for technological innovation and product traceability effects of enterprise digital transformation are presented in Table 10. In terms of the technological innovation effect, the impact of enterprise digital transformation on R&D investment intensity is significantly positive, and enterprise digital transformation promotes innovation, which subsequently promotes upgrading the quality of exported agricultural products, supporting Hypothesis 2. Digital transformation facilitates enterprises’ acquisition of new agricultural technologies and enhances coordination and resource sharing in all aspects of agricultural production, which strengthens enterprises’ innovation and ultimately improves the quality of exported agricultural products. For example, Fuling Squash constantly pushes forward and focuses on the entire industry chain of squash, opening up the data flow of green beetroot planting and acquisition, salt vegetable block processing and sales and squash marketing, among other activities, promoting quality improvement through technological and product innovation. The export volume of Fuling Squash is expected to reach 100000 tonnes, with an output value of more than 1.5 billion yuan by 2027Footnote 10.

Table 10 Results of the mediation effect test.

The effect of enterprise digital transformation on product traceability is significantly positive, supporting Hypothesis 3. The focus of agri-food enterprises is how to form a closed loop of the entire chain of quality management; for example, New Hope Dairy was the first in the industry to engage in digital transformation and upgrade, developing the digital quality management tool Fresh Source and the digital supply chain system Shipping Lychee, to trace the source of products, and launching the digital supply chain system Litchi, as the first in the industry. The company also launched the digital marketing tool Fresh Go, and the Lighthouse Factory, making food production more transparent, intelligent, efficient and flexible, to achieve industry chain visualisation, transparency and product traceability, effectively guaranteeing the quality and safety of its dairy productsFootnote 11.

The impact of enterprise digital transformation on information sharing is significantly positive, indicating that enterprise digital transformation promotes export quality upgrading by improving information sharing capacity, which supports Hypothesis 4. Digital transformation enhances information sharing in agricultural production and export links, which improves the quality and international competitiveness of agricultural products. For example, Shandong Dong’a Gum Co. comprehensively combined 5G convergence application areas and built a new retail platform for customers, an ‘internal marketisation’ platform for employees and a ‘creativity platform’ for social participation, launching the Freshly Made Ready-to-Eat customisation service, with real-time production after customers have placed orders by means of 5G. Through 5G transmission, big data and cloud computing, Shandong Dong’a Gum Co. fulfills real-time production arrangements after customers place orders and interacts with customers in the process, which has led to a significant increase in online salesFootnote 12. Dong’a products have passed all kinds of national sampling and flying inspections with high pass rates, and exports to Japan, passing the most stringent quality inspection by the Ministry of Health, Labour and Welfare of Japan, with 842 testing items, including pesticide residues, veterinary drug residues and heavy metals and bacteria, all of which are ‘zero detectable’Footnote 13.

In terms of quality assurance effects, Hypothesis 5 is supported by the assumption that firms’ digital transformation improves product certification and the quality of exported agricultural products. Through digital transformation, achieving quality certification becomes more efficient, accurate and reliable, which improves the quality and competitiveness of exported agricultural products. To provide the market and consumers with genuine Korla Scented Pears, Xinjiang Korla Scented Pear Co., Ltd. certified one million cases of Korla Scented Pears sold on its e-commerce platform with Chinese Inspection and Quarantine Agency (CIQ) traceability certification, with affixed CIQ traceability labels. Scanning the two-dimensional CIQ traceability code label provides origin information for Korla balsam pears, along with planting base, soil testing, product, quality testing, certification, manufacturers and dealers’ informationFootnote 14.

Conclusions and policy implications

Enhancing the quality of exported agricultural products and increasing trade added value is the key to establishing a new competitive advantage in exported agricultural products, building a trade powerhouse and achieving high-quality agricultural development. In this paper, based on the theoretical analysis of the mechanism of the impact of enterprise digital transformation on the quality and safety level of export agricultural products, using the data of Chinese listed companies and China Customs data from 2007 to 2016, with the help of Python crawler technology to portray the intensity of digital transformation of listed companies exporting agricultural products, and using the interleaved double difference method to explore the impact effect and mechanism of enterprise digital transformation on the quality and safety level of export agricultural products quality upgrading influence effect and mechanism. The study shows that (1) Enterprise digital transformation effectively improves the quality and safety of exported agricultural products, and this result holds after endogeneity, placebo and multiple robustness tests; (2) Heterogeneity analyses reveal that the quality and safety effect of enterprise digital transformation is greater for exporting to developed countries’ markets, non-state-owned enterprises and enterprises in the eastern region, in addition to bulk agricultural products and consumer-oriented agricultural products; (3) Mechanism analyses shows that enterprise digital transformation raises the quality and safety of exported agricultural products through technological innovation, product tracing, information sharing and quality assurance effects.

To further enhance the role of digital transformation in promoting the quality upgrading of enterprises exporting agricultural products, this study proposes three relevant policy recommendations.

First, under the trend of a new round of scientific and technological revolution and industrial transformation, China should accelerate the deep integration of digital technology and foreign trade entity enterprises, further increase the support for digital transformation of foreign trade enterprises, actively guide and help enterprises to achieve digital transformation, and break through the dilemma of ‘do not want to transform’, ‘cannot transform’ and ‘will not transform’. On the one hand, it is necessary to strengthen the construction of digital infrastructure, accelerate the construction of information network infrastructure, strengthen the support capacity of public services, and lay a solid foundation for the digital transformation of enterprises. On the other hand, it is necessary to increase the financial and financial support for enterprises’ digital transformation, realise the optimisation and upgrading of traditional production technologies, organisational processes and management methods, and improve the quality and safety level of enterprises’ export agricultural products.

Second, in the process of promoting the digital transformation of enterprises and the formulation of relevant policies, we should adhere to local conditions, policies based on enterprises, and step by step. For some enterprises with difficulties in transformation, the transformation threshold should be lowered, and appropriate support measures should be taken to lay a solid foundation for digital transformation of enterprises and provide more powerful support. At the same time, it is necessary to continue to consolidate the achievements of digital transformation in the eastern region, increase support for digital transformation in the central and western regions, and narrow the digital divide between regions.

Third, enterprise digital transformation is an important approach for addressing the problem of exported agricultural products’ quality and safety. Therefore, the government should issue relevant regulations to clarify the obligations and approaches for relevant enterprises to implement digital traceability of exported agricultural product quality and safety, implementing the requirements and functional settings of a safety traceability system for exported agricultural products and enhancing the capacity of intelligent supervision of agricultural product quality and safety to compel Chinese agricultural industries to upgrade the quality and safety of exported agricultural products.