MuleSoft Helps Cure VetSource’s Legacy Ills

Offering much more than a traditional online pharmacy, VetSource simplifies access to the most important products and information that manufacturers, veterinarians, and pet owners need to help every pet live a happy and healthy life. VetSource helps ensure both veterinarians and pet owners benefit from comprehensive pharmaceutical services and programs and the home delivery of leading pet care products.

“As a MuleSoft customer, our developers don’t have to struggle with finding answers on newsgroups and message boards. With MuleSoft technical support, they can save a great deal of time, so we try to leverage it the best we can.”

Craig Sutter, Technology Director, VetSource


 

The Challenge – Complex Industry Dynamics and a Monolithic Legacy Infrastructure

Unlike the mainstream pharmaceutical industry, which over the years has embraced e-commerce and back-office automation, the veterinary pharmaceutical industry has continued to operate in largely the same way over the past 20 years. Drug sales are still negotiated directly between individual sales representatives and clinics, and orders are placed manually by phone and fulfilled directly by the drug manufacturers.

VetSource was launched in 2007 to transform this market, resulting from a 2007 merger between a pharmaceutical distribution company and an existing technology provider. The company is using a web-based business model to put hospitals and clinics in control of the pharmaceutical supply chain. With VetSource, clinics and consumers benefit from increased choice, improved customer service, and lower costs, while manufacturers benefit from the resulting increase in customer compliance (e.g., following scheduled dosage for medications).
Automating the buying process was no small feat. Even with an off-the-shelf ERP system and buying engine, VetSource was faced with a myriad of partner and manufacturer integration points, each with different transports (e.g., email, FTP) and formats (e.g., EDI, XLS, CSV). In addition, with each distributor employing hundreds of sales representatives individually negotiating prices with the clinics in their territories, the pricing structure has become quite intricate for the 20,000 to 30,000 items in the various product catalogs.

In order to maintain licenses in the 50 United States plus Canada, VetSource needs to comply with a patchwork of regulatory requirements, including strict controls around certain drug categories (e.g., cold chain antibiotics, steroids, euthanasia drugs, etc.).
The company is also responsible for implementing workflows to validate that prescriptions written by actual veterinarians are being fulfilled to the correct customer. These workflows require track and trace capability, so manufacturers have visibility into how their products are getting into homes in the event of a recall.

To handle all of this complexity, and to support the company’s long-term plans for growth, it became clear that the VetSource team needed to significantly upgrade their existing infrastructure, a custom e-commerce platform that was developed using a proprietary Java framework. The platform had been built in a patchwork manner over time to serve multiple market segments; as a result, it was a monolithic system – difficult to maintain, upgrade, and scale to a high volume of transactions.

However, the competitive landscape and customer demands dictated that the team move fast.
“We are encouraged that there is competition in the market, since it means that people understand the value of this business model” said Craig Sutter, Technology Director at VetSource. “However, for us to stay competitive, and to satisfy our customers’ requirements, we had to give some aggressive guarantees of when we could start providing our services.”

VetSource set out to design and implement an architecture that could sustain the company’s growth for at least 3 to 5 years, but needed to leverage as many existing assets as possible to quickly get to market. To do so, the team followed a number of key principles. First, the architecture would be simple. Second, it would need to scale to a large number of transactions. Finally, flexibility was a critical factor, so the company would actively seek out open source options to better enable customization and avoid vendor lock-in.

The Solution – Service-enabling Existing Assets through Mule


Figure 1.: VetSource Implementation

VetSource created a fully service-oriented infrastructure with Mule as the enterprise service bus (ESB), allowing decoupled services to communicate with each other and with client interfaces as needed. Some of the services, including the Order Management and User Management modules, were created by reusing business logic embedded in the monolithic legacy application. To do this, they used the Spring HTTPInvoker and exposed them through XML over HTTP.

To reduce development costs, newly written services, such as the Order Fulfillment and Payment functions, are written as simple POJOs with RESTful APIs exposed through Mule. In these instances, the transaction logic such as order or credit card processing is handled by the service while Mule handles the communication pieces (e.g., ACH payments or order placement via EDI).

Finally, there are batch services that are trigger-based or time-based, such as Sales and Inventory Reporting or Prescription Monitoring and Compliance Tracking; these services use Mule’s transformers to generate output from disparate data sources into multiple data formats.

Integrating these services with Mule and exposing them in a RESTful manner allows VetSource the flexibility to leverage the same services with different interfaces. As an example, , each clinic has a privately branded application or interface, which is integrated with the VetSource back-end. In addition, VetSource has two call-centers which use yet another set of front-end management consoles, communicating with the back-end applications through Mule.

VetSource addresses their scalability and fail-over concerns by deploying instances of Mule on Xen virtual machines, running on 1U rack-mount servers. With these virtual machines, VetSource is able to make frequent backups or scale out to multiple instances of the various services as needed.


Customer Overview

Industry: Health Sciences

Geography: Americas

Website: www.vetsource.org

Integration Requirements

  • Create a flexible platform that can easily integrate business partners with multiple data formats and transports
  • Enable workflows and visibility to ensure regulatory compliance
  • Simplify programming while maximizing scalability and reliability
  • Leverage existing assets where possible to lower costs and decrease time to market

Solution Overview

Using Mule®, VetSource reused an existing legacy e-commerce platform to create a fully service-oriented infrastructure. Mule is used as the company-wide ESB, tying together the company’s business services and external trading partners, automating the supply chain, and increasing visibility and control for customers, clinics, and manufacturers alike.

Benefits

  • Open source and standards-based model enables flexibility and reduces vendor lock-in
  • Lightweight footprint and simplified development model allows for ease
    of use
  • Ability to reuse existing legacy assets reduces costs and decreases time
    to market
  • Capacity to scale the infrastructure as the business grows
  • Availability of technical support increases developer productivity

 

 

Sign up for our Newsletter!