How to analyze e-commerce sales data using AI?

How to analyze e-commerce sales data using AI?

How to analyze e-commerce sales data using AI?

How to analyze e-commerce sales data using AI?

Jan 13, 2025

Jan 13, 2025

5 min read

5 min read

Click here to use the template.

In the e-commerce industry, efficient data analysis is crucial for optimizing store operations and strategies. This case study will demonstrate how to analyze an e-commerce store's sales data, focusing on key metrics such as sales trends, customer feedback, and product performance.

Through detailed steps and real-world examples, you will learn how to use Bayeslab to clean and analyze data, gain valuable market insights, and predict customer behavior.

Data Processing

The data in this case summarizes the order data of a shop in 2023 (simulated data).

Member: whether the user placing the order is a member of the shop

First-time user: whether the user placing the order is a first-time user

Activity discount: whether the order enjoys the activity discount

Exchange: 1: the order was exchanged; 0: the order was not exchanged

Returns: 1: the order was returned; 0: the order was not returned

Evaluated: 1: the user evaluated the order; 0: the user did not evaluate the Order

Data visualization

We will perform a simple visualization and analysis of the data in the following six areas.

Distribution of order sources

Display the number of orders from different sources.

AI Chart Interpretation

The bar chart displays the number of orders from two different sources: Store Orders and Live Orders. The Store Orders have a higher frequency with 2213 orders, represented by a green bar, while Live Orders account for 1141 orders, shown with a blue bar. This indicates that Store Orders are nearly double the number of Live Orders, suggesting a preference or stronger performance in store-based transactions.

Gender distribution of users

Show the number of orders by gender.

AI Chart Interpretation

The chart displays a significant difference in the number of orders by gender. The "Female" category shows a count of 2,798, while the "Male" category has a count of 556, indicating that there are substantially more orders from females compared to males.

Product Category Distribution

Show the number of orders for different categories of products

AI Chart Interpretation

The bar chart illustrates the count of different categories labeled A, D, C, and B. Category A has the highest count at 1,398, followed by category D with 756, category C with 642, and category B with 558. The chart uses distinct colors for each bar, with category A standing out in bright yellow.

By analyzing the number of purchases for different categories, we found that Category A has significantly higher purchases than other categories. This data suggests that Category A may possess special success factors that make it more competitive in the market. To further explore the reasons for its popularity, it is recommended to analyze its customer feedback, product features and price range. This will help identify successful strategies that can be replicated in other categories to improve overall market performance.

Unit Price Distribution

Presenting the distribution of product unit prices, you can see the number of products in different price ranges.

AI Chart Interpretation

The chart displays the distribution of goods based on their unit price. Key observations include:

  1. Prominent Peaks: There is a significant peak in the histogram for goods priced between 100-120, indicating a high concentration of items in this price range. This is consistent with the KDE (Kernel Density Estimate) showing a strong mode around this range.

  2. Secondary Peaks: The 0-60 and 180-200 unit price ranges also show notable counts, although less pronounced compared to the 100-120 range. The KDE suggests these are additional modes, indicating smaller clusters of prices.

Distribution of purchases

Reflects the distribution of the number of orders purchased.

AI Chart Interpretation

The majority of purchases are concentrated at position 1, with a frequency count of about 3000. this indicates that the vast majority of customers purchase only one item at a time.

As the number of purchases increases, the frequency decreases sharply. The frequency of purchasing two items is significantly lower than the frequency of purchasing one item, while the number of purchases of more than two items is very low.

The KDE curve smoothly shows the probability distribution of buyer consumption behavior, indicating that one-item purchases are the most common and more than one-item purchases are rarer.

Returns and exchanges

Show exchanges, returns and reviews

AI Chart Interpretation

The bar chart displays the counts of exchanges, returns, and evaluated items. A few observations include:

  1. Evaluated Items Dominance: The count of evaluated items (2180) is significantly higher than both exchanges (57) and returns (228). This suggests that users are highly engaged in evaluating the items they purchase.

  2. Returns vs. Exchanges: Returns (228) are much more frequent than exchanges (57). This might indicate issues with product satisfaction or expectations.

