Robust X++ class skeleton - AI Custom API
Robust X++ class skeleton - AI Custom API This template demonstrates how to structure the class, define the input parameters (Data Contract), and implement the logic required for the invoke_action tool to function. X++ Developer Starter Kit: AI Custom API This example assumes you are building a tool to "Check Inventory Stock" directly via code. 1. The Data Contract (The Input) First, define what information the AI Agent needs to send you. This uses standard D365 F&O Data Contracts. [DataContract] public class MyInventoryCheckContract { str itemId; str siteId; [DataMember("ItemId"), SysOperationLabel("Item ID"), SysOperationHelpText("The identifier for the product to check.")] public str parmItemId(str _itemId = itemId) { itemId = _itemId; return itemId; ...