Implementing a Multi-Step Process for AI Recommendations in Business Central
This post demonstrates how to build a multi-step AI-assisted process in Business Central that generates product recommendations from sales order line descriptions. The process uses AI to identify keywords from sales line data, then searches the item catalog to recommend relevant products for users to add to their orders.

post Aardvark Labs
"The AI Agent doesn't have to provide the entire answer. In this case it digested data that we could use in our process."
Key points
- AI can play a supporting role in a multi-step process rather than providing complete answers
- The implementation collects sales line descriptions and passes them to an AI agent to extract keywords
- Keywords are used with Full Text Search (release 25.2) to find matching items in the catalog
- Users can select recommended items which are then automatically added as new sales lines
- Tracking token count by character length helps manage AI costs and improves result quality
Quotes
- “The AI Agent doesn’t have to provide the entire answer. In this case it digested data that we could use in our process.” (This insight explains that AI should be designed as part of a workflow, not as a standalone solution, enabling better integration with existing business processes.)
- “On line 18 we use the Full Text Search functions of Business Central that were introduced in release 25.2.” (Highlights the use of Business Central’s native Full Text Search capability to find items matching AI-generated keywords, avoiding the need to share entire catalogs with third parties.)
- “Because these are going into the user prompt, and ever 4-ish characters is a token and tokens cost money.” (Demonstrates practical cost optimization by limiting description input to 10,000 characters, showing awareness of AI token economics in production implementations.)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- table “ARD_CopilotItemRecommendations”
- page “ARD_ItemRecomendations”
- codeunit “ARD_CopilotItemRecommendations”
- page “ARD_ItemRecommendationPrompt”
- table 37 “Sales Line”
Not found in BC28-30: table “ARD_CopilotItemRecommendations”, page “ARD_ItemRecomendations”, codeunit “ARD_CopilotItemRecommendations”, page “ARD_ItemRecommendationPrompt”.
Context
- Features: AI-powered item recommendations, Full Text Search, JSON processing, Sales order line analysis, Temporary table management, Multi-step process design, Keyword extraction, Item selection and insertion
- Versions: 25.2
Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.