---
id: post/aardvarklabs-blog/1816
type: post
title: Creating Data Driven Text with AI in Business Central
summary: This post shows how to build a Copilot in Business Central that generates personalized reminder text for overdue customer balances by combining user input with customer data from the database. It demonstrates passing customer name, balance due, last invoice date, and tone to an AI model to create natural-sounding collection letters.
tier: community
language: en
tags:
  - copilot
  - ai integration
  - azure openai
  - customer reminders
  - al development
  - prompt engineering
  - data-driven content
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:00:49.614Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 079f34123d90c789275e5d7b32651ffe34966c4de67dd626c94701cf4dce23d5
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2025/05/30/creating-data-driven-text-with-ai-in-business-central/
    title: Creating Data Driven Text with AI in Business Central
    date: "2025-05-30"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2025/05/30/creating-data-driven-text-with-ai-in-business-central/
    title: Creating Data Driven Text with AI in Business Central
    date: "2025-05-30"
    commit: null
    t: null
    quote: We are going to create a Copilot that generates reminder text for overdue balances.
  - kind: blog
    url: https://aardvarklabs.blog/2025/05/30/creating-data-driven-text-with-ai-in-business-central/
    title: Creating Data Driven Text with AI in Business Central
    date: "2025-05-30"
    commit: null
    t: null
    quote: Temperature is a value from 0.0 to 2.0 defining how creative we want to allow the GPT system to be.
links:
  learn: []
  objects:
    - object/codeunit/7771
    - object/codeunit/7770
    - object/codeunit/7761
    - object/codeunit/7763
    - object/codeunit/7768
    - object/codeunit/457
    - object/table/18
    - object/table/21
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "1816"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2025/05/30/creating-data-driven-text-with-ai-in-business-central/
published_at: "2025-05-30T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 1344
quotes:
  - text: We are going to create a Copilot that generates reminder text for overdue balances.
    why_it_matters: Defines the specific use case that demonstrates how to combine BC data with AI for business automation
  - text: Temperature is a value from 0.0 to 2.0 defining how creative we want to allow the GPT system to be.
    why_it_matters: Explains a key parameter for controlling AI output characteristics based on business requirements
code_objects_mentioned:
  - codeunit ARD_CopilotReminderGenerator
  - codeunit Azure OpenAI
  - codeunit AOAI Operation Response
  - codeunit AOAI Chat Completion Params
  - codeunit AOAI Chat Messages
  - codeunit AOAI Deployments
  - codeunit ARD_IsolatedStorageWrapper
  - codeunit Environment Information
  - table Customer
  - table Cust. Ledger Entry
  - page ARDReminderPrompt
systems:
  - copilot
  - sales
  - integration
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2025/05/30/creating-data-driven-text-with-ai-in-business-central/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2025/05/ec11e549-36a6-4da0-aa62-391fdd5edd37.jpeg
  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:04.270Z"
---

# Creating Data Driven Text with AI in Business Central

[Read the post](https://aardvarklabs.blog/2025/05/30/creating-data-driven-text-with-ai-in-business-central/) · Aardvark Labs (Marcel Chabot) · 2025-05-30 · 1344 words · tier community · reviewed (checked by Opus)

> This post shows how to build a Copilot in Business Central that generates personalized reminder text for overdue customer balances by combining user input with customer data from the database. It demonstrates passing customer name, balance due, last invoice date, and tone to an AI model to create natural-sounding collection letters.

## Key points

- Create a new Copilot codeunit that accepts customer data as parameters alongside user input to build dynamic prompts
- Use TextBuilder to combine customer information (name, balance due, invoice date, tone) into a structured user prompt sent to Azure OpenAI
- Configure AI temperature setting (0.7 in this example) to control how creative the model's output should be
- Retrieve customer and ledger entry data from Business Central tables to feed into the AI prompt
- Add a button to the Customer Card to trigger the reminder generation process with a modal page for user input

## Quotes

- "We are going to create a Copilot that generates reminder text for overdue balances." (Defines the specific use case that demonstrates how to combine BC data with AI for business automation)
- "Temperature is a value from 0.0 to 2.0 defining how creative we want to allow the GPT system to be." (Explains a key parameter for controlling AI output characteristics based on business requirements)

## 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_CopilotReminderGenerator"
- [codeunit 7771 "Azure OpenAI"](../../objects/codeunit/7771.md)
- [codeunit 7770 "AOAI Operation Response"](../../objects/codeunit/7770.md)
- [codeunit 7761 "AOAI Chat Completion Params"](../../objects/codeunit/7761.md)
- [codeunit 7763 "AOAI Chat Messages"](../../objects/codeunit/7763.md)
- [codeunit 7768 "AOAI Deployments"](../../objects/codeunit/7768.md)
- codeunit "ARD_IsolatedStorageWrapper"
- [codeunit 457 "Environment Information"](../../objects/codeunit/457.md)
- [table 18 "Customer"](../../objects/table/18.md)
- [table 21 "Cust. Ledger Entry"](../../objects/table/21.md)
- page "ARDReminderPrompt"

Not found in BC28-30: codeunit "ARD_CopilotReminderGenerator", codeunit "ARD_IsolatedStorageWrapper", page "ARDReminderPrompt".

## Context

- Features: Copilot prompt engineering with dynamic data, Azure OpenAI Chat Completion integration, Customer data lookup and filtering, Temperature control for AI creativity, User prompt builder with multiple parameters, Customer Card action for reminder generation, Modal page for user input and tone selection

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