{"title":"Create a Sales Validation Agent (preview)","url":"https://jonas-paprotka.de/docs/dev-itpro/ai/ai-development-toolkit-sales-validation/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-sales-validation, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-sales-validation","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Learn how to create and use a Sales Validation Agent in the agent design experience to automate sales order validation tasks in Business Central.","date":"2026-10-02","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Create a Sales Validation Agent (preview)","slug":"create-a-sales-validation-agent-preview","at":0,"chars":5814},{"level":2,"title":"Steps to create and use the Sales Validation Agent","slug":"steps-to-create-and-use-the-sales-validation-agent","at":967,"chars":3410},{"level":3,"title":"Create the Sales Validation Agent","slug":"create-the-sales-validation-agent","at":1144,"chars":875},{"level":3,"title":"Add an item with inventory to be used in sales orders","slug":"add-an-item-with-inventory-to-be-used-in-sales-orders","at":2019,"chars":567},{"level":3,"title":"Create and process a sales order using the Sales Validation Agent","slug":"create-and-process-a-sales-order-using-the-sales-validation-agent","at":2586,"chars":1117},{"level":3,"title":"Run the Sales Validation Agent to process sales orders","slug":"run-the-sales-validation-agent-to-process-sales-orders","at":3703,"chars":674},{"level":2,"title":"Sales Validation Agent as an AL application","slug":"sales-validation-agent-as-an-al-application","at":4377,"chars":314},{"level":2,"title":"Related information","slug":"related-information","at":4691,"chars":1123}],"text":"# Create a Sales Validation Agent (preview)\n[This article is prerelease documentation and is subject to change.]\n> IMPORTANT\n > This is a preview feature. Preview features might have restricted functionality and are subject to supplemental terms of use<https://www.microsoft.com/en-us/business-applications/legal/supp-powerplatform-preview/>.\n > The AI development toolkit is available in sandbox environments only. The Agent SDK for AL is available in sandbox environments and, starting from version 28.1, also in production environments.\n > This article is primarily intended for product owners, domain experts, consultants, and developers who want to experiment with AI capabilities in Business Central.\nThe Sales Validation Agent is a preconfigured agent designed to help you automate the validation of sales orders in Business Central. This agent can check sales orders for inventory availability and ensure that orders meet specific criteria before processing.\n## Steps to create and use the Sales Validation Agent\nFollow these steps to create and use the Sales Validation Agent, which is available as part of the AI development toolkit.\n### Create the Sales Validation Agent\nFirst, create the Sales Validation Agent.\n1. In the navigation bar at the upper right of the role center, select ![Agent create new] Agent > Create.\n1. In the Create agent wizard, choose Sales Validation, and then choose the Create agent button.\n1. You can use the arrows to review the setup steps.\n If you want to change any of the default settings, you can do that now or after the agent is created. For example, you can change the agent name, description, or instructions. The default instructions are designed to validate sales orders based on inventory availability and shipping dates, but you can customize them to fit your specific business needs.\n1. In the Configure agent dialog, choose the Active toggle to activate the agent.\n1. Choose Update to save and close the agent setup dialog.\nNow, the agent is created and activated.\n### Add an item with inventory to be used in sales orders\nNext, add an item with inventory that the Sales Validation Agent can use to validate sales orders.\n1. Select Search (Alt+Q) in the upper-right corner, enter Items, and then choose the related link.\n1. Open the Item Card for the item you'll add to the sales order, which you'll create in the next section.\n1. In the Inventory section, use the AssistEdit button on the Inventory field.\n1. On the Adjust Inventory page, add quantity to the New Inventory field for a location that isn't Unspecified.\n1. Press OK.\n### Create and process a sales order using the Sales Validation Agent\n1. Select Search (Alt+Q) in the upper-right corner, enter Sales Orders, and then choose the related link.\n1. On the Sales Orders list page, create a new sales order.\n1. Choose any customer.\n1. Add one or more new sales lines, with the item from the previous step.\n1. Add quantity to one or more lines.\n Ensure that the Location is the same location you added quantity for.\n1. For that sales line, under Line > Functions, choose Reserve.\n1. There should be quantity available for reservation from Item Ledger Entry, select it, and choose Reserve from Current Line. Then, choose OK.\n1. Back in the Sales Order card, under Shipping and Billing, optionally change the Shipping Date, otherwise just remember it. If there are others with the same date, the agent tries to process it\n1. Depending on the quantity reserved:\n  Shipping Advice determines if the sales order should be released.\n    Partial - As long as some quantity has been reserved, it can be released\n    Complete - All sales lines and quantities must be reserved for it to be released.\n### Run the Sales Validation Agent to process sales orders\nAdd a new task to the agent.\n1. Select Search (Alt+Q) in the upper-right corner, enter Agent Tasks (preview), and then choose the related link.\n1. Under Design actions, choose Run task and create a new task for triggering the agent.\n1. Add a title, for example, `Validate and process sales orders`.\n1. And then, add the following message: `Run and process shipment date <date>`.\n That will be sufficient. `<date>` corresponds to the shipping date you chose for the sales order.\n1. Choose OK.\nThe agent goes through and process all sales orders that have a shipping date according to what you specified in the task.\n## Sales Validation Agent as an AL application\nYou can visit the BCTech repository<https://github.com/microsoft/BCTech/tree/master/samples/BCAgents/SalesValidationAgent> to see how the Sales Validation Agent can be packaged as an app. This can be used as a starter template to develop and publish your own agents.\n## Related information\nOverview (preview)<https://learn.microsoft.com/dynamics365/business-central/dev-itpro/ai/ai-development-toolkit-landing-page>\nCreate and activate (preview)<ai-development-toolkit-agent-create>\nWrite effective instructions (preview)<ai-development-toolkit-instructions>\nInstruction keywords (preview)<ai-development-toolkit-instruction-keywords>\nIntegrate with the Tasks AL API (preview)<ai-development-toolkit-tasks-api>\nAttachment capabilities and limitations (preview)<ai-development-toolkit-attachments>\nSet up permissions and profiles (preview)<ai-development-toolkit-permissions-profiles>\nRun an agent (preview)<ai-development-toolkit-run-agent>\nIterate and manage (preview)<ai-development-toolkit-iterate>\nFrequently asked questions (preview)<ai-development-toolkit-faq>\nBest practices for designing an agent (preview)<ai-development-toolkit-best-practices>\nSales Validation Agent in AL (preview)<https://github.com/microsoft/BCTech/tree/master/samples/BCAgents/SalesValidationAgent>\nTransparency note: Business Central AI development toolkit (preview)<transparency-note-ai-development-toolkit>"}