• Automated Order Processing for a B2B Veterinary Supplies Store in Switzerland

    Automated Order Processing for a B2B Veterinary Supplies Store in Switzerland

    Client Background:

    A B2B veterinary supplies store based in Switzerland specializes in selling veterinary products to various businesses. Clients typically place orders by sending an email with an attached CSV or Excel file detailing their requirements.


    The main challenge was the inconsistency in the format of the order files sent by clients. Not all clients adhered to the standard file format, which complicated the automated processing of these orders. The store needed a solution to automatically check for new emails, validate and process the order files, and integrate them into their Enterprise Resource Planning (ERP) system for fulfillment.


    To address this challenge, we developed a custom Magento 2 module tailored to automate the entire order processing workflow:

    1. Email Monitoring: The module continuously monitors the store’s email for new messages containing order files.
    2. File Validation: Upon receiving a new order file, the module first checks if the file adheres to the standard format required for processing.
    3. AI Integration for Data Transformation: If the file format does not meet the standard, the module sends the file data to an AI API (ChatGPT), which attempts to transform the data into the required format.
    4. Error Handling and Notifications: If the AI is unable to standardize the data successfully, the module alerts the site administrator via Telegram, providing all necessary details about the issue for manual intervention.
    5. Order Creation and ERP Integration: Once the file is confirmed to be in the correct format and contains all required data, an order is automatically created in Magento 2. This order is then exported through an API to the ERP system for further processing.


    • Increased Efficiency: The automation of checking emails and processing orders significantly streamlined operations, reducing the time from order receipt to processing.
    • Improved Accuracy: AI integration minimized human errors associated with manual data entry and standardization, ensuring higher accuracy in order processing.
    • Enhanced Responsiveness: Immediate notifications via Telegram for format issues allowed for quick administrative intervention, thereby improving the responsiveness to format discrepancies.
    • Scalability: The solution is scalable, accommodating increases in order volumes without requiring additional resources for order entry and processing.


    This use case exemplifies how integrating AI with Magento 2 can effectively address challenges in handling varied data formats in order files, leading to improved efficiency and accuracy in order processing for a B2B veterinary supplies store. The automation and intelligence solution not only streamlines the workflow but also enhances the overall responsiveness and scalability of the business operations.