Wednesday, October 26, 2022

Demand Forecasting with Azure Machine Learning (AML)

This article helps you to understand the components of Demand Forecasting with Azure Machine Learning (AML).

CONTENT
 
Introduction
Demand Forecasting
Demand Forecasting Parameters
Considerations to Avoid Flat Forecasting

INTRODUCTION

Dynamics 365 Supply Chain Management provides the end-to-end planning capabilities that manufacturers, distributors, and retailers require to meet their supply chain needs. Functionality ranges from demand forecasting, demand planning, master planning, and order processing. 


The focus of this article is Demand Forecasting. 


Let’s get started.

DEMAND FORECASTING

Demand forecasting is to predict future demand for products and services. This information is required to estimate revenue and drive strategic and operational business planning. Benefits include reducing cost by minimizing the buffer on-hand inventory, reducing lead times by ordering long lead time items ahead of time, increasing revenue for providing availability, and helping strategic business decisions on global capacity planning with data-driven knowledge.

The ultimate Purpose is to provide time to plan resources, plant expansion, capital equipment purchase, and anything requiring a long lead time to purchase.

The logic is to Gather transactional historical data and use machine learning to generate anticipated (expected) demand with Azure Machine Learning.


After the demand is created, forecast planning is run to calculate gross requirements for materials and capacity, and to generate planned orders.


Demand Patterns

When historical data for demand are plotted against a time scale, they will show shapes or consistent patterns. A pattern is the general shape of a time series that shows the actual demand varies from period to period.


Dynamics 365 Supply Chain Management generates time series forecasting by using Azure Machine Learning. Time series forecasting refers to models that use previous demand values to predict future demand. Time series forecasting is affected by 3 elements (Demand Patterns): Trend, seasonality, and variation.

Trend: General direction in which demand is moving. The longer the window, the smoother the trend will be.


Seasonality: In time series data, seasonality, is the presence of variations that occur at specific regular intervals, which refers to periodic fluctuations. For example, electricity consumption is high during the day and low during the night, or online sales increase during Christmas before slowing down again.


Variation: Unexplained or random variation in the time series. This will be discussed in tracking the forecast.


By using the 3 elements above, different forecasting tools use different statistical forecasting algorithms in different ways and predict demand.

Dynamics 365 Supply Chain Management and Azure Machine Learning allow businesses to compare different forecasting models and select the best predicting demand.

Mathematical Formula Components

An automated time-series experiment is treated as a multivariate regression problem. Past time-series values are "pivoted" to become additional dimensions for the regressor together with other predictors. This approach, unlike classical time series methods, has the advantage of naturally incorporating multiple contextual variables and their relationship to one another during training. Automated ML learns a single, but often internally branched model for all items in the dataset and prediction horizons. More data is thus available to estimate model parameters and generalization to unseen series becomes possible.

A subset of data is used to train the forecasting model, and it’s possible to specify what type of model validation to perform. Automated ML performs model validation as part of training. That is, automated ML uses validation data to tune model hyperparameters based on the applied algorithm to find the combination that best fits the training data. 

D365 parameters are forecasting settings and are used to make decisions on how to use the dataset and predict demand. 



Forecast accuracy is represented with MAPE (Mean Absolute Percentage Error), the estimated accuracy of the forecasting model that is used to generate the predictions.


MAPE compares the actual vs forecasted value and gives the distance of how close the forecasted values are to actual demand. A good forecast’s maximum MAPE value is 20.

You can view the accuracy percentage under Model details - MAPE on the Demand forecast details page



DEMAND FORECASTING PARAMETERS

General: All items must have a unit conversion setup that relates to the demand forecasting unit.

Select which types of transactions should be included in the historical data.

Select forecast generation strategy Azure Machine Learning vs Copy over historical demand. Before version 10.0.24, the forecast generation strategy for Azure was the Azure Machine Learning Classic which is a service that’s going to be deprecated.



Forecast dimensions: In addition to company, site, and allocation key, it is possible to include more information as the forecast dimension.



Each row of the generated forecast is a unique combination of the enabled values aka granularity attribute. The forecast will be running for each granularity attribute that is based on forecast dimensions.

