Skip to main content
Dynamics 365

Get started with developing generative AI features for Dynamics 365 Business Central 

In this blog post, we will show you how to get started on your journey with generative AI for Microsoft Dynamics 365 Business Central. Microsoft’s unique partnership with OpenAI allows us to bring the innovative power of large-scale language models (LLM) to the Business Central ecosystem in a unique, complete, and responsible way. Microsoft Azure OpenAI Service provides access to OpenAI’s advanced models such as GPT-4, GPT-3, Codex, and DALL-E with the security and enterprise features of Azure. 

Over the last few months, we’ve listened to many community ideas on how generative AI can enrich existing features, or deliver entirely new customer value, and the follow-up question is always the same: how do I get started with AI in AL and Visual Studio Code? We’ve collected a few tips, including sample code, to make it easy for you to start exploring Azure OpenAI and share your learnings with the community. 

New to generative AI? 

We appreciate that there is much to learn about this new and exciting technology. If you’re new to this branch of machine learning and Azure OpenAI, these links are a great introduction to understand the basics. 

How to get started with your AL code 

We’ve shared some sample code as an extension that enables you to explore the possibilities of LLM. This code is designed to simplify the process of setting up and running LLM experiments, starting with easily configuring and testing your connection to the Azure OpenAI service. After that, you can extend your AL logic to do more exciting things with this code. 


The sample code uses Azure OpenAI to suggest an item category based on the item description field. 

The extension’s source code is available at the Business Central BCTech repository on GitHub. You can get to it directly at You can either download or install the sample extension to your sandbox environment or clone the source code for your own projects. 

How to get an Azure OpenAI key 

To use Azure OpenAI Service, you need to have an Azure subscription and apply for access to the service. Azure OpenAI is generally available with a limited access policy to promote responsible use and limit the impact of high-risk use cases. Once you apply and are approved, you will receive an email with instructions on how to create an Azure OpenAI resource and get your API key. 

How to use the Azure OpenAI playground 

Azure AI Studio offers an Azure OpenAI playground: a web-based interface that allows you to explore the capabilities of generative AI models and try them out with your own prompts and data. You can access the playground from the Azure portal or from this link: Azure OpenAI Studio

If you’re not a developer but have played around with ChatGPT or similar, you will find the playground to be a convenient place to experiment and assess whether ChatGPT is a suitable tool to solve the problem at hand. It’s perfect for product managers, designers and consultants looking to get their feet wet without having to write code or without having to build a deep understanding of the underlying technology. 

And if you’re ready to dive into the more technical side of things, the playground lets you choose a model, a scenario, and a few shot learning examples to generate outputs. You can also modify the parameters such as temperature, top-p, frequency penalty, and presence penalty to control the randomness and diversity of the outputs.  

How to get started with prompt engineering 

Prompt engineering is the art of crafting effective inputs for generative models to produce desired outputs. Prompt engineering involves understanding the model’s capabilities and limitations, choosing the right format and tone for the input, providing relevant examples and instructions, and evaluating the output quality and reliability. Prompt engineering is a crucial skill for using Azure OpenAI Service effectively and responsibly. Here are some short links that can help you learn more about prompt engineering: 

Join the conversation  

While Microsoft is hard at work bringing more generative AI to Business Central, we hope that these simple tips will get you started on your AI journey with Azure OpenAI. The product team is eager to hear your feedback on how we can support your use cases and help you design, build, and deliver AI solutions quickly and responsibly in the AI era: community partners are invited to join us at the Copilot and AI Innovation group on our Yammer partner community network. And if you’re looking for inspiration on how to enrich your features with generative AI, check out our 30 minute video where we present the details around our first generative AI feature in Business Central: Marketing Text Suggestions. 

Happy experimenting!