Planning and Assembly API
The MCP Guard extension adds API pages to Microsoft Dynamics 365 Business Central for planning and for assembly orders. An AI assistant can recalculate the capacity calendar of a work center, calculate a plan into a planning worksheet, read and adjust the suggestions, and create, release and post assembly orders. The pages work on Business Central versions 28 and 29.
The endpoints
The planning pages are in the API group production, the assembly pages in the group assembly:
https://api.businesscentral.dynamics.com/v2.0/{environment}/api/vangelderSolutions/production/v1.0/companies({companyId})/…
https://api.businesscentral.dynamics.com/v2.0/{environment}/api/vangelderSolutions/assembly/v1.0/companies({companyId})/…
| Entity | Group | Object | Operations |
|---|---|---|---|
workCenters | production | Page 73633184 MCP Guard Work Centers API | Read. Action calculateCalendar. |
planningWorksheets | production | Page 73633185 MCP Guard Planning Wksh. API | Read. Action calculatePlan. |
planningLines | production | Page 73633186 MCP Guard Planning Lines API | Read, modify (acceptActionMessage, quantity, dueDate). |
assemblyOrders | assembly | Page 73633187 MCP Guard Asm. Orders API | Read, create, modify. Actions release, reopen and post. |
assemblyLines | assembly | Page 73633188 MCP Guard Asm. Lines API | Read, modify. |
Nothing is deleted through these pages.
What it takes to use them
The planning pages and the assembly pages are in the permission set MCP GUARD - USER. Up to version 1.12.0.0 they were in the sets MCP GUARD - PROD and MCP GUARD - ASSEMBLY, which no longer exist. MCP GUARD - USER grants nothing on business data, so the user also needs Business Central's own permissions. See Permission Sets. The user needs an MCP Guard licence, and the access level on the user's rule decides what is allowed: Planning Access for the planning pages, Assembly Access for the assembly pages. See Access Levels per Module.
Calculate the calendar and the plan
calculateCalendar and calculatePlan take startingDate and endingDate in the request body. Both dates are required, and the ending date must not be before the starting date. Both actions need the access level Create and Actions for planning.
calculateCalendar recalculates the capacity calendar of the work center and its machine centers for the period, and applies the registered absences again.
calculatePlan calculates a regenerative plan into the worksheet: MPS and MRP, for every inventory item, without a forecast. The earlier suggestions in the worksheet are replaced.
Adjust the suggestions
planningLines holds the suggestions in the planning worksheets. A client reads them and accepts, declines or adjusts them by changing acceptActionMessage, quantity or dueDate. Filter on worksheetTemplateName and journalBatchName for one worksheet.
Carrying out the action messages is not offered through the API. That step stays in the Planning Worksheet in Business Central.
Create an assembly order
Send itemNumber first, then quantity and dueDate. The order is stored before its fields are validated, so the item creates the component lines from the assembly BOM right away. The component lines are in assemblyLines, where a client changes quantityPer, quantity, quantityToConsume, the location or the bin. Filter on documentNumber for one order.
Post an assembly order
post posts the quantity to assemble and consumes the components. A fully assembled order is removed by the posting.
Important
post is a posting. Two settings guard it. The user's rule must grant Posting for Assembly Access. And Allow Actions in the MCP configuration is per page, so release, reopen and post go on or off together. To let an AI assistant prepare assembly orders without posting them, grant Create and Actions, or use a configuration without Allow Actions on the assembly orders page.