Item allocation keys: Item allocation keys are groups of items used to generate a forecast together and allow the system to improve the performance of forecast generation (Similar to batch threading where different allocation keys are in parallel to generate a forecast). Additionally, transaction types can be chosen along with different forecast algorithm parameters for each item allocation key. An item must be a part of an item allocation key in order to be included in the forecast generation process.


Outliner removal: It’s a standalone parameter. Outliner removal helps to exclude outliers (exceptional data or extreme values) from the historical data that is used to calculate a demand forecast. Master planning > Setup > Demand forecasting > Outlier removal. 

Reduce forecast requirements: It’s a master plan parameter. When the master plan is run, planned orders are generated based on the forecast. But the forecast needs to be adjusted when real sales orders (actual demand) start coming for the forecasted period. Forecast reduction keys are used for that purpose. If a reduction key is not used, the forecast requirements aren't reduced during master scheduling. In this case, master planning creates planned orders to supply the forecasted demand (forecast requirements). These planned orders maintain the suggested quantity, regardless of other types of demand. For example, if sales orders are placed, master planning creates additional planned orders to supply the sales orders. The quantity of the forecast requirements isn't reduced. Master planning > Setup > Plans > Master plans > General fast tab.



Forecast algorithm parameters are used by Azure and R (a language and environment for statistical computing and graphics) to create the forecast model. The R package forecast provides methods and tools for displaying and analyzing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modeling.


Time series models: ARIMA, ETS, STL, ETS + ARIMA, ETS + STL, and ALL. When ALL is used, the system runs through all of the models and picks the model that has the lowest MAPE value. Use this model if there is no data scientist available to see what model is chosen and to analyze the data. This model consumes more time than others, in other words, has the worst performance.

Minimum and Maximum forecasted value: Forced minimum or maximum forecast values. The system doesn’t generate any forecast when the estimated forecast value is ZERO instead, this parameter value is used. On the other side, the allowed maximum value can be limited, as well.

Missing value substitution: This is about what happens when there is a gap in the historical data. Missing value can be replaced with a number or average of previous and following data or previous value or linear or polynomial interpolation. The most common use is to use ZERO since there may not be real data or demand on that date.

Missing value substitution scope: This is about what happens when there is a gap in the historical data. Substitution rule can be applied to the whole history, or to a specific granularity attribute. The advised value is to apply the substitution to all of the data.

Confidence level: It is the range of possible future demand values that the system generates.

Seasonality hint: It is the number of seasonal patterns that data scientist think of. For example; if data has a quarterly seasonality pattern, and forecasting is in monthly buckets, the Seasonality value should be 3.

Force seasonality: For the models using seasonality, it is possible to specify what the relationship between trend and seasonality is.

The test set size percentage: It is the data set percentage for the testing accuracy of the forecast vs how much should be used to generate the forecast.


In general, the forecast model needs to have enough data to generate a good forecast.

CONSIDERATIONS TO AVOID FLAT FORECASTING

Test, test, and retest: Use different parameters and compare the forecast results and MAPE to arrive at the best configuration for YOUR specific data.

Involve a data scientist: Helps business to dive into the detailed areas of configuration and keeps business from getting stuck with a flat forecast.

Use R package parameters: Dynamics 365 parameters are not the full set of parameters, there are more in the R forecast package. If the results with basic configurations are not working well enough, the next step should be to review the additional parameters in the R package that cannot be changed through Dynamics 365 interface.

Use correct parameters: Correct parameters including both D365 and R need to be used to get a good MAPE measurement.

Have enough size data: Enough data needs to be used to get a good MAPE measurement. Data history needs to be twice the forecast horizon.




The ultimate purpose is to predict demand with the least error. Errors cannot be eliminated unless you are able to see to the future. The fact is as below!

Tuesday, August 23, 2022

Follow up Removed or deprecated features

Removed or Deprecated Features

This article focuses on two main areas. 

Removed or deprecated features in finance and operations apps

Deprecations in the Microsoft Power Platform


Let's start with finance and operations apps.

Removed or deprecated features in finance and operations apps
Removed or deprecated features page describes features that have been removed, or that are planned for removal from finance and operations apps.
  • A removed feature is no longer available in the product.
  • A deprecated feature is not in active development and may be removed in a future update.
This list is intended to help you consider these removals and deprecations for your own planning.

