Your Production Planning Data Template
Your Production Planning Data Template
- Recommended attributes to collect
- Key activities to track
- Extraction guidance for Microsoft Dynamics 365 Manufacturing
Production Planning Attributes
| Name | Description | ||
|---|---|---|---|
| Production Order ProductionOrderNumber | The unique identifier for a production order, serving as the primary case ID for tracking all related planning and execution activities. | ||
| Description The Production Order Number, often referred to as ProdId in Microsoft Dynamics 365, is the central identifier that links all events, materials, resources, and costs associated with a specific manufacturing job. It allows for a complete end-to-end analysis of the production planning and execution lifecycle for a single unit of work. In process mining, this attribute is essential for grouping related events into a single case. Analyzing processes by Production Order Number helps identify bottlenecks, delays, and deviations in the standard production flow, from initial creation and scheduling through to completion and costing. Why it matters This is the fundamental case identifier, which is critical for grouping all related events and reconstructing the end-to-end production planning process for analysis. Where to get This is the 'ProdId' field in the 'ProdTable' table in Microsoft Dynamics 365 Manufacturing. Examples WO-000456WO-000457WO-000458 | |||
| Activity Name ActivityName | The name of the specific business event or step that occurred within the production planning process. | ||
| Description The Activity Name describes a single step in the production planning lifecycle, such as 'Production Order Created', 'Materials Picked For Production', or 'Production Started'. These activities are the building blocks of the process map. Analyzing the sequence and duration of these activities allows for the visualization of the process flow, identification of common pathways, detection of rework loops, and measurement of time spent in different stages. This attribute is crucial for understanding what is happening at each point in the process. Why it matters This attribute defines the steps in the process, enabling the construction of a process map and analysis of process flow, variations, and bottlenecks. Where to get This value is typically derived from event logs or by mapping different status changes and transaction types in tables like 'ProdRouteTrans', 'ProdJournalBOM', and changes to the 'ProdTable' status fields. Examples Production Order CreatedProduction Order ReleasedProduction StartedProduction Reported As Finished | |||
| Event Time EventTime | The precise timestamp indicating when the activity occurred. | ||
| Description Event Time, or the timestamp, records the exact date and time that a specific activity took place. This data is fundamental for all time-based process mining analysis, including calculating cycle times, identifying delays between steps, and understanding process performance over time. In the context of production planning, this attribute is used to measure durations such as planning lead time, production start delays, and overall order fulfillment time. Accurate and chronological timestamps are essential for building a correct and meaningful process model. Why it matters This timestamp is essential for ordering events, calculating durations between activities, and performing any time-based analysis like cycle time and bottleneck identification. Where to get Found in various transaction tables, such as 'createdDateTime' in 'ProdTable', or transaction date fields in 'ProdRouteTrans', 'ProdJournalRoute', and 'ProdJournalBOM'. Examples 2023-04-15T09:00:12Z2023-04-15T11:30:00Z2023-04-16T14:22:05Z | |||
| Last Data Update LastDataUpdate | The timestamp indicating when the data for this event was last refreshed or extracted from the source system. | ||
| Description This attribute provides the date and time of the most recent data pull from the source system. It is a metadata field that is critical for understanding the freshness and currency of the analysis. Knowing when the data was last updated helps analysts and business users trust the insights derived from the process mining tool. It clarifies whether the dashboards reflect real-time information or data from a previous point in time, which is important for operational decision-making. Why it matters This attribute is vital for data governance, ensuring that users understand the freshness of the data and can trust the timeliness of the process insights. Where to get This timestamp is generated and stamped onto each record during the data extraction, transformation, and loading (ETL) process. Examples 2023-05-20T05:00:00Z2023-05-21T05:00:00Z | |||
| Source System SourceSystem | The system of record from which the data was extracted. | ||
| Description This attribute identifies the source information system where the event data originated. For this process view, the value would consistently be 'Microsoft Dynamics 365 Manufacturing'. In environments with multiple integrated systems, this field is crucial for data lineage, troubleshooting data quality issues, and understanding how different systems contribute to the overall process. It ensures clarity on the origin of the data being analyzed. Why it matters It provides crucial context about the data's origin, which is essential for data governance, validation, and managing data pipelines from multiple enterprise systems. Where to get This is a static value that should be added during the data extraction and transformation process to label the dataset's origin. Examples Microsoft Dynamics 365 ManufacturingD365 F&O | |||
| Actual Quantity ActualQuantity | The quantity of goods successfully produced and reported as finished for the order. | ||
| Description The Actual Quantity represents the number of units that were completed and passed quality checks for a given production order. This value is recorded when production is 'Reported as finished'. This attribute is used to analyze production yield and efficiency. Comparing the Actual Quantity to the Planned Quantity helps in calculating scrap rates and understanding production losses. It is also a key component of throughput analysis and capacity utilization dashboards. Why it matters It is essential for calculating production yield, scrap rates, and actual throughput, providing insight into manufacturing efficiency and performance. Where to get This value often comes from the 'QtyGood' field in the 'ProdTable' or related journal posting tables when an order is reported as finished. Examples 100985000 | |||
| Planned End Date PlannedEndDate | The date and time when the production order is scheduled to be completed. | ||
| Description The Planned End Date is the target completion time for a production order as determined by the scheduling engine. It considers operation times, resource calendars, and lead times to forecast when the finished goods will be ready. In process analysis, this attribute is critical for evaluating the on-time completion performance. Comparing the Planned End Date with the actual completion timestamp (from the 'Production Reported As Finished' or 'Production Order Ended' activity) allows for the calculation of the On-Time Production Completion Rate KPI and helps in identifying systemic reasons for late deliveries. Why it matters This attribute is the benchmark for measuring on-time completion rates and analyzing the accuracy of production scheduling. Where to get This is the 'SchedEnd' field in the 'ProdTable' table. Examples 2023-04-25T17:00:00Z2023-04-26T17:00:00Z2023-04-27T17:00:00Z | |||
| Planned Start Date PlannedStartDate | The date and time when the production order is scheduled to begin. | ||
| Description The Planned Start Date is a key output of the scheduling process, representing the target time for commencing production activities for an order. This date is determined based on material availability, resource capacity, and demand deadlines. This attribute is essential for schedule adherence analysis. By comparing the Planned Start Date with the actual start time of production (from the 'Production Started' activity timestamp), organizations can measure punctuality, identify causes of delays, and calculate KPIs like the Production Schedule Adherence Rate. Why it matters It serves as the baseline for measuring schedule adherence and identifying delays between planning and the actual start of production. Where to get This is the 'SchedStart' field in the 'ProdTable' table. Examples 2023-04-18T08:00:00Z2023-04-19T08:00:00Z2023-04-20T08:00:00Z | |||
| Product Number ProductNumber | The unique identifier for the item being manufactured. | ||
| Description The Product Number, or Item ID, specifies the finished good that the production order is intended to create. It links the production process to the specific product being made, along with its associated bill of materials and routing instructions. Analyzing the process by Product Number helps to uncover product-specific variations in the manufacturing lifecycle. It can reveal that certain products have longer cycle times, require more rework, or experience more frequent delays, providing valuable input for product and process engineers. Why it matters It enables analysis of process variations based on the product being manufactured, helping to identify product-specific bottlenecks or quality issues. Where to get This is the 'ItemId' field in the 'ProdTable' table. Examples FG-1001FG-2050ASSY-500B | |||
| Production Order Status ProductionOrderStatus | Indicates the current lifecycle status of the production order. | ||
| Description The Production Order Status reflects the progress of the order through the manufacturing lifecycle. Common statuses in Dynamics 365 include Created, Estimated, Scheduled, Released, Started, Reported as finished, and Ended. This attribute provides a snapshot of where each order stands at any given time. In process mining, analyzing status changes is a primary way to define activities and understand the process flow. It can be used to filter for orders in a specific state, analyze time spent in each status, and identify orders that are stuck or delayed. Why it matters This attribute provides a high-level overview of an order's progress and is crucial for filtering, conformance checking, and analyzing time spent in different production phases. Where to get This is the 'ProdStatus' field in the 'ProdTable' table. Examples ScheduledReleasedStartedEnded | |||
| Production Plant ProductionPlant | The manufacturing site or plant where the production order is being executed. | ||
| Description The Production Plant identifies the physical location or facility responsible for the manufacturing process. It is a key organizational dimension for segmenting and comparing production performance. In process mining, this attribute allows for benchmarking performance across different plants. Analysts can compare cycle times, resource utilization, and adherence to standard processes between sites to identify best practices or locate facilities that may require operational improvements. It is essential for capacity utilization analysis. Why it matters This allows for performance comparison and benchmarking across different manufacturing sites, helping to identify best practices and area-specific issues. Where to get This is the 'InventSiteId' field in the 'ProdTable' table. Examples SITE-ASITE-BMain-WH | |||
| Production Priority ProductionPriority | A rating that indicates the urgency or priority of the production order. | ||
| Description Production Priority is a field used by planners and schedulers to manage the sequence of work on the shop floor. Orders with a higher priority may be expedited, potentially disrupting the planned schedule for other orders. Analyzing this attribute helps in understanding how often production plans are disrupted by high-priority or expedited orders. Tracking changes in priority over the lifecycle of an order can highlight instability in demand or planning. This is key for the 'Expedited Production Trends' dashboard and 'Expedited Production Rate' KPI. Why it matters This helps identify the frequency and impact of expedited orders, which can indicate planning instability or reactive operational management. Where to get This may be a standard or custom field on the 'ProdTable'. Configuration is often company-specific. Examples NormalHighUrgent | |||
| Production Type ProductionType | The classification of the production order, such as standard, rework, or project-based. | ||
| Description Production Type categorizes the order based on its purpose. For example, a 'Standard' order is for regular stock production, a 'Rework' order is to fix defects in a previously produced item, and a 'Project' order is linked to a specific customer project. This attribute is important for creating comparable analysis views. The process for a rework order is inherently different from a standard one. Segmenting the process analysis by Production Type ensures that comparisons are meaningful and helps in understanding the unique challenges and flows of each type. Why it matters This attribute allows for the segmentation of analysis, as different order types like 'Standard' and 'Rework' naturally follow different processes and have different performance expectations. Where to get This is the 'ProdType' field in the 'ProdTable' table. Examples StandardReworkProject | |||
| User UserId | The identifier of the user who performed or is responsible for the activity. | ||
| Description The User ID identifies the employee or system account that executed a particular process step, such as releasing an order or reporting completion. This information provides visibility into who is performing work within the process. Analyzing the process by user helps in understanding workload distribution, identifying training opportunities, comparing performance across individuals or teams, and investigating deviations performed by specific users. It is also important for compliance and audit trail purposes. Why it matters It enables analysis of process performance by user or team, helps identify automation opportunities, and provides an audit trail for key process activities. Where to get Found in fields like 'modifiedBy' or 'createdBy' on various tables, or user fields in transaction log tables like 'ProdJournalTable'. Examples j.smithm.jonesAX_BATCH_SVC | |||
| End Time EndTime | The precise timestamp indicating when the activity was completed. | ||
| Description The End Time marks the completion of a specific activity. While Start Time indicates the beginning, End Time is needed to understand the actual duration or processing time of that single step. In process mining, having both a Start and End Time for activities allows for a more granular analysis of waiting time versus processing time. It helps distinguish between the time an activity was actively being worked on and the time spent waiting for the next step to begin, which is crucial for detailed bottleneck analysis. Why it matters It enables the calculation of activity processing time, distinguishing it from waiting time, which allows for more precise bottleneck analysis. Where to get This is often derived. For example, the end time of 'Production Started' could be the start time of 'Operation Completed'. In some logs, an end timestamp may be explicitly recorded. Examples 2023-04-15T09:30:45Z2023-04-15T12:00:00Z2023-04-16T15:00:10Z | |||
| Material Availability MaterialAvailabilityStatus | Indicates whether the required raw materials for the production order are available. | ||
| Description This attribute tracks the readiness of components needed for production. It could reflect statuses like 'Available', 'On Order', or 'Shortage'. This information is critical for schedulers to understand if a production order can realistically start as planned. In process mining, this attribute is crucial for diagnosing the root causes of production start delays. By correlating this status with the time between 'Production Order Released' and 'Production Started', analysts can quantify the impact of material shortages on schedule adherence and overall cycle time. This directly supports the 'Material Availability Delay Impact' dashboard. Why it matters This is key to understanding and quantifying production start delays caused by material shortages, linking supply chain performance to manufacturing efficiency. Where to get This status is often not a single field but derived by checking the on-hand inventory levels for all items in the production order's Bill of Materials (BOM) via the 'InventSum' table. Examples Fully AvailablePartial ShortageNot Available | |||
| On-Time Start ProductionScheduleAdherence | A boolean flag that is true if the production order started on or before its planned start date. | ||
| Description This calculated attribute provides a simple, binary indicator of schedule adherence for the start of production. It compares the actual start timestamp ('Production Started' event) with the 'PlannedStartDate' attribute. This flag is extremely useful for creating clear and concise dashboards and KPIs, such as the 'Production Schedule Adherence Rate'. It allows for easy filtering and aggregation to see what percentage of orders start on time and to analyze the characteristics of those that are delayed, without needing to perform date comparisons directly in the analysis tool. Why it matters This simplifies reporting and KPI calculation for schedule adherence, allowing for easy filtering and aggregation of on-time versus late orders. Where to get This is a calculated metric. The logic is: 'Production Started' EventTime <= PlannedStartDate. Examples truefalse | |||
| Planned Quantity PlannedQuantity | The quantity of the item that is planned to be produced. | ||
| Description The Planned Quantity is the target number of units to be manufactured for a given production order. This quantity is typically driven by demand from sales orders, safety stock requirements, or master planning. This attribute serves as the baseline for performance metrics like yield and scrap. By comparing the Planned Quantity with the Actual Quantity of goods produced, planners can monitor production efficiency and material variance. It is a fundamental data point for capacity and material requirements planning. Why it matters This is the baseline quantity used to measure production yield and scrap rates by comparing it to the actual quantity produced. Where to get This is the 'QtySched' field in the 'ProdTable' table. Examples 1005000250 | |||
| Production Cycle Time ProductionCycleTime | The total duration of the production order from creation to its final completion. | ||
| Description This metric measures the end-to-end cycle time for a single production order. It is calculated as the time difference between the first event (typically 'Production Order Created') and the last event (e.g., 'Production Order Ended') for the case. Production Cycle Time is a fundamental KPI for assessing overall process efficiency. Analyzing this metric helps identify long-running orders, understand the average time to manufacture products, and track performance improvements over time. It is a key measure for the 'Production Performance Overview' dashboard. Why it matters This is a critical KPI for measuring overall process efficiency and identifying trends or outliers in the time it takes to complete a production order. Where to get This is a calculated metric, computed by subtracting the timestamp of the first event from the timestamp of the last event for each Production Order Number. Examples 7d 4h 30m10d 2h 15m5d 8h 0m | |||
| Production Line ProductionLine | The specific production line, work center, or resource group assigned to the production order. | ||
| Description The Production Line identifies the specific machine, cell, or group of resources that will perform the manufacturing operations. This provides a more granular level of detail than the Production Plant. Analyzing the process by Production Line is critical for detailed capacity and utilization analysis. It helps identify overloaded work centers, compare the efficiency of different lines producing the same product, and pinpoint resource-specific bottlenecks that may not be visible at the plant level. Why it matters This enables granular analysis of resource utilization and performance, helping to identify overloaded work centers or inefficient lines. Where to get This information is often found in the 'WrkCtrId' field in the production route transactions ('ProdRoute' or 'ProdRouteTrans' tables). Examples LINE-01LINE-02CNC-A | |||
| Production Start Delay ProductionStartDelay | The time elapsed between the order being released and the actual start of production. | ||
| Description This calculated duration measures the waiting time or queue time on the shop floor. It is the time difference between the 'Production Order Released' activity and the 'Production Started' activity. This KPI is vital for the 'Resource Allocation Delay Analysis' dashboard as it pinpoints delays that occur after planning is complete and the order is ready for execution. High values may indicate issues with resource availability, material staging, or information flow to the shop floor, providing a clear target for operational improvements. Why it matters It precisely measures the 'ready-to-start' delay, helping to pinpoint bottlenecks related to resource availability or shop floor readiness. Where to get This is a calculated metric: Timestamp('Production Started') - Timestamp('Production Order Released'). Examples 0d 4h 15m1d 2h 0m0d 1h 30m | |||
| Quality Order Number QualityOrderNumber | The identifier for a quality control order linked to the production order. | ||
| Description When quality inspection is required, a Quality Order is often generated in Dynamics 365. This attribute links the production process to the quality assurance process, capturing the ID of the associated quality order. This linkage allows for a more comprehensive end-to-end process view that includes quality management steps. It helps analyze how quality inspections impact production lead times, identify delays in the quality process, and understand the frequency of quality checks for different products or production lines. Why it matters It connects the production process to the quality assurance process, enabling analysis of how quality inspections impact overall lead times. Where to get This information is stored in quality management tables (e.g., 'InventQualityOrderTable') and needs to be linked back to the production order. Examples QO-00123QO-00124QO-00125 | |||
| Revision Number ProductionOrderRevisionNumber | A count of how many times a production plan has been adjusted after its initial creation. | ||
| Description This attribute tracks the number of revisions or significant changes made to a production order, such as changes to quantity, dates, or routing, after it has been scheduled or released. A higher number indicates greater instability in the plan. This is a direct measure for the 'Production Plan Revision Rate' KPI. Analyzing this helps identify sources of planning instability, such as frequent demand changes or inaccurate initial planning. It quantifies the amount of rework and rescheduling effort, which often leads to inefficiencies. Why it matters This directly measures planning stability and supports the 'Production Plan Revision Rate' KPI, highlighting processes with excessive changes and rework. Where to get This is a derived attribute that requires counting the occurrences of 'Production Order Adjusted' activities for each case. Examples 012 | |||
Production Planning Activities
| Activity | Description | ||
|---|---|---|---|
| Production Order Created | This activity marks the creation of a production order, which formalizes the demand for a specific quantity of a product. This is typically captured when a planned production order is firmed, creating an official record in the system with a unique ID. | ||
| Why it matters This is the primary start event for the production process. Analyzing the time from this creation to subsequent steps helps measure overall planning lead time and efficiency. Where to get This event is inferred from the creation timestamp of the production order record in the ProdTable. The initial status is typically 'Created'. Capture Capture the creation timestamp of a new entry in the ProdTable where the ProdStatus is 'Created'. Event type inferred | |||
| Production Order Ended | This is the final activity, representing the financial closing of the production order. All costs have been calculated and posted, and no further transactions can be made against the order. | ||
| Why it matters This marks the true completion of the order from both a physical and financial perspective. Delays between 'Reported as Finished' and 'Ended' can point to issues in cost accounting or financial closing processes. Where to get This is the final status change captured when the 'ProdStatus' field in the 'ProdTable' is set to 'Ended'. This is triggered by running the cost calculation and ending the order. Capture Detect the timestamp when the ProdStatus field on the ProdTable changes to 'Ended'. Event type inferred | |||
| Production Order Released | This activity signifies that the production order has been approved and authorized for execution on the shop floor. This is a key milestone that releases documents like job cards and route cards. | ||
| Why it matters This is the official handoff from planning to execution. The time between 'Scheduled' and 'Released' can indicate approval delays or final checks, while the time from 'Released' to 'Started' measures shop floor readiness. Where to get This is captured when the production order status in the ProdTable changes to 'Released'. This is a manual or automated user action. Capture Detect the timestamp when the ProdStatus field on the ProdTable changes to 'Released'. Event type inferred | |||
| Production Order Scheduled | This activity marks the scheduling of the production order, which allocates specific resources, dates, and times for its operations. This step can involve operations scheduling or more detailed job scheduling. | ||
| Why it matters Scheduling is crucial for capacity planning and resource management. Analyzing the time taken to schedule orders and the gap before release reveals planning and capacity constraints. Where to get Captured when the production order status in the ProdTable changes to 'Scheduled'. This is triggered by a user running a scheduling function. Capture Detect the timestamp when the ProdStatus field on the ProdTable changes to 'Scheduled'. Event type inferred | |||
| Production Reported As Finished | Indicates that the manufacturing process for the specified quantity of the product is physically complete and the finished goods are now in inventory. This is a critical status update that triggers inventory transactions. | ||
| Why it matters This marks the end of the physical production. It is essential for calculating on-time completion rates, actual production duration, and throughput. Where to get Captured when the production order status in the ProdTable changes to 'Reported as finished'. This is triggered by posting a Report as Finished journal. Capture Detect the timestamp when the ProdStatus field on the ProdTable changes to 'Reported as finished'. Event type inferred | |||
| Production Started | Marks the beginning of physical production work for the order on the shop floor. This is often recorded when the first operation or job is started via a shop floor terminal or journal posting. | ||
| Why it matters This activity provides the actual start time for production, which is crucial for calculating start delays, schedule adherence, and actual lead times. Where to get Captured when the production order status in the ProdTable changes to 'Started'. This is often triggered by posting a job card or route card journal for the first operation. Capture Detect the timestamp when the ProdStatus field on the ProdTable changes to 'Started'. Event type inferred | |||
| Materials Picked For Production | Indicates that the raw materials required for the production order have been picked from the warehouse and are ready for consumption. This event is logged upon the completion of a raw material picking work or picking list journal posting. | ||
| Why it matters This activity is a critical gate for starting production. Delays between scheduling and material picking highlight issues in warehouse operations or material availability. Where to get This is typically an explicit event recorded in warehouse management tables (WHSWorkTable) or inventory journals (InventJournalTrans) linked to the production order. Capture Capture the posting timestamp of the picking list journal associated with the production order. Event type explicit | |||
| Operation Completed | This activity signifies the completion of an individual manufacturing operation or step in the production route. A production order will typically have multiple of these events. | ||
| Why it matters Analyzing the time between operations helps identify bottlenecks within the production process itself. It provides a more granular view of the shop floor flow. Where to get This is an explicit event captured from the posting of route card journals (ProdJournalRoute) for each operation, indicating the completion of that step. Capture Capture the posting timestamp of each ProdJournalRoute record associated with the production order. Event type explicit | |||
| Production Order Adjusted | Represents a significant change made to the production order after it has been released, such as a quantity change or date modification. This event is inferred by comparing key fields before and after a change. | ||
| Why it matters Frequent adjustments indicate planning instability or volatile demand, leading to inefficiencies and rework. This helps quantify the rate and impact of such changes. Where to get Inferred by analyzing change logs or comparing snapshots of the ProdTable record for fields like 'QtySched' or 'SchedEnd' after the order status is 'Released'. Capture Identify changes to key fields (e.g., quantity, dates) on ProdTable after the 'Released' event timestamp. Event type calculated | |||
| Production Order Cancelled | Represents the cancellation of a production order before it was completed. This is an alternative, unsuccessful end to the process. | ||
| Why it matters Tracking cancellations helps identify reasons for process failure, such as changes in demand or planning errors. High cancellation rates may indicate systemic issues. Where to get This is an alternative end state inferred from a status change. The exact status may vary, but it often involves resetting the order status back to a previous state and marking it as cancelled. Capture Detect a status change that indicates cancellation. This may require specific system analysis to identify. Event type inferred | |||
| Production Order Estimated | Represents the calculation of estimated material and cost consumption for the production order. This is a critical planning step to ensure financial and material requirements are understood before proceeding. | ||
| Why it matters Delays in estimation can be a significant bottleneck in the planning phase. Tracking this activity helps identify inefficiencies in the cost and material planning process. Where to get This is captured when the production order status in the ProdTable changes to 'Estimated'. This is triggered by a user running the 'Estimate' function on the order. Capture Detect the timestamp when the ProdStatus field on the ProdTable changes to 'Estimated'. Event type inferred | |||
| Quality Inspection Passed | Represents the successful completion and validation of a quality order associated with the production run. This confirms that the produced items meet the required quality standards. | ||
| Why it matters This is a key milestone in the quality process. The duration between quality order generation and passing the inspection highlights the efficiency of the QA team. Where to get Inferred from a status change on the InventQualityOrderTable record to a 'Pass' status. The specific status value may vary. Capture Detect the timestamp when the status on the associated InventQualityOrderTable record is updated to 'Pass'. Event type inferred | |||
| Quality Order Generated | A quality order has been created to inspect the output from the production order. This event signifies the start of the quality assurance process for the produced goods. | ||
| Why it matters Tracking the quality process is important for understanding total lead time. Delays in quality inspection can prevent goods from being shipped or used in subsequent processes. Where to get This is an explicit event based on the creation of a record in the InventQualityOrderTable that references the source production order. Capture Capture the creation timestamp of the quality order in InventQualityOrderTable linked to the production order ID. Event type explicit | |||
Extraction Guides
Steps
- Navigate to the Data Management Workspace: Log in to Microsoft Dynamics 365 Finance and Operations. Use the search bar to find and navigate to the
Data managementworkspace. - Create a New Export Project: Within the workspace, select the
Exporttile to create a new data export project. Provide a descriptive name for the project, such asProcessMind_Production_Orders. - Select Export File Format: In the project configuration, choose the desired data format for the export, such as CSV or Excel. Set the
Entityoption and specify the format details. CSV is recommended for performance and compatibility. - Add Required Data Entities: Add the necessary data entities to the project to capture all production order events. You will need to add each of the following entities:
Production orders,Production order route transactions,Inventory quality orders, andProduction picking list journal lines. For each entity, ensure you select all relevant fields as outlined in the query section. - Apply Data Filters: For each entity, use the
Filteroption to scope the data export. At a minimum, filter byCompanyto select the correct legal entity. It is highly recommended to apply a date range filter on a key date field, such asCreation dateon theProduction ordersentity, to limit the data volume to a manageable period, for example, the last 6 months. - Configure Incremental Exports (Optional): For ongoing analysis, configure the project for incremental exports. This can be done by tracking changes on the source entities, which allows you to extract only new or modified records since the last export, significantly reducing export time.
- Run the Export Job: Once the project is configured, initiate the export by clicking
Exportin the action pane. You can run it immediately or schedule it as a recurring batch job. - Download the Exported Files: After the export job completes successfully, navigate to the job history. Download the package, which will be a ZIP file containing separate data files for each entity you included.
- Transform Data into an Event Log: The exported files represent raw table data, not a formatted event log. You must use an external tool (such as a Python script, Power Query in Excel/Power BI, or an ETL tool) to process and combine the data from these files. The transformation logic outlined in the query section must be applied to pivot the date and status fields from the various entities into a single event log file with one row per activity.
- Structure the Final Event Log: Ensure the final transformed CSV file contains the required columns:
ProductionOrderNumber,ActivityName,EventTime,SourceSystem, andLastDataUpdate, along with any recommended attributes. The file should be formatted with a header row and be ready for upload into ProcessMind.
Configuration
- Key Data Entities: The core of this extraction relies on exporting several entities and joining them later. The primary entities are
Production orders(ProdTable),Production order route transactions(ProdRouteTrans), andInventory quality orders(InventQualityOrderTable). - Date Range Filtering: To manage data volume, always apply a date filter. A good practice is to filter the
Production ordersentity on theCreation date(CREATEDDATETIME) for the last 3 to 6 months. This ensures you capture complete, recent processes without overloading the system. - Company Filter: It is critical to set a filter for the specific company or legal entity you wish to analyze. This is done via the
Filteroption on each entity within the export project. - Full vs. Incremental Push: For the initial extraction, a full push is necessary. For subsequent updates, it is highly recommended to configure change tracking on the entities and perform incremental exports to improve performance and reduce data load.
- Prerequisites: The user running the export must have appropriate security roles, typically including
Data management administratoror a role with permissions to access the required data entities.
a Sample Query config
/*
This is not a runnable script but a configuration and transformation plan for the Dynamics 365 Data Management Framework.
**Step 1: Configure the Export Project**
Export the following entities with the specified fields:
1. **Entity: Production orders (ProdTable)**
* `ProductionOrderNumber` (PRODID)
* `ProductionOrderStatus` (PRODSTATUS)
* `CreationDate` (CREATEDDATETIME)
* `LastUpdateDateStatusEstimate` (LASTUPDATEDATESTATUSESTIMATE)
* `LastUpdateDateStatusScheduled` (LASTUPDATEDATESTATUSSCHEDULED)
* `ReleaseDate` (RELEASEDATETIME)
* `StartDate` (STARTEDDATETIME)
* `ReportedFinishedDate` (REPORTEDFINISHEDDATETIME)
* `LastUpdateDateStatusEnded` (LASTUPDATEDATESTATUSENDED)
* `ModifiedDateTime` (MODIFIEDDATETIME)
* `CreatedByUser` (CREATEDBY)
* `ProductionSite` (INVENTSITEID)
* `ProductNumber` (ITEMID)
* `ProductionType` (PRODTYPE)
* `Quantity` (QTYsched)
* `ActualQuantity` (QTYCALC)
* `DeliveryDate` (DLVDATE)
2. **Entity: Production order route transactions (ProdRouteTrans)**
* `ProductionOrderNumber` (PRODID)
* `OperationNumber` (OPRNUM)
* `TransactionDate` (TRANSDATE)
* `TransactionTime` (TRANSTIME)
* `CreatedDateTime` (CREATEDDATETIME)
* `CreatedByUser` (CREATEDBY)
3. **Entity: Inventory quality orders (InventQualityOrderTable)**
* `QualityOrderNumber` (INVENTQUALITYORDERID)
* `ReferenceType` (REFTYPE)
* `ReferenceNumber` (PRODID)
* `QualityOrderStatus` (STATUS)
* `CreationDate` (CREATEDDATETIME)
* `ModifiedDateTime` (MODIFIEDDATETIME)
4. **Entity: Production picking list journal lines (ProdJournalBOM)**
* `JournalId` (JOURNALID)
* `ProductionOrderNumber` (PRODID)
* `PostedDateTime` (POSTEDDATETIME)
* `CreatedByUser` (CREATEDBY)
**Step 2: Apply Transformation Logic (Post-Export)**
Use a script or ETL tool to transform the exported files into a single event log CSV. For each row in the source files, generate events as described below.
*/
-- Production Order Created
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Created' AS ActivityName,
CREATEDDATETIME AS EventTime,
PRODSTATUS AS ProductionOrderStatus,
DLVDATE AS PlannedStartDate,
-- [Logic to calculate PlannedEndDate] AS PlannedEndDate,
CREATEDBY AS UserId,
INVENTSITEID AS ProductionPlant,
ITEMID AS ProductNumber,
PRODTYPE AS ProductionType,
QTYCALC AS ActualQuantity,
-- [Your field for Production Priority] AS ProductionPriority
FROM ProdTable
WHERE CREATEDDATETIME IS NOT NULL
UNION ALL
-- Production Order Estimated
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Estimated' AS ActivityName,
LASTUPDATEDATESTATUSESTIMATE AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE LASTUPDATEDATESTATUSESTIMATE IS NOT NULL
UNION ALL
-- Production Order Scheduled
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Scheduled' AS ActivityName,
LASTUPDATEDATESTATUSSCHEDULED AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE LASTUPDATEDATESTATUSSCHEDULED IS NOT NULL
UNION ALL
-- Materials Picked For Production (based on the first picking list journal posting)
SELECT
PRODID AS ProductionOrderNumber,
'Materials Picked For Production' AS ActivityName,
MIN(POSTEDDATETIME) AS EventTime, -- Use the earliest posting time for a given order
-- Other attributes from ProdTable...
FROM ProdJournalBOM
WHERE POSTEDDATETIME IS NOT NULL
GROUP BY PRODID
UNION ALL
-- Production Order Released
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Released' AS ActivityName,
RELEASEDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE RELEASEDATETIME IS NOT NULL
UNION ALL
-- Production Order Adjusted (inferred from modification after release)
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Adjusted' AS ActivityName,
MODIFIEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE MODIFIEDDATETIME > RELEASEDATETIME AND PRODSTATUS NOT IN ('Ended', 'Cancelled') -- Example logic
UNION ALL
-- Production Started
SELECT
PRODID AS ProductionOrderNumber,
'Production Started' AS ActivityName,
STARTEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE STARTEDDATETIME IS NOT NULL
UNION ALL
-- Operation Completed
SELECT
PRODID AS ProductionOrderNumber,
'Operation Completed' AS ActivityName,
CREATEDDATETIME AS EventTime,
-- Other attributes from ProdTable linked on PRODID...
FROM ProdRouteTrans
WHERE CREATEDDATETIME IS NOT NULL
UNION ALL
-- Production Reported As Finished
SELECT
PRODID AS ProductionOrderNumber,
'Production Reported As Finished' AS ActivityName,
REPORTEDFINISHEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE REPORTEDFINISHEDDATETIME IS NOT NULL
UNION ALL
-- Quality Order Generated
SELECT
PRODID AS ProductionOrderNumber,
'Quality Order Generated' AS ActivityName,
CREATEDDATETIME AS EventTime,
-- Other attributes from ProdTable linked on PRODID...
FROM InventQualityOrderTable
WHERE REFTYPE = 'Production' AND CREATEDDATETIME IS NOT NULL
UNION ALL
-- Quality Inspection Passed
SELECT
PRODID AS ProductionOrderNumber,
'Quality Inspection Passed' AS ActivityName,
MODIFIEDDATETIME AS EventTime,
-- Other attributes from ProdTable linked on PRODID...
FROM InventQualityOrderTable
WHERE REFTYPE = 'Production' AND STATUS = 'Pass' AND MODIFIEDDATETIME IS NOT NULL
UNION ALL
-- Production Order Ended
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Ended' AS ActivityName,
LASTUPDATEDATESTATUSENDED AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE LASTUPDATEDATESTATUSENDED IS NOT NULL
UNION ALL
-- Production Order Cancelled
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Cancelled' AS ActivityName,
MODIFIEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE PRODSTATUS = 'Stopped' -- Or the equivalent 'Cancelled' status enum value in your system Steps
- Configure BYOD in Dynamics 365: Ensure the 'Bring your own database' feature is configured in your Dynamics 365 for Finance and Operations environment. This involves setting up an Azure SQL Database and configuring the data export from Dynamics 365.
- Publish Required Entities: From the 'Data management' workspace, navigate to 'Data entities'. Search for and publish the following key entities to your BYOD database: ProdTable, ProdRouteTrans, InventPickingListJour, and InventQualityOrderTable. Ensure they are configured for recurring export.
- Verify Data Synchronization: Confirm that the data from the published entities is successfully and regularly synchronizing to your target Azure SQL Database. Check the export job history for any errors.
- Connect to the BYOD Database: Use a SQL client, such as SQL Server Management Studio (SSMS) or Azure Data Studio, to connect to the Azure SQL Database where your Dynamics 365 data resides.
- Prepare the SQL Query: Open a new query window. Copy the complete SQL query provided in this document.
- Set Query Parameters: In the query, locate the placeholder variables. Replace '{StartDate}', '{EndDate}', and '{CompanyCode}' with your desired date range and the specific company's DataAreaId you wish to analyze.
- Execute the Query: Run the modified SQL query against the BYOD database. The execution time will vary depending on the data volume and the specified date range.
- Review the Results: Once the query completes, review the output to ensure it contains the expected columns and data for all extracted activities. The result set is the event log.
- Export the Event Log: Export the query results to a CSV file. Most SQL clients have a built-in function to save results directly to a file.
- Format for ProcessMind: Ensure the exported CSV file has UTF-8 encoding and that the column headers match the attribute names required by ProcessMind, such as CaseId, Activity, and Timestamp. The provided query already uses the correct aliases.
Configuration
- Key Data Entities: The query primarily relies on the following entities being exported to your BYOD instance:
PRODTABLE: Contains the main production order header information and status.PRODROUTETRANS: Provides details on individual production operations and their completion.INVENTPICKINGLISTJOUR: Logs the picking of materials for production orders.INVENTQUALITYORDERTABLE: Tracks quality assurance orders linked to production.
- Date Range: It is recommended to start with a limited date range, for example, 3 to 6 months of data, to ensure manageable query performance. The query uses the creation date of the production order (
CREATEDDATETIMEfromPRODTABLE) for filtering. - Company Code Filter: The
DATAREAIDfield is used to filter data for a specific legal entity or company. You must replace the'{CompanyCode}'placeholder with the relevant ID, for instance, 'usmf'. - Prerequisites: This method requires system administrator access to both Dynamics 365 Finance and Operations to configure BYOD and Contributor permissions on the Azure SQL Database to execute queries.
- Performance: For very large datasets spanning several years or companies, consider running the query during off-peak hours. You can also break the extraction into smaller time periods and combine the results later.
a Sample Query sql
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Created' AS ActivityName,
p.CREATEDDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.CREATEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYCALC AS ActualQuantity, -- Using calculated quantity at creation
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Estimated' AS ActivityName,
p.COSTCALCDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYCALC AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.COSTCALCDATETIME IS NOT NULL AND p.PRODSTATUS >= 2 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Scheduled' AS ActivityName,
p.SCHEDDATE AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYCALC AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.SCHEDDATE IS NOT NULL AND p.PRODSTATUS >= 3 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Materials Picked For Production' AS ActivityName,
pl.LEDGERVOUCHERPOSTEDDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
pl.CREATEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM INVENTPICKINGLISTJOUR pl
JOIN PRODTABLE p ON pl.INVENTREFID = p.PRODID AND pl.DATAREAID = p.DATAREAID
WHERE pl.LEDGERVOUCHERPOSTEDDATETIME IS NOT NULL AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Released' AS ActivityName,
p.RELEASEDATE AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.RELEASEDATE IS NOT NULL AND p.PRODSTATUS >= 4 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Adjusted' AS ActivityName,
p.MODIFIEDDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.RELEASEDATE IS NOT NULL AND p.MODIFIEDDATETIME > p.RELEASEDATE AND p.PRODSTATUS IN (4, 5) AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Started' AS ActivityName,
p.STARTEDUPDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.STARTEDUPDATETIME IS NOT NULL AND p.PRODSTATUS >= 5 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
prt.PRODID AS ProductionOrderNumber,
'Operation Completed' AS ActivityName,
prt.TRANSDATE AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
prt.CREATEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODROUTETRANS prt
JOIN PRODTABLE p ON prt.PRODID = p.PRODID AND prt.DATAREAID = p.DATAREAID
WHERE prt.POSTINGTYPE = 8 AND prt.TRANSDATE IS NOT NULL AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Reported As Finished' AS ActivityName,
p.LASTUPDDATEPRINT AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.PRODSTATUS = 6 AND p.LASTUPDDATEPRINT IS NOT NULL AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Quality Order Generated' AS ActivityName,
qo.CREATEDDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
qo.CREATEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM INVENTQUALITYORDERTABLE qo
JOIN PRODTABLE p ON qo.INVENTREFID = p.PRODID AND qo.DATAREAID = p.DATAREAID
WHERE qo.INVENTREFTYPE = 9 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Quality Inspection Passed' AS ActivityName,
qo.MODIFIEDDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
qo.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM INVENTQUALITYORDERTABLE qo
JOIN PRODTABLE p ON qo.INVENTREFID = p.PRODID AND qo.DATAREAID = p.DATAREAID
WHERE qo.INVENTREFTYPE = 9 AND qo.STATUS = 2 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Ended' AS ActivityName,
p.LASTUPDDATEPRINT AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.PRODSTATUS = 7 AND p.LASTUPDDATEPRINT IS NOT NULL AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'
UNION ALL
SELECT
p.PRODID AS ProductionOrderNumber,
'Production Order Cancelled' AS ActivityName,
p.MODIFIEDDATETIME AS EventTime,
'Dynamics 365 BYOD' AS SourceSystem,
GETUTCDATE() AS LastDataUpdate,
p.PRODSTATUS AS ProductionOrderStatus,
p.SCHEDSTART AS PlannedStartDate,
p.SCHEDEND AS PlannedEndDate,
p.MODIFIEDBY AS UserId,
p.INVENTSITEID AS ProductionPlant,
p.ITEMID AS ProductNumber,
p.PRODTYPE AS ProductionType,
p.QTYGOOD AS ActualQuantity,
p.PRODPRIO AS ProductionPriority
FROM PRODTABLE p
WHERE p.PRODSTATUS = 0 AND p.CREATEDDATETIME >= '{StartDate}' AND p.CREATEDDATETIME <= '{EndDate}' AND p.DATAREAID = '{CompanyCode}'; Steps
- Navigate to the Data Management Workspace: Log in to Microsoft Dynamics 365 Finance and Operations. Use the search bar to find and navigate to the
Data managementworkspace. - Create a New Export Project: Within the workspace, select the
Exporttile to create a new data export project. Provide a descriptive name for the project, such asProcessMind_Production_Orders. - Select Export File Format: In the project configuration, choose the desired data format for the export, such as CSV or Excel. Set the
Entityoption and specify the format details. CSV is recommended for performance and compatibility. - Add Required Data Entities: Add the necessary data entities to the project to capture all production order events. You will need to add each of the following entities:
Production orders,Production order route transactions,Inventory quality orders, andProduction picking list journal lines. For each entity, ensure you select all relevant fields as outlined in the query section. - Apply Data Filters: For each entity, use the
Filteroption to scope the data export. At a minimum, filter byCompanyto select the correct legal entity. It is highly recommended to apply a date range filter on a key date field, such asCreation dateon theProduction ordersentity, to limit the data volume to a manageable period, for example, the last 6 months. - Configure Incremental Exports (Optional): For ongoing analysis, configure the project for incremental exports. This can be done by tracking changes on the source entities, which allows you to extract only new or modified records since the last export, significantly reducing export time.
- Run the Export Job: Once the project is configured, initiate the export by clicking
Exportin the action pane. You can run it immediately or schedule it as a recurring batch job. - Download the Exported Files: After the export job completes successfully, navigate to the job history. Download the package, which will be a ZIP file containing separate data files for each entity you included.
- Transform Data into an Event Log: The exported files represent raw table data, not a formatted event log. You must use an external tool (such as a Python script, Power Query in Excel/Power BI, or an ETL tool) to process and combine the data from these files. The transformation logic outlined in the query section must be applied to pivot the date and status fields from the various entities into a single event log file with one row per activity.
- Structure the Final Event Log: Ensure the final transformed CSV file contains the required columns:
ProductionOrderNumber,ActivityName,EventTime,SourceSystem, andLastDataUpdate, along with any recommended attributes. The file should be formatted with a header row and be ready for upload into ProcessMind.
Configuration
- Key Data Entities: The core of this extraction relies on exporting several entities and joining them later. The primary entities are
Production orders(ProdTable),Production order route transactions(ProdRouteTrans), andInventory quality orders(InventQualityOrderTable). - Date Range Filtering: To manage data volume, always apply a date filter. A good practice is to filter the
Production ordersentity on theCreation date(CREATEDDATETIME) for the last 3 to 6 months. This ensures you capture complete, recent processes without overloading the system. - Company Filter: It is critical to set a filter for the specific company or legal entity you wish to analyze. This is done via the
Filteroption on each entity within the export project. - Full vs. Incremental Push: For the initial extraction, a full push is necessary. For subsequent updates, it is highly recommended to configure change tracking on the entities and perform incremental exports to improve performance and reduce data load.
- Prerequisites: The user running the export must have appropriate security roles, typically including
Data management administratoror a role with permissions to access the required data entities.
a Sample Query config
/*
This is not a runnable script but a configuration and transformation plan for the Dynamics 365 Data Management Framework.
**Step 1: Configure the Export Project**
Export the following entities with the specified fields:
1. **Entity: Production orders (ProdTable)**
* `ProductionOrderNumber` (PRODID)
* `ProductionOrderStatus` (PRODSTATUS)
* `CreationDate` (CREATEDDATETIME)
* `LastUpdateDateStatusEstimate` (LASTUPDATEDATESTATUSESTIMATE)
* `LastUpdateDateStatusScheduled` (LASTUPDATEDATESTATUSSCHEDULED)
* `ReleaseDate` (RELEASEDATETIME)
* `StartDate` (STARTEDDATETIME)
* `ReportedFinishedDate` (REPORTEDFINISHEDDATETIME)
* `LastUpdateDateStatusEnded` (LASTUPDATEDATESTATUSENDED)
* `ModifiedDateTime` (MODIFIEDDATETIME)
* `CreatedByUser` (CREATEDBY)
* `ProductionSite` (INVENTSITEID)
* `ProductNumber` (ITEMID)
* `ProductionType` (PRODTYPE)
* `Quantity` (QTYsched)
* `ActualQuantity` (QTYCALC)
* `DeliveryDate` (DLVDATE)
2. **Entity: Production order route transactions (ProdRouteTrans)**
* `ProductionOrderNumber` (PRODID)
* `OperationNumber` (OPRNUM)
* `TransactionDate` (TRANSDATE)
* `TransactionTime` (TRANSTIME)
* `CreatedDateTime` (CREATEDDATETIME)
* `CreatedByUser` (CREATEDBY)
3. **Entity: Inventory quality orders (InventQualityOrderTable)**
* `QualityOrderNumber` (INVENTQUALITYORDERID)
* `ReferenceType` (REFTYPE)
* `ReferenceNumber` (PRODID)
* `QualityOrderStatus` (STATUS)
* `CreationDate` (CREATEDDATETIME)
* `ModifiedDateTime` (MODIFIEDDATETIME)
4. **Entity: Production picking list journal lines (ProdJournalBOM)**
* `JournalId` (JOURNALID)
* `ProductionOrderNumber` (PRODID)
* `PostedDateTime` (POSTEDDATETIME)
* `CreatedByUser` (CREATEDBY)
**Step 2: Apply Transformation Logic (Post-Export)**
Use a script or ETL tool to transform the exported files into a single event log CSV. For each row in the source files, generate events as described below.
*/
-- Production Order Created
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Created' AS ActivityName,
CREATEDDATETIME AS EventTime,
PRODSTATUS AS ProductionOrderStatus,
DLVDATE AS PlannedStartDate,
-- [Logic to calculate PlannedEndDate] AS PlannedEndDate,
CREATEDBY AS UserId,
INVENTSITEID AS ProductionPlant,
ITEMID AS ProductNumber,
PRODTYPE AS ProductionType,
QTYCALC AS ActualQuantity,
-- [Your field for Production Priority] AS ProductionPriority
FROM ProdTable
WHERE CREATEDDATETIME IS NOT NULL
UNION ALL
-- Production Order Estimated
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Estimated' AS ActivityName,
LASTUPDATEDATESTATUSESTIMATE AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE LASTUPDATEDATESTATUSESTIMATE IS NOT NULL
UNION ALL
-- Production Order Scheduled
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Scheduled' AS ActivityName,
LASTUPDATEDATESTATUSSCHEDULED AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE LASTUPDATEDATESTATUSSCHEDULED IS NOT NULL
UNION ALL
-- Materials Picked For Production (based on the first picking list journal posting)
SELECT
PRODID AS ProductionOrderNumber,
'Materials Picked For Production' AS ActivityName,
MIN(POSTEDDATETIME) AS EventTime, -- Use the earliest posting time for a given order
-- Other attributes from ProdTable...
FROM ProdJournalBOM
WHERE POSTEDDATETIME IS NOT NULL
GROUP BY PRODID
UNION ALL
-- Production Order Released
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Released' AS ActivityName,
RELEASEDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE RELEASEDATETIME IS NOT NULL
UNION ALL
-- Production Order Adjusted (inferred from modification after release)
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Adjusted' AS ActivityName,
MODIFIEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE MODIFIEDDATETIME > RELEASEDATETIME AND PRODSTATUS NOT IN ('Ended', 'Cancelled') -- Example logic
UNION ALL
-- Production Started
SELECT
PRODID AS ProductionOrderNumber,
'Production Started' AS ActivityName,
STARTEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE STARTEDDATETIME IS NOT NULL
UNION ALL
-- Operation Completed
SELECT
PRODID AS ProductionOrderNumber,
'Operation Completed' AS ActivityName,
CREATEDDATETIME AS EventTime,
-- Other attributes from ProdTable linked on PRODID...
FROM ProdRouteTrans
WHERE CREATEDDATETIME IS NOT NULL
UNION ALL
-- Production Reported As Finished
SELECT
PRODID AS ProductionOrderNumber,
'Production Reported As Finished' AS ActivityName,
REPORTEDFINISHEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE REPORTEDFINISHEDDATETIME IS NOT NULL
UNION ALL
-- Quality Order Generated
SELECT
PRODID AS ProductionOrderNumber,
'Quality Order Generated' AS ActivityName,
CREATEDDATETIME AS EventTime,
-- Other attributes from ProdTable linked on PRODID...
FROM InventQualityOrderTable
WHERE REFTYPE = 'Production' AND CREATEDDATETIME IS NOT NULL
UNION ALL
-- Quality Inspection Passed
SELECT
PRODID AS ProductionOrderNumber,
'Quality Inspection Passed' AS ActivityName,
MODIFIEDDATETIME AS EventTime,
-- Other attributes from ProdTable linked on PRODID...
FROM InventQualityOrderTable
WHERE REFTYPE = 'Production' AND STATUS = 'Pass' AND MODIFIEDDATETIME IS NOT NULL
UNION ALL
-- Production Order Ended
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Ended' AS ActivityName,
LASTUPDATEDATESTATUSENDED AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE LASTUPDATEDATESTATUSENDED IS NOT NULL
UNION ALL
-- Production Order Cancelled
SELECT
PRODID AS ProductionOrderNumber,
'Production Order Cancelled' AS ActivityName,
MODIFIEDDATETIME AS EventTime,
-- Other attributes from ProdTable...
FROM ProdTable
WHERE PRODSTATUS = 'Stopped' -- Or the equivalent 'Cancelled' status enum value in your system