Edit

Share via


Create a Sales Validation Agent (preview)

[This article is prerelease documentation and is subject to change.]

Important

  • This is a preview feature.

  • Preview features aren't meant for production use and might have restricted functionality. These features are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.

  • This article is primarily intended for product owners, domain experts, consultants, and developers who want to experiment with AI capabilities in Business Central using the Agent playground.

The Sales Validation Agent is a preconfigured playground 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.

Steps to create and use the Sales Validation Agent

Follow these steps to create and use the Sales Validation Agent, which is available with the Agent playground.

Create the Sales Validation Agent

First, create the Sales Validation Agent using the Agent playground capability.

  1. In the navigation bar at the upper right of the role center, select Playground agent create new Agent > Create.
  2. In the Create agent wizard, choose Sales Validation, and then choose the Create agent button.
  3. In the Configure agent dialog, activate the agent.
  4. Choose Update to save and close the agent setup dialog.

Now, the agent has been created and activated.

Add an item with inventory to be used in sales orders

Next, add an item with inventory that the Sales Validation Agent can use to validate sales orders.

  1. Select Search (Alt+Q) in the upper-right corner, enter Items, and then choose the related link.
  2. Open the Item Card for the item you'll add to the sales order, which you'll create in the next section.
  3. In the Inventory section, use the AssistEdit AssistEdit icon button on the Inventory field.
  4. On the Adjust Inventory page, add quantity to the New Inventory field for a location that isn't Unspecified.
  5. Press OK.

Create and process a sales order using the Sales Validation Agent

  1. Select Search (Alt+Q) in the upper-right corner, enter Sales Orders, and then choose the related link.
  2. On the Sales Orders list page, create a new sales order.
  3. Choose any customer.
  4. Add one or more new sales lines, with the item from the previous step.
  5. Add quantity to one or more lines. Ensure that the Location is the same location you added quantity for.
  6. For that sales line, under Line > Functions, choose Reserve.
  7. There should be quantity available for reservation from Item Ledger Entry, select it, and choose Reserve from Current Line. Then, choose OK.
  8. 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
  9. Depending on the quantity reserved:
  • Shipping Advice determines if the sales order should be released.
    • Partial - As long as some quantity has been reserved, it can be released
    • Complete - All sales lines and quantities must be reserved for it to be released.

Run the Sales Validation Agent to process sales orders

Add a new task to the agent Open the Agents (Preview)

  1. Select Search (Alt+Q) in the upper-right corner, enter Agent Tasks (preview), and then choose the related link.
  2. Under Playground actions, choose Create task.
  3. Add a title, for example, Validate and process sales orders.
  4. And then, add the following message: Run and process shipment date <date>.
    That will be sufficient. <date> corresponds to the shipping date you chose for the sales order.
  5. Choose OK.

The agent goes through and process all sales orders that have a shipping date according to what you specified in the task.

Overview (preview)
Create and activate (preview)
Write effective instructions (preview)
Instruction keywords (preview)
Integrate with the Tasks AL API (preview)
Set up permissions and profiles (preview)
Run a playground agent (preview)
Iterate and manage (preview)
Best practices (preview)
Transparency note: Business Central agent playground