The number of reviews is over 2000, while the number of exchanges and returns is relatively small. This indicates that most customers choose to review the product after purchase, with fewer instances of exchanges and returns; additionally, customers are more inclined to return products than exchange them.

Category Sales Effectiveness Evaluation

Next, we can explore the following questions: how do sales and number of sales vary by category? Which categories may need more attention and promotion?

AI Chart Interpretation

In category A, sales near 200k indicate its potential as a high-value product. Introducing value-added services could enhance customer satisfaction and loyalty. Offering more attractive purchasing options could further boost sales in this category.

Meanwhile, categories C and D show promise with growing sales volumes despite currently low figures. With a significant increase in the consumer base, flexible pricing strategies and discount incentives could further stimulate sales. Through market segmentation and precision marketing, these products could better align with consumer needs.

Category B is unique, maintaining high revenue despite having the fewest sales. This suggests the presence of high-margin products. To maximize revenue, the company might consider increasing promotion, optimizing the supply chain, and improving production processes to enhance efficiency and profitability.

User Shopping Behavior Analysis

The analysis about the shopping behavior of users participating in active offers can be explored around the following questions: do orders participating in active offers show higher shopping amount and number of purchases compared to non-participating orders? Can activity discounts effectively enhance users' shopping enthusiasm?

AI Chart Interpretation

The charts show that both sales and sales volume are higher without promotional offers than with them, leading to the following conclusions:

Promotional offers do not significantly boost average sales or purchase numbers. In fact, orders without promotions slightly outperform in these areas. This might be because promotions attract more price-sensitive customers who tend to buy lower-priced items, or because the current promotional strategies are not effective in encouraging purchases of more or higher-value items.

Merchants should consider addressing the issue in two ways:

Redesign the campaign: Adjust the campaign strategy by offering discounts on high-value items or implementing promotions like full-value giveaways to increase sales and purchases per order.

Analyze customer behavior in depth: Study the purchasing behavior of different customer segments to identify which types of offers are most appealing to them.

Impact of Different Order Sources on Purchasing Behavior

We can expand on the following questions: Does the source of the order influence shopping behavior, such as purchase amount, purchase category, or shopping frequency? Which order sources generate higher order amounts?

AI Chart Interpretation

The chart illustrates average sales amounts for two different order sources: "Live Order" and "Store Order." The "Store Order" source has a slightly higher average purchase amount of about 132.58 compared to the "Live Order," which is approximately 126.69. The difference between them is not large, indicating that both sources have relatively similar purchase averages.

AI Chart Interpretation

The chart displays the sales distribution by order source and category. Here are some observations:

  1. Comparison Between Order Sources: Store Orders consistently have higher sales across all categories (A, B, C, D) compared to Live Orders.

  2. Category Trends: For both Live and Store Orders, Category A has the highest number of sales, while Category B has the least.

  3. Proportional Differences: The proportion of sales between categories remains relatively consistent across both order sources. However, Store Orders show a substantially larger total volume of sales.

The chart shows that total sales volume from in-store orders is significantly higher than from live orders. This trend could be due to factors such as a larger customer base in stores or more promotions. This suggests that companies should consider investing more in the in-store channel to further increase sales.

Category A is the highest selling category for both in-store and direct orders, indicating higher market demand or greater brand awareness. Companies should study this to determine how to maximize the sales potential of Category A. Emphasizing this category in advertising and marketing campaigns could drive overall sales growth.


We make the following recommendations to merchants in response to these observations:

Targeted Strategy: Develop marketing and promotional strategies tailored to each order source's characteristics. For sources with high average sales, introduce more high-value products. For sources excelling in specific categories, strengthen promotion of those categories.

Enhance Customer Engagement: For sources with a high number of orders, enhance customer engagement and loyalty through regular promotions and other initiatives.




Bayeslab makes data analysis as easy as note-taking!

Bayeslab makes data analysis as easy
as note-taking!

Start Free

Bayeslab makes data analysis as easy as note-taking!

Bayeslab makes data analysis as easy as note-taking!