E-Export Infrastructure: Our Strategy for Global Product Distribution

Mehmet Kağan Akpınar
Trendyol Tech
Published in
5 min readJul 19, 2024

Introduction

It is a significant milestone for an e-commerce company to commence exporting products abroad. Trendyol initiated e-export to expand its business and enhance its value. However, this endeavor also entails greater challenges and complexities.

In this article, I will explain the process of initiating the e-export journey for products, a responsibility undertaken by our Supplier Product Management Cross Border team.

Seller Interaction with E-Export

We have an e-export page for sellers where they can view their eligible products by country and submit requests to enable e-export for products. Sellers can request either individual products or batches of products. Also sellers can see which products are already enabled to e-export.

E-export Page for Sellers

After sellers send the request our journey begins.

Architecture of E-export open process

HS Code and Batch Request

Suppliers are required to provide an HS Code for each product they wish to open for e-export. The HS Code is a standardized numerical method used to classify traded products. In cases where suppliers do not provide an HS Code, we have suggested HS Codes for all products created at Trendyol, according to product type and category.

After receiving the suggested HS Code from the SPI team, we save batch request which seller send to Couchbase.

Our batch request consists of several batch request items, each representing a single request of a particular type. Batch requests encompass multiple requests of the same type.

Example E-export Open Batch Request Item

After saving these items to Couchbase, we utilize a Kafka connector to read changes from DCP (Database Change Protocol) and transmit these items as events to a Kafka topic. The QC(Quality Check) APIcan then listen to this Kafka topic to receive the events.

Kafka connect is user-friendly and straightforward, making it effortless to transfer large volumes of data from a source to Kafka or vice versa, all while maintaining minimal latency. You can check the link for more about kafka connect.

Okay let’s continue to our process. Subsequently, the QC API proceeds to open the products on the requested storefronts and dispatches an event to Kafka indicating whether the process was successful or failed.

The Batch Request API listens to this event and updates the status of the Batch Request Item accordingly, marking it as either successful or failed. Subsequently, we can display the outcome to the seller.

What is Auto Open Job?

Auto Open Job Creation Architecture

When suppliers express their intention to participate in the e-export process and submit a request for it, we generate a job record in a PostgreSQL table. This record is designed to automatically trigger the opening of the supplier’s products for the e-export process.

Job Trigger Process Architecture

Every day, a scheduled job initiates the process of opening job records for e-export. Subsequently, the Batch Creator API retrieves job records with trigger dates that are ready and sends job events to kafka to activate products for e-export.

The Batch Creator API listens to a Kafka topic and retrieves eligible products from the Seller Product Indexing API for the requested storefront and supplier. It then sends a request to the Batch Request API to create batch request with eligible products. Subsequently, the process of e-export begins, following the same steps outlined earlier in this article.

We also have a process for closing products for e-export. If a supplier wants to close a product from e-export for any reason, they can filter their available products and submit a request to remove them from e-export.

Closing Products to E-export

Architecture of E-export close process

The overall structure is quite similar to the opening process, but the event we trigger is different, as is the API that listens to it.

Example E-export Close Batch Request Item

When we sent the event to initiate e-export, the event type was ‘ApprovedProductMicroExportAdd.’ Now, for closing e-export, the event type is ‘ApprovedProductMicroExportRemove.’ These event types guide other teams, like Product International and Quality Check, in determining which events to monitor and which to ignore. The International Product API listens for the ‘Remove’ event and shuts down e-export for the specified country upon request.

Deny Process

Additionally, we have a process known as the ‘Deny Process.’ As I mentioned earlier, there’s a scheduled job that automatically opens products for e-export. However, if sellers want to prevent a product from being opened for e-export, they can mark it as ‘Denied.’ This flag ensures that our scheduled job doesn’t open those products for e-export when it runs

Example E-export Deny Batch Request Item

Conclusion

In this article, we aim to elucidate the process of e-export and detail our utilization of Kafka and Kafka Connect within this framework. Additionally, we provide insights into the challenges we encountered during this process and offer solutions for overcoming them. Our hope is that this article will prove beneficial in addressing your concerns. With e-export, over 100,000 sellers have opened their products to international markets. Our goal is to increase this number to over 300,000 sellers. Additionally, we aim to facilitate e-export projects from other countries to markets worldwide.Local businesses that have been introduced to e-export through Trendyol’s e-export solutions achieved an export volume of $750 million last year. The target for the end of this year is to reach $2.5 billion.

About Us

Want to be a part of our growing company? We’re hiring! Check out our open positions from the link below.

--

--