Forecasting
Helpers for Lanham Demand Planner adds three groups of forecasting capability on top of Lanham Demand Planning:
- Collaborative forecasting enhancements — see forecast values as sales amounts, seed a new forecast from last year's actuals, and show the extra columns planners keep asking for.
- External Forecast Alignment and Redirections — take a forecast produced outside Business Central, optionally move demand between logistical locations, and make the result the forecast planning uses without throwing away what Lanham calculated.
- Demand Forecast Publish — copy the Lanham net forecast into a Business Central demand forecast, so Business Central planning works from the same demand the demand planner sees.
All of the features on this page require the Lanham Demand Planning app. External Forecast Alignment also requires the Excellent Importer app to load the forecast file.
Collaborative Forecasting Enhancements
Viewing the forecast as sales amounts
The Advanced Forecast Worksheet is a forecast worksheet page that can show either forecast quantities or the sales amount those quantities represent. It adds:
| Control | What it does |
|---|---|
| Show Value Type | Switches the worksheet between the quantity view and the sales-amount view. |
| Comparison mode | Compares the new forecast against last year, or against the existing forecast. |
| Price date | The date used to look up unit prices when calculating amounts. |
| Period name display | Chooses how period columns are captioned. |
The same Show Value Type control is added to the standard Forecast Customer page, so you can switch the sub-page between quantities and amounts without leaving it.
How amounts are priced
Amounts are only as good as the price behind them, so the pricing method is a setup choice on Collaborative Forecast Setup:
| Forecast Price Method | Price used |
|---|---|
| Customer Price/Discount | The customer's own price and discount, as a sales order would calculate it. |
| Item Unit Price with Forecast Discount Group | The item unit price, discounted by the item discount group named in Forecast Discount Group. |
| Item Unit Price | The plain item unit price, with no discount. |
Use the discount-group option where customer-specific pricing is too variable to be meaningful at forecast level and you want every customer costed on one agreed basis.
Seeding a new forecast from last year
Planners should not have to retype last year's numbers into an empty forecast. Use Last Year Actual if no Forecast, on Collaborative Forecast Setup, fills the New Forecast values from prior-year actuals the first time a forecast is generated for an item that has none:
| Option | Behaviour |
|---|---|
| No | Nothing is seeded. The forecast starts empty. |
| Confirm First | The planner is asked before the values are seeded. |
| Always | The values are seeded without asking. |
Where a forecast already exists but individual items within it were missed, run Update Forecast with History from the Forecast Customer page. It copies last year's history into the new forecast for items that have no forecast values, and leaves items that do have them alone.
Extra columns on forecast lines
| Column | Where | Why |
|---|---|---|
| Customer Item Reference | Forecast Customer Item, Advanced Forecast Worksheet | Match items to the customer's own part numbers when reviewing a forecast with them. |
| Total Last Year (Qty.) | Collaborative forecast lines | What actually sold last year, beside what is being forecast. |
| Sales Order Qty. | Collaborative forecast lines | What is already on open sales orders for the period. |
External Forecast Alignment
The problem this solves
An external planning system may forecast by customer and item, but its customer groupings do not always match the Business Central customers that receive the goods. Large retailers are a common example: one retailer may have several banners, each with its own promotion profile and timing, while the resulting orders are processed against different ship-to customers. Banners, regions, channels, account groupings, or a third-party planning provider's own customer structure can all be meaningful for forecasting without being Business Central customers.
When the forecast customer does match the customer used for transaction processing, collaborative customer forecasts are usually more appropriate. They let the customer's forecast replace that customer's share of the statistical forecast, rather than adding a separate adjustment on top.
External Forecast Alignment is for the cases where that customer relationship does not exist, or where forecasting is outsourced. It retains the attribution from the external forecast while making its quantities the ones planning uses.
It also keeps the statistical forecast visible. The imported forecast is what planning should use; the statistical forecast remains the benchmark the business can assess for accuracy before deciding how much confidence to place in it. Both views remain available.
How alignment works
The imported forecast is aligned onto Lanham's statistical forecast rather than replacing it. For each item, location and forecast period the process writes two kinds of forecast adjustment row:
- A Statistical Offset row that cancels the saved statistical figure.
- One External Forecast row per grouping, adding the imported quantities back.
The net is the imported forecast, and the planner can still read every number that produced it:
0
Statistical forecast (saved) |████████████████████ +120
Statistical Offset ███████████| -120
External Forecast rows |██████████████ +95
(3 grouping rows) |
------------|-----------------------------
Net forecast used by planning |██████████████ 95
Net adjustment shown to the planner: -25
So a planner can see what Lanham forecast (120), what the business forecast (95), the movement between them (-25), and which groupings that movement came from.
Rows the process writes are tagged with an Alignment Row Type — Statistical Offset, External Forecast or Frozen Offset — and the customer and grouping are written into the adjustment note. The tag is what makes the process safe to run repeatedly: it only ever deletes and rewrites rows it wrote itself, and never touches an adjustment a planner entered by hand.
Forecast Redirections
Forecast Redirections apply only to External Forecast Alignment. They are for cases where the external forecasting system is unaware of the actual logistical requirements — for example, it forecasts against a main warehouse but the demand is planned, held or replenished through one or more third-party warehouses.
A redirection rule specifies an item, source location, receiving location and percentage. When the external forecast is aligned:
- The imported external forecast line remains unchanged at the source location.
- The redirected share is added as a system-created line at the receiving location.
- The same share is written as a negative system-created line at the source location, so the source's net forecast is reduced while the original external figure remains visible.
- The receiving procurement unit must be replenished from the source location. When a rule is enabled, the app offers to create or repoint that procurement unit if necessary.
Redirection uses whole units. A share that rounds to zero is not moved and is not deducted from the source. The Redirected column identifies lines created by the app so planners can distinguish them from imported lines.
Where to set up redirections
Create and maintain rules from the External Forecast Redirections list. Open it from Tell Me by searching for External Forecast Redirections, or use the Forecast Redirections split button on:
- Stockkeeping Unit Card or Stockkeeping Unit List — Redirections From Location shows rules leaving the SKU's location; Redirections To Location shows rules feeding it.
- Procurement Unit Card or Procurement Unit List — the same two actions, filtered to the procurement unit's item, variant and location.
- External Forecast Alignment Lines — the same two actions, filtered to the selected line's item, variant and location.
Use Redirections From Location to configure demand moving away from the current location. Use Redirections To Location to review or configure demand arriving from another location. Enter the item, source location, receiving location and percentage, then enable the rule. Enabling validates the percentage and checks that the receiving procurement unit is replenished from the source; the app offers to create or repoint it when needed.
Forecast Redirections do not alter collaborative customer forecasts, sales orders, SKU replenishment settings or manually entered forecast adjustments. They only redistribute quantities imported through External Forecast Alignment.
Only items the imported file covers are aligned. Promotions, collaborative forecasting and unusual-demand adjustments are left alone, and Lanham's forecast calculation is unchanged.
What you import
The file is loaded through the Excellent Importer, using the import type External Forecast Alignment (Lanham Demand Planner).
| Column | Required | Notes |
|---|---|---|
| Item No. | Yes | Must exist. |
| Location Code | Yes | Must exist. |
| Forecast Date | Yes | Moved onto the starting date of the forecast inventory period that contains it. |
| Quantity | Yes | Converted to the item's base unit of measure on import, because Lanham always works in base. |
| Variant Code | No | Must be a variant the item has. |
| Grouping Description | No | Free text up to 100 characters — the external customer, banner or channel. It does not have to be a Business Central customer. |
| Customer No. | No | Where the grouping does map to a real customer, name it here. |
| Unit of Measure Code | No | Blank uses the item's base unit. |
Rows that share the same item, variant, location, customer, grouping and period are summed together on import.
Each import replaces the lines for the periods its file covers. Load a file covering March to June and the March-to-June lines are rewritten; lines outside that range stay as they are.
Set Validate Data before Import to Yes on the import template. The whole file is then checked in one pass and every problem reported together, instead of the import stopping on the first bad row. Skip Invalid Items decides whether rows with a blank or unknown item are left out and counted, or the file is rejected.
Automatic Forecast Alignment
Set Automatic Forecast Alignment on the import template to run these actions after the imported lines commit. Applies to interactive imports and import definitions.
| Option | Actions |
|---|---|
| No (default) | Only the alignment lines are imported. Align and publish manually or through their scheduled jobs. |
| Align to Forecast | Run forecast alignment and commit its changes. |
| Align to Forecast & Publish to BC Demand | Run and commit alignment, then publish and commit the BC demand forecast and refresh its enabled derived forecasts. |
Alignment processes the existing pending work list, including work queued before this import. Publishing uses its configured forecast scope and horizon, not just the rows in the file. A cancelled import, an unsuccessful import, or a file that writes no alignment lines triggers no follow-up actions.
Each action is a separate transaction. If alignment fails, only alignment rolls back and publishing does not start. If publishing fails, only publishing rolls back; the imported lines and completed alignment remain committed. Each derived forecast also commits separately: one failure does not undo publication or other successful derivations, and the remaining derived forecasts still run. Correct the reported problem and retry the failed action without reimporting the file.
Automatic publishing requires Publish to Demand Forecast and a positive Periods to Publish, alongside the normal publishing prerequisites. Missing setup reports an error after preserving the import and completed alignment; it does not silently skip the requested publication.
These actions run in the importing session, not through a new job queue entry. Job queue category codes do not protect an immediate import run from overlapping Lanham's overnight processing or other scheduled alignment and publishing runs. Arrange imports outside those processing windows.
Setting up forecast alignment
-
Turn Save Statistical Forecast on in Advanced Forecasting Setup. The alignment run reads the saved statistical forecast and errors without it.
-
Decide the two switches on the External Forecast tab of Advanced Forecasting Setup:
Field Effect Create Missing Procurement Units The run creates a procurement unit for an imported item that has none, instead of skipping it. Off by default. Override Frozen Forecast The imported forecast wins over a frozen forecast adjustment. Off by default — see Frozen periods. -
Assign the External forecast alignment permission set to your planners and to the account the job queue runs under. Lanham's own
LAX DP Lanham Allgrants only read access to forecast adjustments, which is not enough. -
Build the Excellent Importer mapping template for your file.
-
Create the job queue entry (see below).
-
Diarise Reapply All as a periodic task.
Running it
Everything is driven from the External Forecast Alignment Lines page. Search for it in Tell Me, or open it from External Forecast on the Procurement Unit list or card, or from the Forecast Adjustment Lines page.
| Action | What it does |
|---|---|
| Import Forecast File | Loads the file and rewrites the alignment lines for the periods it covers, then runs any actions selected in Automatic Forecast Alignment. |
| Align Forecast | Rebuilds the forecast adjustments from the lines and reports what it did. |
| Publish Demand Forecast | Copies the resulting net forecast into a Business Central demand forecast — see Demand Forecast Publish. |
| Reapply All | Queues every procurement unit for a full rebuild on the next run. |
| Procurement Unit, View Forecast, Location Inventory Roll Up, Forecast Adjustments | Navigation to the Lanham pages for the line you are on. |
The Apply Pending column is highlighted on any line whose adjustments no longer match the imported figures. It clears when the alignment run next reaches that procurement unit.
The Lanham Forecast Adjustment Lines page gains an Alignment Row Type column and an action back to the alignment lines the adjustments were built from, so a planner looking at an unexpected adjustment can see at once whether this process wrote it and what it came from.
Scheduling the alignment run
An ordinary job queue entry:
| Field | Value |
|---|---|
| Object Type to Run | Codeunit |
| Object ID to Run | ForcAlignMgt_HDP_TSL |
| Job Queue Category Code | The same category code the Lanham overnight job uses |
The shared category code is what stops this entry running at the same time as Lanham's overnight reforecast. Lanham commits its reforecast in batches, so an overlapping run would read a statistical forecast part way through being rewritten. Entries that share a category code run one after another rather than in parallel.
Schedule it after the Lanham overnight job. The run costs a single read when there is nothing to align, so it is safe to schedule frequently if you want intra-day drift corrected sooner.
Frozen periods
Lanham honours a frozen forecast adjustment by discarding the statistical figure for that period and using the frozen quantity instead. That changes what alignment can sensibly do, because there is no longer a statistical figure to cancel.
| Override Frozen Forecast | What happens in a frozen period |
|---|---|
| Off (default) | The freeze wins. Nothing is written for that period — no offset and no imported rows. The period keeps the frozen quantity, and the run reports how many periods it left alone. |
| On | The import wins. A Frozen Offset row cancels the frozen quantity, and the imported rows land on top exactly as they do in an ordinary period. |
Where more than one frozen row exists in a period, the period is always left alone whatever the setting says, because there is no single frozen figure an offset could reliably cancel.
With Override Frozen Forecast on, a frozen period reads short by the frozen quantity on Item Forecast Review, on Location Inventory Roll Up, and on Forecast View with the frozen toggle off. Those three screens read forecast adjustments in a mode that skips frozen rows, and the Frozen Offset row is not itself frozen, so it is read while the row it cancels is not. Planning is unaffected — this is a display difference on three screens.
Keeping the offsets correct
A statistical offset written last night can be wrong this morning, because Lanham rewrites the saved statistical forecast for an item on any night that item is reforecast — and on demand, whenever a user reforecasts by hand. The app watches for that and queues the affected procurement unit automatically, so the next alignment run puts it right.
What the watch cannot see are the paths where Lanham deletes a saved forecast without writing a new one. Reapply All covers those: it queues every procurement unit that has alignment lines, and every one the process still owns adjustments for, so the next run rebuilds the lot against the statistical forecast as it now stands. Run it periodically, and after any Lanham upgrade.
Limitations
- Intra-day drift. A manual reforecast at 2pm leaves that item's offset wrong until the next run. The procurement unit is queued immediately and Apply Pending shows it, but the adjustments are stale in the interim. Run the job queue entry on a shorter interval if that matters.
- A skipped line is not retried automatically. Where an item has no procurement unit and Create Missing Procurement Units is off, the line is counted as skipped in the run summary and waits for a fresh import, a statistical forecast save, or Reapply All.
- A location with no forecast periods never clears. Its procurement units stay queued deliberately.
- Drift is corrected, not reported. Reapply All absorbs the difference silently rather than telling you a figure had moved.
Demand Forecast Publish
Why publish at all
Lanham's planning engine and Business Central's planning engine each hold their own view of demand. Lanham's forecast lives in its own tables and drives Lanham suggested orders; Business Central planning worksheets read the Demand Forecast. Anything that only exists on the Lanham side — the statistical forecast, forecast adjustments, the external forecast alignment, the collaborative customer forecast — is invisible to Business Central planning.
This feature copies the Lanham forecast into a named Business Central demand forecast on a schedule, so both engines plan from the same demand. It is what makes the external forecast alignment reach Business Central planning too.
What is published
The published figure is Lanham's net forecast:
Net = statistical forecast + forecast adjustments + collaborative customer forecast
All three are read from saved data. A frozen forecast adjustment replaces the statistical figure for its period, exactly as Lanham reads it; non-frozen adjustments are summed on top.
Quantities are rounded up to the next whole unit, because a Business Central demand forecast drives whole-unit planning.
What is deliberately not published
| Excluded | Why |
|---|---|
| Lanham's auto forecast adjustment | It tops the forecast up where actual consumption and open demand are already running ahead of it. Business Central already nets a demand forecast against actual sales orders inside the period, so publishing it would count those orders twice. |
| Sporadic forecast rows | They hold a sporadic target inventory level, not period demand. Publishing one would tell Business Central planning to acquire that quantity as demand every period. |
| Min/Max procurement units with a maximum inventory | Lanham gives these no forecast at all, so publishing one would put demand into Business Central that Lanham does not plan against. They are counted on the run summary. |
Publish scope — hub and spoke
Publish Scope decides which locations carry the published demand.
| Publish Scope | Publishes | Demand read over |
|---|---|---|
| Each Location | Every procurement unit. | Its own location. |
| Replenishment Path | Only units that are not replenished from another location. | That unit's own location plus everything it supplies, transitively. |
A procurement unit counts as supplied by another location when its Replenishment Source Type is Location and its Replenishment Source Code is filled in. A unit fed by a vendor, by production or by assembly is the top of its path.
Replenishment Path is the scope for the arrangement this is usually wanted for: Business Central plans short-term production or purchasing centrally from one demand figure, and Lanham keeps the procurement and the transfers out to the spokes. The spokes' demand still reaches Business Central — it is inside the hub's figure.
Roll Up Via Repl. Path in Inventory Management Setup is what decides whether Lanham's saved statistical forecast at a location is that location's own figure or its whole subtree's.
| Roll Up Via Repl. Path | Required Publish Scope | What the wrong scope would do |
|---|---|---|
| On | Replenishment Path | Each Location publishes the hub's subtree total and each spoke's own — the same demand twice. |
| Off | Each Location | Replenishment Path publishes only the path tops, whose figures cover their own location only — every spoke's demand disappears. |
The setup fields refuse to be set while the two disagree, and the run checks again before it starts. On a flat network — where no procurement unit is replenished from another location — the two scopes produce identical output, so the rule never forces a choice that changes anything.
Setting up demand forecast publish
-
Turn Lanham's own Save Stat. Forecast to Base BC Demand Forecast off. The setup fields here refuse to be set while it is on. That mechanism writes the same table and publishes the statistical figure only.
-
Turn Save Statistical Forecast on. The run errors without it.
-
Set Publish Scope to match Roll Up Via Repl. Path in Inventory Management Setup — on → Replenishment Path, off → Each Location. Do this first, because the forecast name refuses to be set while the two disagree.
-
Create a demand forecast name for this process alone and set Publish to Demand Forecast to it.
The target demand forecast name is rewritten in fullThe run clears and rewrites the entries under that name every time. Anything else writing to the same name will be destroyed. Do not point this at a demand forecast anybody maintains by hand.
-
Set Periods to Publish to the horizon Business Central planning needs — typically 12 for monthly forecast periods, 52 for weekly.
-
If you need to publish only part of the catalogue, narrow it with the item, location and variant filters on the demand forecast name itself. There is no separate setup field here for it — the run reads the filters off the target name. The item filter is the standard demand forecast one, so it can filter on any item field, not just the item number.
-
Set Forecast by Locations and Forecast by Variants on the target name if you want the published entries to be legible on the Demand Forecast card. They do not change what is published — location and variant are always written.
-
Assign the External forecast alignment permission set to the job queue account.
-
Create the job queue entry from the notification on the setup page, set its start time behind Lanham's overnight job and the alignment entry, and set it Ready. Then run Publish Demand Forecast once by hand from External Forecast Alignment Lines and read the summary it returns. In Replenishment Path scope, check the count of locations skipped as supplied by another — it should match the number of spokes.
Setting a forecast name and a period count is enough to configure publishing, but not enough to make it happen. Advanced Forecasting Setup raises a notification while publishing is configured and no job queue entry is scheduled to run it.
Its Set up the job queue entry action creates the entry for you and opens its card. The entry is created On Hold, recurring on all seven days, retrying up to 10 times with a 60-second wait between attempts, starting tomorrow evening — and it takes the job queue category code from your alignment entry where one exists. It is left On Hold deliberately: only you know when Lanham's overnight job and the alignment entry run, so set the start time behind them both and then set the entry Ready.
Scheduling the publish run
| Field | Value |
|---|---|
| Object Type to Run | Codeunit |
| Object ID to Run | ForcPublishMgt_HDP_TSL |
| Job Queue Category Code | The same category code the Lanham overnight job uses |
Order matters. The publish run must go after Lanham's overnight job, which rewrites the statistical forecast, and after the alignment entry, which writes the adjustments the publish reads. Sharing the job queue category code serialises all three; sequence them by scheduled start time within it.
Running out of order is not corrupting — the next run puts it right — but it publishes a forecast that is one cycle stale.
Automatic derivation after publishing
Every successful publication, whether started manually, by a job queue entry, or after an import, commits the source forecast and then refreshes every enabled derived forecast whose Derive From Forecast names that source. Unrelated and disabled derived forecasts are not run. Derived forecasts cannot themselves be derivation sources, so this does not build chains.
Each target is rebuilt in its own transaction. A failed target keeps its previous entries and records the attempt in Last Derivation Status and Last Derivation Error. Other targets continue, and the published source remains committed with its publication status. The returned summary includes the number of derived forecasts that succeeded or failed.
The nightly order of work
1. Lanham overnight job rewrites the saved statistical forecast
2. Align Forecast rebuilds the forecast adjustments from the imported lines
3. Publish Demand Forecast copies the net forecast into the BC demand forecast
4. Derive Daily Forecasts runs automatically for enabled dependants after publication commits
An independent daily derivation job remains useful when sales, orders or the work date change without a new publication. See Derived Daily Forecast.
Derived Daily Forecast
This feature now lives in Planning, because it is a short-term planning capability for items that need finer-grained planning such as fresh food.
Advanced Forecasting Setup reference
Everything this app contributes to setup sits on two tabs on Advanced Forecasting Setup — External Forecast and Inventory Control — so a consultant can tell at a glance what is this app's and what is Lanham's.
| Field | Tab | Feature | Purpose |
|---|---|---|---|
| Create Missing Procurement Units | External Forecast | External Forecast Alignment | Create a procurement unit for an imported item that has none, instead of skipping it. |
| Override Frozen Forecast | External Forecast | External Forecast Alignment | Let the imported forecast win over a frozen forecast adjustment. |
| Publish to Demand Forecast | External Forecast | Demand Forecast Publish | The target demand forecast name. Blank disables publishing. |
| Periods to Publish | External Forecast | Demand Forecast Publish | How many forecast periods to publish. Zero disables publishing. |
| Publish Scope | External Forecast | Demand Forecast Publish | Each Location or Replenishment Path. Must agree with Roll Up Via Repl. Path. |
| Virtual In-Transit Location | Inventory Control | Both inventory features | The virtual in-transit location the generated transfer routes use. Shared, because nothing is ever posted through it. |
| Inventory Building Location | Inventory Control | Inventory Building | The virtual location an inventory build is transferred to. See Inventory Building. |
| At-Risk Location | Inventory Control | Inventory at Risk | The virtual location at-risk inventory is transferred to. See Inventory at Risk. |
| At-Risk Shipment-Date Offset (Days) | Inventory Control | Inventory at Risk | How many days after the processing date the generated at-risk demand is dated. |
Permissions
| Permission set | Covers |
|---|---|
External forecast alignment (ForcAlign_HDP_TSL) | The alignment lines, the work list, Lanham forecast adjustments, the saved statistical forecast, and the Business Central demand forecast tables the publish run writes. |
Assign it to planners who maintain the external forecast, and to the account the job queue entries run under. Lanham's LAX DP Lanham All grants read-only access to forecast adjustments, which is not enough for either run to write.