---
id: post/aardvarklabs-blog/2965
type: post
title: Step-by-Step Guide to AI Campaigns in Business Central
summary: A practical guide to building AI-powered marketing campaigns in Business Central using two coordinated AI agents. The system generates regional postal codes based on natural language prompts and automatically adds free samples to sales orders shipping to targeted regions, minimizing AI costs by preprocessing data rather than running AI logic on every transaction.
tier: community
language: en
tags:
  - ai agents
  - prompt management
  - grounded search
  - marketing automation
  - sales orders
  - cost optimization
system: copilot
review:
  state: reviewed
  by: opus
  at: "2026-10-08T01:57:13.678Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 79d0a1240cad2b7be318d4c1e54cedf833015ff6d1c30d915026f4fe54203155
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2026/01/23/step-by-step-guide-to-ai-campaigns-in-business-central/
    title: Step-by-Step Guide to AI Campaigns in Business Central
    date: "2026-01-23"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://aardvarklabs.blog/2026/01/23/step-by-step-guide-to-ai-campaigns-in-business-central/
    title: Step-by-Step Guide to AI Campaigns in Business Central
    date: "2026-01-23"
    commit: null
    t: null
    quote: The core to any AI system is prompt management. In this case we have to manage the interaction between two prompts.
  - kind: blog
    url: https://aardvarklabs.blog/2026/01/23/step-by-step-guide-to-ai-campaigns-in-business-central/
    title: Step-by-Step Guide to AI Campaigns in Business Central
    date: "2026-01-23"
    commit: null
    t: null
    quote: This system trades a tiny bit of BC storage for a huge AI savings and performance handling.
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "2965"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2026/01/23/step-by-step-guide-to-ai-campaigns-in-business-central/
published_at: "2026-01-23T13:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 1229
quotes:
  - text: The core to any AI system is prompt management. In this case we have to manage the interaction between two prompts.
    why_it_matters: Emphasizes that coordinating multiple AI agents requires careful prompt tuning for each to work effectively together
  - text: This system trades a tiny bit of BC storage for a huge AI savings and performance handling.
    why_it_matters: Explains the tradeoff strategy that makes the solution practical and cost-effective for high-volume operations
code_objects_mentioned:
  - page AI Campaign (custom)
systems:
  - copilot
  - sales
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2026/01/23/step-by-step-guide-to-ai-campaigns-in-business-central/embed/
  image: https://aardvarklabs.blog/wp-content/uploads/2026/01/28dc2267-28f1-4deb-b7df-57c87d3ec9bf.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:51:07.314Z"
---

# Step-by-Step Guide to AI Campaigns in Business Central

[Read the post](https://aardvarklabs.blog/2026/01/23/step-by-step-guide-to-ai-campaigns-in-business-central/) · Aardvark Labs (Marcel Chabot) · 2026-01-23 · 1229 words · tier community · reviewed (checked by Opus)

> A practical guide to building AI-powered marketing campaigns in Business Central using two coordinated AI agents. The system generates regional postal codes based on natural language prompts and automatically adds free samples to sales orders shipping to targeted regions, minimizing AI costs by preprocessing data rather than running AI logic on every transaction.

## Key points

- Uses two sequential AI agents: one for grounded search to find postal codes from natural language scenarios, another to extract postal codes into JSON format
- Leverages Business Central's managed AI resource with Bing Grounded Search for accessing current event data that public OpenAI cannot reach
- Saves AI costs and improves performance by running AI only during campaign creation, then using native AL code for order processing
- Implements campaign logic via OnBeforeReleaseSalesDoc event to check shipping addresses against stored postal codes and add promotional items

## Quotes

- "The core to any AI system is prompt management. In this case we have to manage the interaction between two prompts." (Emphasizes that coordinating multiple AI agents requires careful prompt tuning for each to work effectively together)
- "This system trades a tiny bit of BC storage for a huge AI savings and performance handling." (Explains the tradeoff strategy that makes the solution practical and cost-effective for high-volume operations)

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

- page "AI Campaign (custom)"

Not found in BC28-30: page "AI Campaign (custom)".

## Context

- Features: AI agents for regional data lookup, Managed AI resource with Bing Grounded Search, Copilot prompting system, JSON data extraction from AI responses, OnBeforeReleaseSalesDoc event handling, Natural language campaign generation

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