---
id: post/aardvarklabs-blog/1609
type: post
title: "Integrating AI in Business Central: A Step-by-Step Guide"
summary: Step-by-step guide to building a custom AI-powered Copilot agent in Business Central that automates customer address extraction from unstructured text using Azure OpenAI. Covers Azure setup, AL code development including isolated storage for secrets, prompt engineering with system and user prompts, and integration with the Customer card.
tier: community
language: en
tags:
  - ai integration
  - copilot agents
  - azure openai
  - al development
  - isolated storage
  - prompt engineering
  - customer management
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:01:14.577Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 3f24d067d2c978aaddb44bfa975d06e0f32c71a49e5bcd48ff4f220aa73831df
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2025/04/18/integrating-ai-in-business-central-a-step-by-step-guide/
    title: "Integrating AI in Business Central: A Step-by-Step Guide"
    date: "2025-04-18"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2025/04/18/integrating-ai-in-business-central-a-step-by-step-guide/
    title: "Integrating AI in Business Central: A Step-by-Step Guide"
    date: "2025-04-18"
    commit: null
    t: null
    quote: Business Central has something called Isolated Storage. This is storage that is only accessible to the extension that created it.
  - kind: blog
    url: https://aardvarklabs.blog/2025/04/18/integrating-ai-in-business-central-a-step-by-step-guide/
    title: "Integrating AI in Business Central: A Step-by-Step Guide"
    date: "2025-04-18"
    commit: null
    t: null
    quote: If we wanted to describe something, we would use a higher number to allow for more creative expressions. The max value is 2.
links:
  learn: []
  objects:
    - object/page/21
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "1609"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2025/04/18/integrating-ai-in-business-central-a-step-by-step-guide/
published_at: "2025-04-18T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 2686
quotes:
  - text: Business Central has something called Isolated Storage. This is storage that is only accessible to the extension that created it.
    why_it_matters: Explains the recommended secure storage mechanism for secrets and authentication credentials in Business Central extensions
  - text: If we wanted to describe something, we would use a higher number to allow for more creative expressions. The max value is 2.
    why_it_matters: Clarifies how temperature parameter controls AI creativity and determinism, essential for tuning response quality
code_objects_mentioned:
  - codeunit ARD_IsolatedStorageWrapper
  - page ARD_CopilotSettings
  - enum Copilot Capability
  - codeunit ARD_CopilotSetup
  - codeunit ARD_CopilotJob
  - page ARD_AddressPrompt
  - page Customer Card
systems:
  - copilot
  - integration
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2025/04/18/integrating-ai-in-business-central-a-step-by-step-guide/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2025/04/5b568f80-a2ad-4ece-83d5-769d3c501381.jpg
  image_alt: null
  image_w: 1024
  image_h: 1024
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:52:12.144Z"
---

# Integrating AI in Business Central: A Step-by-Step Guide

[Read the post](https://aardvarklabs.blog/2025/04/18/integrating-ai-in-business-central-a-step-by-step-guide/) · Aardvark Labs (Marcel Chabot) · 2025-04-18 · 2686 words · tier community · reviewed (checked by Opus)

> Step-by-step guide to building a custom AI-powered Copilot agent in Business Central that automates customer address extraction from unstructured text using Azure OpenAI. Covers Azure setup, AL code development including isolated storage for secrets, prompt engineering with system and user prompts, and integration with the Customer card.

## Key points

- Azure OpenAI resources and credentials (endpoint, deployment, API key) must be securely stored in Isolated Storage to protect sensitive authentication data
- Copilot capabilities must be registered during extension installation and added to the Copilot & agent capabilities management page
- System prompts define AI behavior and expected output format (JSON recommended), while user prompts provide the actual data to process
- Chat completion parameters like max tokens, temperature (0 for deterministic results), and JSON mode control response quality and cost
- Retry logic with up to 5 attempts handles cases where the AI may not respond successfully on the first try

## Quotes

- "Business Central has something called Isolated Storage. This is storage that is only accessible to the extension that created it." (Explains the recommended secure storage mechanism for secrets and authentication credentials in Business Central extensions)
- "If we wanted to describe something, we would use a higher number to allow for more creative expressions. The max value is 2." (Clarifies how temperature parameter controls AI creativity and determinism, essential for tuning response quality)

## 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.

- codeunit "ARD_IsolatedStorageWrapper"
- page "ARD_CopilotSettings"
- enum "Copilot Capability"
- codeunit "ARD_CopilotSetup"
- codeunit "ARD_CopilotJob"
- page "ARD_AddressPrompt"
- [page 21 "Customer Card"](../../objects/page/21.md)

Not found in BC28-30: codeunit "ARD_IsolatedStorageWrapper", page "ARD_CopilotSettings", enum "Copilot Capability", codeunit "ARD_CopilotSetup", codeunit "ARD_CopilotJob", page "ARD_AddressPrompt".

## Context

- Features: Azure OpenAI integration, Copilot capability registration, Isolated storage for secrets management, Chat completion with JSON responses, Prompt dialog page type, Custom Copilot agents, Address extraction automation

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