Detailed information about objects in finance and operations apps can be found in the Technical reference reports. You can compare the different versions of these reports to learn about objects that have changed or been removed in each version of finance and operations apps.

Deprecations in the Microsoft Power Platform
Important changes (deprecations) coming in Power Apps and Power Automate page provides information about deprecations in the Microsoft Power Platform. The announcements and deprecations described in this website apply to Power Apps and Power Automate. Admins and IT professionals can use this information to prepare for future releases. This page was first published on June 27, 2017.
  • Deprecated means Microsoft intends to remove the feature or capability from a future release. The feature or capability will continue to work and is fully supported until it is officially removed. This deprecation notification can span a few months or years. After removal, the feature or capability will no longer work. This notice is to allow you sufficient time to plan and update your code before the feature or capability is removed.
For deprecation information of other products, see Other deprecation articles later in this article.

Monday, August 8, 2022

Follow up Released Versions of Dataverse












Released Versions of Microsoft Dataverse

Microsoft is continuously enhancing the platform and services that support Finance and Operations apps with new capabilities to enable businesses everywhere to accelerate their digital transformation. The key driver for all of the new, core capabilities is to increase productivity and return on investment.

Dataverse release notes that contain details on the most recent update or incremental release can be found in the links below:
  • This page includes an overview of the current version and next version of Microsoft Dataverse. 
  • This page also includes all Dataverse service updates. 
The new features and enhancements demonstrate Microsoft's continued investment to power digital transformation. 

Check these pages regularly to have helpful and transparent information that helps your business prepare for updates. 


Thursday, August 4, 2022

Follow up Warehouse Management mobile app changes


What's new or changed in the Warehouse Management mobile app

There is a special Microsoft web page for announcing changes specifically for Warehouse Management mobile app. 

This page lists new features, fixes, improvements, and known issues for each released version of the Warehouse Management mobile app for Microsoft Dynamics 365 Supply Chain Management.

All announcements can be found in historical order.

Released version numbers may not be aligned with Service updates version numbers.

This special page can be reached by clicking HERE.



Thursday, July 21, 2022

One Version service updates


CONTENT

Introduction
No more upgrade, just update
Update types
Support
One Version service updates

INTRODUCTION

This document discusses Dynamics 365's One Version Service Update logic and its components. The purpose is to clarify the functions of each update component and explain the hierarchical relation between them. 

NO MORE UPGRADE, JUST UPDATE

The true value of a cloud service is realized through continuous updates that can provide both improved reliability and new features while minimizing operational impact. Microsoft optimizes the way they deliver updates for a more consistent, predictable, and seamless experience for every customer. Monthly update cadence aims to provide predictability, lower upgrade costs, user access to the latest product capabilities and performance improvements, and a better support experience.

Lifecycle Services (LCS) has an update experience to align with the One Version service update releases. This update experience provides the options to either take fixes for the current version or to update to a newer version or delay the updates.

Dynamics 365 Finance and Operations which has several components is a web-based application that needs updates in order to fix bugs, extend/remove existing functionalities, and add brand-new features. All these come as service or platform updates to your cloud-based Dynamics 365 solution via One Version. Your system can stay up to date with the latest improvements of the platform without having to upgrade your whole application.

UPDATE TYPES

Major Updates: There are 2 major updates within Dynamics 365 release plans.
  • Release Plan - Wave 1 covers features that are planned for release from April through September.
  • Release Plan - Wave 2 covers features that are planned for release from October through March.
Minor Updates: There are 2 types of minor updates.
  • Service Updates contain both application and platform changes that are critical improvements to the service, including regulatory updates.
  • Quality updates are a cumulative, roll-up build that contains fixes for known issues that are specific to the service update.
Meaning of Update Types: All the above update types are explained below.
  • Release plan: Helps you plan and understand what is changing. You can learn about upcoming features up to three months in advance.
  • Service updates: Contains both application and platform changes that are critical improvements to the service, including regulatory updates.
  • Platform updates: This allows you to upgrade the Dynamics platform to a new release without upgrading your whole application.
  • Application releases: Contains "What's new" topics and provides details about the updates for specific months.
  • Quality updates: A cumulative, roll-up build that contains fixes for known issues that are specific to the service update.

