A User (MES) is an operator, or a machine that reports its own work. On the shop floor it acts from the operator client, which talks to Business Central over the AL MES Web API.
Each Start, Pause and Finish on an operation (a production order routing line) becomes a line in Routing Entries (MES), with its times. An operation can have several: the pauses and the finish.
In the back office you review the entries and run Calc. and Open Output Journal: AL MES fills the Output Journal with the produced quantity, scrap and time, as machine capacity lines and operator capacity lines.
When an operator worked on several operations in overlapping time, the operator's time is shared automatically across those operations, in proportion to the quantity produced. You then post the journal with standard Business Central.
In this guide, work center and machine mean the standard Work Center and Machine Center.
2. Prerequisites
Microsoft Dynamics 365 Business Central, version 29.0 or higher, online (SaaS) and on-premises. AppSource covers online environments; on-premises is distributed and installed directly by AppLibra, through the AppLibra License Manager.
Manufacturing is part of the Premium experience of Business Central: every user of AL MES, operators included, needs a license that includes it.
The AppLibra dependencies, installed automatically with the app: AL License and Trial Management, AL Message Passing, AL Role Center.
Standard manufacturing in use: released production orders with a routing, work centers and machine centers, and a template and batch for the Output Journal and, if you post consumption, for the Consumption Journal.
The operator client (the companion shop-floor app) configured to reach the Business Central Web API.
3. Setup
The AL MES pages can be found with search (Alt+Q) and in the MES group of the Business Central manufacturing role centers and of the AppLibra role center.
3.1 Activate the license
Search for Setup (MES), open it and run Add License to activate the app, as a trial or with the full license.
3.2 Setup (MES)
On the Setup (MES) page fill in:
Field
Purpose
Require Machine Center
If on, a routing line must have a machine assigned before an operator can start the phase.
Require Operator Machine Center
If on, preparing the journal stops when an operator involved in a work group has no Capacity No. (see 3.3).
Output Template Name, Output Batch Name
The Output Journal template and batch where AL MES writes the output and capacity lines.
Consumption Template Name, Consumption Batch Name
The Consumption Journal template and batch, if you post consumption (see 4.7).
Consumption Scope
Which components the calculation proposes: all those of the Production Order or only those of the Selected Operations (see 4.7).
Consumption Calculation
The calculation basis: Actual Output or Expected Output (see 4.7).
Back Office User No. (MES)
The user the back office acts as when it runs Start, Pause and Finish on behalf of operators.
Back Office Reason No. (MES)
The reason written on the entries the back office pauses on behalf of operators.
Round Output To Integer
If on, the output shared across the lines of a shared phase is rounded to whole numbers.
Actual Run Time Per Quantity
If on, the actual time AL MES provides to AL Processing Charge for the sales order is shared over the quantity of the line.
Require Verified Times
Off by default. If on, output, consumption and operator capacity are calculated only for orders with verified times (see 4.5).
Allow Concurrent Operators
Off by default. If on, several operators can work on the same phase at the same time (see 5.1).
Setup (MES): output and consumption journals, consumption scope and basis, back-office user and reason.
3.3 Users (MES)
Search for Users (MES) and create one row per operator:
Field
Purpose
No., Name
The operator's code and name.
Capacity Type
Work Center or Machine Center: the kind of resource that represents the operator's work.
Capacity No.
The work center or machine where the operator's capacity line is posted.
Default Time Type
The time type proposed at every start: Run or Setup. It decides which time the work goes to at posting.
Machine User
For a user that represents a machine, for example a scale: it can restart the phase even after its own finish, cycle after cycle, until posting closes it (see 5.1). Only effective with Allow Concurrent Operators on.
Capacity Type and Capacity No. are what let AL MES post the operator's work separately from the machine's. A dedicated setup technician is configured with Default Time Type set to Setup: their starts go to setup time with no extra steps. Users (MES): the operators with their capacity type and number. The User Card (MES) also shows the operator's entries and the Forced Machine Center No. field, described in 4.1. User Card (MES): default time type, machine user, forced machine center and the operator's entries.
3.4 Reason codes
AL MES uses two different lists:
Reason Codes (MES) holds the back-office reasons. Create at least the one to set in Back Office Reason No. (MES): it goes on the entries the back office pauses on behalf of an operator.
The scrap reasons the operator picks on Finish are the standard Business Central scrap codes.
Reason Codes (MES): the reasons used by the back office.
3.5 Web API
AL MES exposes the API pages the operator client uses: users, machine centers, work centers, scrap reasons, routing lines and routing entries. Point the client at the Business Central Web API base URL for the company; nothing else is needed inside Business Central.
3.6 Permissions
AL MES brings two permission sets to assign to Business Central users:
Set
For
What it allows
ALMES-OPERATOR (AL MES - Operator)
Whoever works on the shop floor, also through the operator client
Reads setup, users and reasons; creates and updates entries; uses the operator pages and the Web API. Covers also the standard manufacturing tables the operator works on (machines, work centers, scrap reasons, production orders and their routing lines), so together with D365 BASIC it is all a shop floor account needs.
ALMES-BACKOFFICE (AL MES - Back Office)
Whoever configures the app and manages the entries
Everything the operator has, plus managing setup, users and reasons, and deleting entries.
The two sets cover AL MES. To post the output and consumption journals, users also need the normal Business Central manufacturing permissions.
4. Daily use
4.1 On the shop floor
From the operator client, the operator:
picks the operation (a routing line of a released production order) and presses Start: AL MES opens an entry with the start time, operator, work center and, when there is one, machine;
presses Pause to interrupt and Start to resume: each interval is a segment of the same operation;
presses Finish and enters the output quantity and any scrap with its reason: AL MES closes the segment with the end time and the quantities.
Start uses the operator's Default Time Type. To start in setup regardless, there is Start Setup. When resuming after a pause, the segment continues with the same type as the paused one, not with the default.
In the operator client the machine page lists the phases with their status and the start commands; pause, resume and finish are on the operator's pages of the operations in progress and paused. On finish the client proposes the remaining quantity. The client speaks English or Italian, following the language of the device. The operator client: the phases of a machine, with their status and the start commands.The operator client: finishing an operation, with the remaining quantity proposed and the scrap. The same actions are available inside Business Central: open the User Card (MES) and, in its entries, run Get Active Prod. Order Routing Lines. This opens Select Action To Make (MES), useful for a back-office operator or for testing without the mobile client. Select Action To Make (MES): the active phases with Phase Status (MES) and the Start, Start Setup, Pause and Finish actions. On Finish, Finish Card (MES) opens. Output Qty. proposes what is still to be reported; if the quantity exceeds the remainder, AL MES asks for confirmation. Finish Card (MES): previous operation quantity, output quantity, scrap reason and scrap quantity. The Forced Machine Center No. field on the User Card (MES) is for an operator who works on a specific machine while the phases are planned on the work center. Pick the machine and run Get Active Prod. Order Routing Lines: the list offers the active phases planned on that machine's work center and those already on the machine. Start or Start Setup moves the phase onto the chosen machine. The field is not saved: it holds while the card stays open. With Require Machine Center on, the list only offers the phases already on the machine.
4.2 In the back office
Open Routing Entries (MES) to see what the floor reported. The actions are in three groups:
Phases
Get Active Prod. Order Routing Lines lists the active phases and lets you act as the back-office user.
Close User Active Prod. Order Routing Lines pauses the selected open entries, with the back-office user and reason. Use it when an operator left a phase open.
Times Verification
Mark Times Verified and Clear Times Verified work on the orders of the selected lines (see 4.5).
Journals
Calc. and Open Output Journal calculates output, scrap and time from the selected entries and opens the prefilled Output Journal.
Calc. and Open Consumption Journal calculates the components and opens the Consumption Journal (see 4.7).
Show Prod. Order Routing Lines opens the routing of the line. Update Item Info, under the Actions menu, recalculates the item and description of the selected lines (see 4.4).
The Total Run Time and Order Run Time columns show the time the operation and the whole order will post. They are red while the value is provisional, because an operation it depends on is not finished yet; a posted operation is never provisional. The same totals, with the same color, are on Select Action To Make (MES). Routing Entries (MES): the operators' entries and the Phases, Times Verification and Journals action groups. Progress also shows on the standard production order routing page, in the Phase Status (MES) column: blank if the operation has not started, then In Progress, Paused or Completed. Production order routing with the Phase Status (MES) column.
4.3 Review and post
In the Output Journal opened by the action you find, for each operation:
a machine line, with output quantity, scrap and the operation's share of the machine time;
one line per operator, with their share of the time.
The journal is calculated only on an empty batch. If the batch of Setup (MES) already has lines, from an earlier calculation or written by hand, the action calculates nothing, tells you how many lines are there and opens the journal: post them or delete them, then run the calculation again. This way the same operation is never prepared, and posted, twice.
If the item is tracked by lot or serial number, assign the tracking on the production order line before preparing the journal. AL MES carries it to the output line of the last operation, each line for its own quantity. If the output exceeds the tracked quantity, the extra part stays without a lot: complete it on the journal line before posting.
Review the lines and post the journal with standard Business Central. The result is standard capacity ledger entries and production output. Output Journal prepared by AL MES: the machine lines and the operator capacity lines with the shared time.Capacity ledger entries after posting: the machine time and the operators' time.
4.4 Context columns on the entries
Each entry carries the context of the operation, filled when the entry is created:
Item No. and Item Description show the item produced. For header-routed orders, where the phase serves several lines, the item is blank and the description shows "(N items)" with the order description; the drill-down opens the lines.
Sales Order No. is the sales order the production comes from: direct for project orders, resolved through order-to-order reservations for the others. The drill-down opens it.
Notes is free text per entry, for example the agreed price of an external processing.
If you have entries created before this feature, select them and run Update Item Info once from the Actions menu. Routing Entries (MES): item, description, sales order and notes.
4.5 Verifying times
Before the captured times feed accounting, a supervisor can certify them. Verification is at released production order level:
the order header has the Times Verified (MES) flag;
on Routing Entries (MES) the same state is the filterable Times Verified column;
to work in bulk, select the entries and use Mark Times Verified or Clear Times Verified.
Require Verified Times in Setup (MES) decides whether verification is mandatory:
off: verification is informational and the calculation considers all entries;
on: the calculation of output, consumption and operator capacity includes only verified orders. Entries of other orders are skipped with a message, and a work group containing even one unverified phase is deferred as a whole.
Important: this check acts only when the journal lines are generated. Posting the journal stays standard Business Central and is never blocked by verification. Routing Entries (MES) with the Times Verified column and the Times Verification actions. ### 4.6 Correcting times
On Routing Entries (MES) you can correct the times of a closed entry. Start, end and run time always agree:
correct End Time, and the run time is recalculated;
correct Run Time, and the end moves to start plus run time;
correct Start Time, and the end stays put while the run time is recalculated.
A correction is refused on an entry still open (pause or finish it first), on an operation already posted, and when the end would be empty, in the future or before the start.
4.7 Consumption
On Routing Entries (MES) select the lines of the operations and run Calc. and Open Consumption Journal, in the Journals group. AL MES runs the standard Business Central consumption calculation on the batch set in Setup (MES) and opens the journal. What counts is the operations of the selected lines, even if the line is a pause, as long as they have at least one finish entry.
Two Setup (MES) fields drive the calculation:
Consumption Scope: with Production Order all components of the selected orders are proposed; with Selected Operations only the components linked to those operations through the Routing Link Code. If the operations have no code, no component is proposed for that order.
Consumption Calculation: with Actual Output the quantity follows the output already posted, so post the Output Journal first; with Expected Output it follows the quantity expected by the order.
Consumption also respects Require Verified Times. Review the lines and post the journal with standard Business Central. Consumption Journal prepared by AL MES with the components of the order.
5. How the time is shared
Sharing runs automatically inside Calc. and Open Output Journal:
when the same operator worked on several operations with overlapping intervals, on the same machine or on different ones, AL MES groups them;
the operator's actual time over the group is split in proportion to the quantity produced by each operation, or equally when the total quantity is zero;
the group is prepared whole: the machine lines and the operator lines of all its operations, even those you did not select, with a message saying how many were added. If an operation is still open or paused, the whole group waits, machine lines included, with a message: the time is never shared halfway, and no operation is posted without the line that closes it, nor closed without its output;
an operation of the group already posted still counts when the operator's time is shared, but no longer holds the others;
the machine line carries the operation's share of the machine time (see 5.2), the operator line carries the operator's share.
5.1 Several operators on the same phase (optional)
By default a phase allows one open segment, whoever the operator is. If a second operator tries to start it, Start is disabled inside Business Central and the call from the operator client is rejected. A completed phase does not restart.
With Allow Concurrent Operators on, several operators can have open segments on the same phase. The block only applies against yourself: your own open segment or your own finish block you, not your colleagues. On the time:
the machine counts the phase once while two operators work on it together;
every operator keeps their own capacity line, with the usual sharing.
With this option Machine User becomes useful. A regular user cannot reopen the phase after their own finish; a machine user can, and every cycle is a new start and finish pair on the same routing line, until posting closes the phase. The typical case is a scale weighing several times. Routing Entries (MES): two operators on the same phase at the same time.
5.2 Orders worked together on the same machine
When several orders are worked at the same time on the same machine, or on the same work center when there is no machine, they share its time:
the Capacity of the machine is the ceiling: while the operations fit, each with its Concurrent Capacities, each keeps its own clock;
when they do not fit, the time is divided in proportion to the quantity produced by each, or equally when there is no quantity.
For example, two orders worked together on a machine of capacity 1 from 8 to 12, with 2 pieces each, post 2 hours each. A machine with enough capacity for all, and many are created with capacity 100, never divides its time: for orders worked together to share it, set the capacity to 1.
A finished operation is posted only when the operations that overlapped it on the same machine are finished too. Until then it stays out of the calculation, with a message, and its total stays provisional. Routing Entries (MES): two orders on the same machine with the provisional totals in red.
6. Scheduling
Today the calculation is started on demand from Routing Entries (MES). Automatic execution through the job queue is planned for a later version: the app does not expose an object to schedule yet.
7. Tips and troubleshooting
An operation does not start. With Require Machine Center on, the routing line must have a machine: check the type and number on the line.
Preparing the journal stops on an operator without capacity. With Require Operator Machine Center on, every operator in a work group needs a Capacity No. on the User Card (MES).
A work group is not posted. It waits until all its operations are finished: finish the open or paused one from the operator client or from the User Card (MES) of whoever is working on it.
The calculation prepares nothing and says the batch already has lines. The journal is calculated only on an empty batch: post or delete the lines there, then run it again (see 4.3).
The journal contains operations you did not select. The same operators worked on them at the same time as on the selected ones, so they share the time and are posted together (see 5).
The operator line does not appear. Check the user's Capacity Type and Capacity No.
An order is skipped in the calculation. With Require Verified Times on, only verified orders are included: turn on Times Verified (MES) on the order or use Mark Times Verified, then run the calculation again.
A second operator cannot start a phase already started. That is the default rule. To work together on the same phase, turn on Allow Concurrent Operators.
An operator cannot restart a phase after their own finish. Expected: their participation is closed. If what repeats the cycle is a machine, for example a scale, mark its user as Machine User.
A finished operation is not posted. It waits for the operations worked at the same time on the same machine: finish them (see 5.2).
Two orders worked together each get the whole time. The machine's capacity fits both: with capacity 1 they share it (see 5.2).
Posting asks for a lot number. The lot was not assigned on the order line, or the output exceeds the tracked quantity: complete the tracking on the journal line (see 4.3).
The Consumption Journal proposes no components. With Selected Operations, the components must have the same Routing Link Code as the operation. The selected operations must also have at least one finish entry (see 4.7).
A correction of the times is refused. The entry is still open, the operation is already posted, or the end would be empty, in the future or before the start (see 4.6).