Fortune 500 BioTech and Pharma Company optimizes its demand planning process using Snowflake

Customer's Challenge
A global Fortune 500 BioTech and Pharma firm relied on a manual demand planning process to translate customer-centric forecasts from revenue recognition to production sites. Managed entirely in Microsoft Excel with complex formulas and a recursive workflow, this process was prone to human errors, difficult to scale, and lacked the analytical power for complex, customized visualizations.
phData's Solution
phData’s DE team enhanced the demand planning process in Snowflake by reconstructing the planning logic. This involved converting intricate hierarchical forecasting formulas—some exceeding 100 operands and 50 operators—along with recursive workflows into Stored Procedures, Functions, and Views within 3 months. Additionally, we integrated data quality checks at every step, ensuring the business can derive maximum value from the data in Snowflake.
Results
By the end of this engagement, the demand planning calculations were rebuilt in Snowflake with ZERO UAT Issues. This enabled the inclusion of transit time between two plants in the network during the calculation rather than at the end of the calculation in the legacy Excel-based process, which resulted in more accurate numbers for the manufacturing plants to work with.Â
Finally, the biggest gain was the enablement of Power BI reports on top of the demand planning data, which facilitated the visibility necessary for cross-functional engagement targeted at network inventory optimization and an improved understanding of the replenishment signals, which will drive lead time reductions, scrap reductions, and OTIF improvements.
The Full Story
A Fortune 500 BioTechnology and Pharmaceutical company had its manufacturing and supply chain set up in many locations in North America, Europe, and Asia Pacific. Materials were manufactured in Europe or Asia Pacific and delivered to customers in North America and vice versa through a transit network involving multiple plants.
The demand planning process translates the customer-centric forecast from the point of revenue recognition back to the production site(s) to provide the plants with the visibility necessary to plan for raw material requirements, manufacturing line capacity, and staffing necessary to meet customer needs.Â
This complex supply chain was completely running manually in Microsoft Excel via complex mathematical formulas. Running these manually through multiple plants across different geographical regions in the supply chain required recursive calculations which made the process error-prone, human-dependent, and extremely difficult to scale. Once the source data was available in Snowflake, they asked phData to rebuild this solution in Snowflake using native Snowflake features like Stored Procedures, Functions, etc.
The phData DE team started the initiative by doing research into deciphering the core logic behind the complex calculations and incorporating business feedback into what changes would be required to make the process a scalable one. The source datasets from SAP systems involved monthly forecasts, current inventory, and mapping between various materials and their plant attributes, such as minimum order quantity (MOQ), rounding value (RV), reorder point (ROP), etc.Â
The team then translated the complex mathematical formulas using the attributes mentioned above into SQL UDF (User Defined Function) and mapped the recursive workflow from the current month to the next 24 months using Recursive CTEs in Snowflake. The same process was then applied to all the plants in the network, and all the logic was wrapped into a SQL Stored Procedure. The duration of the forecast (24 months) was kept as a parameter for the Stored Procedure so that it could be scaled easily.
The final result on each execution was a total of 120 intermediate-derived facts (replenishment/demand quantities for each month for each plant in the network) and three final derived facts (replenishment/demand plan for the production plant) for the current forecasting month, which the analytics team consumed for each material in the supply chain.
Why phData?
The customer had recently completed a Snowflake and Power BI project with phData, which focused on building the backend data model in the data warehouse and reporting for one of their applications. This project highlighted phData’s expertise, leading the customer to choose us because of our deep understanding of business use cases and technical expertise in translating them into optimized solutions.
Reference Diagrams
Take the next step
with phData.
Learn how phData can help solve your most challenging data analytics and machine learning problems.