Loading...

04 July 2025

Improving pharmaceutical distribution with GenAI

Bidafarma, one of the leading pharmaceutical distributors in Spain, has chosen AyGLOO’s technology to optimize its customer service operations through generative artificial intelligence.

GenAI

A historic and widespread presence across the entire Spanish territory. An essential service for people’s lives, like that provided by pharmacies. And the need to improve processes and support for pharmacists who contact the call center daily for the supply of medicines, drugs, and other healthcare products.

This is the essence of the project led by AyGLOO - a Spanish company of the Mashfrog Group specializing in Generative Artificial Intelligence and Explainable AI - for Bidafarma, a Spanish pharmaceutical distribution cooperative.

A historic presence projected into the future 

Bidafarma is an institution in Spanish pharmaceutical distribution: founded in 2016 through the merger of 12 regional cooperatives, it embodies over 80 years of service history to citizens across the Iberian Peninsula.

Promoting a social economy model that ensures equitable access to medicines nationwide, Bidafarma serves nearly 9,000 pharmacies across 36 Spanish provinces and 12 autonomous communities. With over 20% market share, it is the leading pharmaceutical distributor in Andalusia, Extremadura, Galicia, the Balearic Islands, and the Canary Islands.

Headquartered in Seville and supported by a community of around 1,900 employees, the company operates nationwide with 150 agents and 31 automated warehouses. It supplies pharmacies with over 40,000 products and handles an average of 3,000 customer calls per day.

A structural challenge: complexity, accuracy, and speed

In the midst of its expansion and ongoing development of digitalization and service automation, Bidafarma faced a significant challenge in managing relationships with its customers and their daily needs: Call Center agents struggled to accurately identify the products requested by pharmacists.

The core issue lay in the unstructured nature of the digital catalogs, which contained vast amounts of information from various suppliers - each with its own format and logic.

In a context where every request refers to specific products, accuracy is non-negotiable. Nevertheless, agents often found themselves involved in lengthy phone calls or having to call customers back to gather additional details.

GenAI for product search and selection

The answer to this complexity came through the integration of a generative artificial intelligence solution. The system enables automatic and accurate product search, providing real-time information on descriptions, stock availability, pricing, and VAT.

The use of Retrieved Augmented Generation (RAG) technology has made it possible to scale catalog management, structuring large volumes of heterogeneous data efficiently.

Thanks to its low latency and ability to deliver deterministic results, the Call Center can now respond quickly and reliably- even when starting from partial or complex product descriptions.

NLP and ML: learning from the past to simplify the present

At the core of the solution designed by AyGLOO is an AI engine based on Natural Language Processing (NLP) and Machine Learning (ML) models for text classification. 
Trained on thousands of historical Bidafarma emails, these models have learned the language, terminology, and context of over 70 product categories.

AyGLOO’s system connects directly to the company’s email server via API and analyzes each new message in real time: it extracts, processes, and classifies the content, automatically routing it to the appropriate team or folder. All of this happens in the background, requiring no user interaction - employees simply receive pre-organized emails, ready to be managed.

Higher productivity, better service quality

The implementation of AI has led to a 30% increase in call handling efficiency, significantly improving both the speed and quality of customer service.

Call Center agents, now supported by a system that manages the entire catalog cycle - from product search to order entry - have seen their productivity grow by over 30%.

Moreover, the reduced time required to organize unstructured catalogs has improved key service metrics (AHT and FCR), freeing up resources for value-added activities such as customer loyalty, audience expansion, and increased sales.