SUPPORT

  • The release plans are the primary source of information for all new features and changes for a future release. Features will also include Help topics on docs.microsoft.com as needed.
  • The "What's new or changed" documentation is the primary source for the details of each service update’s application release.
  • The "Quality updates" documentation is the primary source for the details of each platform update. There will be no quality updates available for any version that’s older than 2 versions of the current service update.
  • The service update that will be made generally available and automatically applied to all customers will contain hotfixes and potentially new functionality. If a critical issue is reported after the service update has been applied, customers can pull that cumulative hotfix update from the tile in LCS.
  • Critical issues should always be submitted to the Support team via LCS as soon as they are identified. The support staff will work with you to fix the critical issue. Customer-reported issues are searchable via LCS Issue search. You can sign up to be notified when an open issue is resolved.

ONE VERSION SERVICE UPDATES

The below illustration shows the relationship between the update types mentioned above.




After the "release plans" announcement, you can plan what features to be added and what functions to be changed/removed. When the time comes, you can apply "service updates" to your system to have these changes in your system. Lastly, you can apply "quality updates" to fix the bugs in your system.

For more information, One Version service updates FAQ

Sunday, January 30, 2022

Platform Unification - Dynamics 365 & Power Apps - PART 1

CONTENT

Introduction
Dataverse
Dual-Write

INTRODUCTION

In the beginning, there were just installations, solutions were being installed locally on the company's hardware and servers and this was managed by the company's IT team. As a result of fast-evolving technologies, solutions are on the cloud now.

In the traditional approach, one installation is expected to fill all business GAPs. In cloud solutions, there are multiple applications that fill all the GAPs perfectly for Procure to Pay and Order to Cash (or Prospect to Cash) processes.

This article series provides several solution ideas by using Microsoft cloud business applications.

DATAVERSE

Microsoft is continuously enhancing the platform and services that support Finance and Operations apps with new capabilities to enable businesses everywhere to accelerate their digital transformation. The key driver for all of the new, core capabilities is to increase productivity and return on investment.

The Finance and Operations cross-app capabilities can be categorized as follows:
  • Power Platform features are capabilities that bring FO apps closer to Microsoft Power Platform. Environment provisioning, authorization and authentication, run-time events, and developer tools are areas that will enable new capabilities. It is a challenge to make FO data useable in other 365 business applications because all other applications are built on top of data verse whereas the database is Azure SQL database in FO. To overcome this challenge, Microsoft now unifies CE (CRM) Dataverse and FO (ERP) Azure SQL solutions into one fully integrated cloud service.
  • Cross-app features provide ease of use to all users of FO apps.
  • Data and process integration features provide enhanced data exchange experiences between Finance and Operations apps, Microsoft Dataverse, and customer engagement apps in Dynamics 365.

Dataverse is the idea of having a database system that is easy to use across Power Platform applications.
  • It gives you the platform to start leveraging the power platform tools around it. 
  • It's a cloud-based, low-code data service and app platform. 
  • Users don't need to switch browsers or switch applications from one to another.

Dataverse structures a variety of data and business logic to support interconnected applications and processes in a secure and compliant manner. 
With dataverse;
  • Power apps can be embedded in FO
  • Model-driven apps can be embedded in FO
  • FO pages can be embedded in Unified Interface apps outside FO

Integration scenarios in this article series are focused on ERP and CRM collaboration. Depending on the business requirement, there are several ways to integrate ERP (Dynamics 365 Supply Chain Management aka Dynamics 365 Finance and Operations) and CRM (Power Apps - CE):
  • Dual-write
  • Virtual entities
  • Logic app
  • Data integrator


DUAL - WRITE

Since the integration happens between databases, not applications, endpoints will be mentioned as FO and Dataverse. Dual write creates the same data in both SQL database and dataverse at the same time. That's why it doesn't matter where we are creating/maintaining/modifying quotes, orders, or customers. Data lives in both applications depending on the setup of dual writes. In another saying, dual-write is a synchronous integration that has a direct connection between the two systems in near-real-time.

