
Synergex helps UNFI bring Harmony to supplier portal
Challenge
As a large enterprise that has grown exponentially over the years by adding multiple food distributors, wholesalers, and retailers to the UNFI family, UNFI has many disparate processes and systems that need to communicate with one another as seamlessly as possible. They also have several thousand orders occurring at any point during the day. They recently began using MuleSoft, a consolidated source for data access to their UBS system through OData queries. MuleSoft helped them provide a consistent application interface for any consuming application data (order history, product prices, etc.) regardless of the backend system. The original implementation of the supplier portal exhibited scaling problems when multiple batches of new products were submitted simultaneously by multiple users.
Goals
UNFI wanted to improve multi-user access to data from their supplier portal. When Synergex representatives visited UNFI after the Synergex Tech Days event in Providence, Rhode Island, last spring, UNFI’s East Region applications development manager, Chris Blundell, asked if Synergex’s Professional Services Group (PSG) could eliminate the issues that occurred when multiple users simultaneously submitted product creation requests via this portal. PSG offers a wide variety of software consulting services and technical training to help customers enhance and maintain their applications with the latest technologies.
The new DOT inspection requirements added more items and processes that Van Diest now had to track. Already being tracked were location, contents, when and where containers were received by customers, expected arrival time, date of last cleaning, problems or need to be taken out of service, and so on. Scanning to record identifying information was added, as workers must visually inspect each container and check boxes on a long list of items (e.g., observed cracks or wear) displayed on their handhelds before each container can be filled, shipped, or released to the customer.
Well-functioning mobile devices are essential to the container tracking process, and the old MC65 scanners were of particular concern. Many had been failing, and neither the devices nor their operating systems were supported anymore. Updating them was possible but difficult, as it would require using hard-to-find Microsoft technologies such as Visual Studio 2008 running on Windows 7 or earlier. Ideally, Van Diest needed to reduce or eliminate its reliance on old, unsupported technologies.
Last year, United Natural Foods, Inc. (NYSE: UNFI) celebrated its 40-year anniversary of delivering healthier food options to more people. The largest publicly traded wholesale distributor, UNFI carries and distributes more than 250,000 organic, natural, and specialty food products to more than 43,000 customer locations throughout the United States and Canada, serving a wide variety of sales channels that include conventional supermarket chains, natural product superstores, independent retailers, e-commerce, and the food service industry. UNFI’s Synergy-based business application, United Business System (UBS), provides sales order and purchase order processing for the eastern half of the United States.
Solution
After evaluating the situation, the PSG team decided that this would be an ideal use case for Synergex’s Harmony Core product. Introduced in 2018, Harmony Core is a framework composed of libraries, CodeGen templates, and conventions that enable developers to make Synergy logic and data available over the internet (in a RESTful web service) using a variety of frameworks including OData.
Chris had seen Harmony Core demonstrated at the Synergy DevPartner Conference in New Orleans in 2018 and loved it. So, he used the consulting hours that were part of his DevPartner subscription to have the PSG team implement a proof of concept. Working with Chris, the team created a working customer pricing web service with the Harmony Core framework in less than six hours, using OData and Harmony Core-hosted Synergy code.
Here’s how Harmony Core works: Incorporating standardized technologies like OData, Swagger, ASP.NET Core, .NET Core, and Entity Framework Core, Harmony Core services can generate data-centric endpoints, providing URLs to service endpoints where clients can access specific types of data. It can also expose specific pieces of business logic as web services, which in turn expose data by receiving and returning parameters. Once a type of data or a function is exposed as a web service, you can interact with it from applications written in almost any development environment and from any location. Other applications call the service, while your application retains complete control of its data. Often, existing application functions can be exposed as services without any additional development.
PSG helped UNFI migrate their supplier portal and other external applications to be hosted within Harmony Core to allow for security and channel management in multi-user applications. The Harmony Core OData interface provides data to MuleSoft from their East Region systems, which transforms the OData into data that other applications at UNFI can consume.
UNFI’s Harmony Core API currently offers read-only access to 42 files, and they’ll continue to make additional files available as needed. Each file takes only about 20–25 minutes to set up, by modifying the repository to add the file to the OData interface, regenerating the code with CodeGen, and then deploying it.
"It’s been huge. Our end users always want to see one more, or one less field, or sort this differently—it’s just a constant. People are expecting instant gratification and changes, so now I can do that."
Peter O’Connell, UNFI senior web developer
Outcome
One of the major benefits of using Harmony Core is multi-user access and multi-threading without having to write custom code to handle it. This part of the solution accomplished UNFI’s goal of enhancing their supplier portal implementation.
Another advantage of using Harmony Core is that consumers of the data have the ability to perform SQL-style queries, including selecting specific fields and joining multiple tables. As a developer, says Chris Blundell, “You’re minimizing the amount of change that you actually have to be responsible for. You’re letting the consumers of the data become responsible for what they want to see. The uses for this are almost limitless.”
UNFI senior web developer Peter O’Connell confirms that as a consumer of the data, he’s been able to make changes to the portal a lot more quickly. The combination of OData and Harmony Core enables Peter to get the data he needs from UBS himself, without having to rely on other development teams to create functionality to capture it for him. Historically, if he needed to show a new field on a webpage, he had to wait, sometimes months, before it made it to the top of someone’s priority list. Now if he needs a field, he just adds it. The ability to make such changes on the fly enables UNFI to comply with customer requests almost immediately. “From that standpoint, it’s been huge,” says Peter. “Our end users always want to see one more, or one less field, or sort this differently—it’s just a constant. People are expecting instant gratification and changes, so now I can do that.”
Because of the way the systems were set up, the web interface also couldn’t see orders when they were in a pending period; all UNFI could previously show was that an order had been submitted. Then there was a blackout window until the order was completed, at which point they could notify the customer. With the Harmony Core web service, they’re pleased to be able to show intermediate progress. Customers can go to the portal and see all their open orders and see them change throughout the day as the order is fulfilled. Being able to provide customers with much better direct interaction with the data, offering real-time or near real-time information on their orders, has been greatly appreciated.
Now that people know about the API, UNFI’s developers are starting to get more and more requests for different kinds of data. “It’s one of those ‘build it and they will come’ kind of things,” says Chris. The nice thing is, you don’t have to create a new interface every time someone wants to get at data; everything is reusable. MuleSoft provides a framework to be able to publish the available services, and people can go to that “catalog” and request services.
This new functionality has revitalized the UBS application and changed people’s perception of it. UBS has gotten the job done for many years, but Chris says, “When we tell people the things we're able to do now, they tend to look at it in a slightly different way. It gives people an opportunity to rethink what they think of as legacy.”
As a bonus benefit, Synergex’s PSG team also identified and fixed some performance issues, with exciting results. Before starting the project, returning a very large UNFI dataset in the portal took almost two full seconds. After the team completed the performance fixes, the time to return the same dataset went down to 300 milliseconds.
UNFI reports that everything, including multi-user access, is working great!