Flowing data between environments helps to provide segregation of duties that is the operational reality of businesses. For example, Sales rep creates an account in the sales app, the account needs to fly into ERP as a customer so that SO can be created and invoiced. Data sharing (via dual-write) is required because of the business requirement. Or imagine a Power BI solution that requires native entities. For example, Power BI consumes Datalake data that comes from Dataverse via dual-write. In this case, data sharing is required due to a technical requirement.

You can set up a dual-write connection between a Finance and Operations environment and a Dataverse environment.
  • A Finance and Operations environment provides the underlying platform for Finance and Operations apps (for example, Microsoft Dynamics 365 Finance, Dynamics 365 Supply Chain Management, Dynamics 365 Commerce, and Dynamics 365 Human Resources).
  • A Dataverse environment provides the underlying platform for customer engagement apps (Dynamics 365 Sales, Dynamics 365 Customer Service, Dynamics 365 column Service, Dynamics 365 Marketing, and Dynamics 365 Project Service Automation).

The setup mechanism varies, depending on your subscription and the environment:
  • For new instances of Finance and Operations apps, the setup of a dual-write connection begins in Microsoft Dynamics Lifecycle Services (LCS). If you have a license for Microsoft Power Platform, you will get a new Dataverse environment if your tenant doesn't have one.
  • For existing instances Finance and Operations apps, the setup of a dual-write connection begins in the Finance and Operations environment.
  • Dynamics 365 applications use Dataverse capacity and features to store and secure data. Power Apps users who have a Power Apps license may use custom applications to access (that is, create, read, update or delete) any Dynamics 365 non-restricted table in the Dataverse. However, Power Apps users and devices that need to create, update, or delete data in Dynamics 365 restricted tables must be properly licensed for Dynamics 365.

Features
  • Any (create/update/deleteCRUD operation in FO results in writes to dataverse and vice-versa
  • Bi-directional(2-ways)
  • Alert friendly
  • Extendable, ISV solution's entities or custom entities can be included
  • There is no extra training is required for users since this is an out-of-the-box configuration and data is flying around in the back end
  • Used to replicate master data (customer, contact, etc.) and business documents (quote, sales order, invoice, etc.) between environments.
  • Integration can be paused and resumed for a specific entity


Considerations
  • FO and dataverse must be in the same instance and on the same tenant
  • For minimum latency, FO and CDS instances should be in the same region
  • FO instance cannot be linked to multiple dataverse instances
  • Dual write works only in between FO and Dataverse. If you need similar functionally between FO and a none-Dataverse environment then you may want to use Logic App
  • Dual write doesn't support "Cross company data sharing"
  • Use it only when it is required

If there is an active FO instance that you want to start using dual write, migrate data to dataverse before running Dual-Write. You can skip the initial synchronization if you don't have to sync data between the two environments. Copying preexisting data from FO to dataverse can be done in 2 different ways.
  • If your data is low volume then use initial write to copy reference and dependent tables from the Finance and Operations app to Dataverse.
  • If your data is too high volume, then consider migrating data before enabling Dual-Write.
  • or both methods can be used respectively. Imagine Customers table in a Finance and Operations app, and the Account table in Dataverse:
    • Use initial write to copy reference and dependent tables, such as Company, Customer groups, and Terms of payment, from the Finance and Operations app to Dataverse.
    • Use the Data management framework to export data from the Finance and Operations app in comma-separated values (CSV) format. For example, set up an export project in Data management to export customers from each company by using the DataAreaId field in the Finance and Operations app. This process is a one-time manual process.
    • Use Azure Blob Storage to store the CSV files for lookup and transformation. Upload the CSV file for your Finance and Operations customers into Azure Blob Storage.
    • Use Azure Data Factory to push data into Dataverse.



If you are implementing a brand new system, data can be loaded into one side through data migration and then synced to the other side through the initial synchronization.

After go-live, any data change in Finance and Operations apps causes writes to Dataverse, and any data change in Dataverse causes writes to Finance and Operations apps. This automated data flow provides an integrated user experience across the apps.

Sample implementation scenarios will be discussed in further sections.

to be continued ... 

Configurable Business Documents in Dynamics 365 Finance and Operations - PART 3 - Making a direct format change

CONFIGURABLE BUSINESS DOCUMENTS IN DYNAMICS 365 FINANCE AND OPERATIONS - PART 3 - MAKING A DIRECT FORMAT CHANGE This article series explains...