---
id: post/demiliani-com/14203
type: post
title: Why your Business Central job queue needs idempotent external effects when integrating external systems.
summary: Job queue entries that call external APIs risk duplicating actions when AL transactions roll back after an external call succeeds. Use the outbox row's SystemId as a stable idempotency key that the external system enforces to prevent duplicate exports, payments, or shipments on retry.
tier: community
language: en
tags:
  - job queue
  - external api
  - idempotency
  - transaction handling
  - outbox pattern
  - error handling
  - http client
system: integration
review:
  state: reviewed
  by: opus
  at: "2026-10-07T23:46:54.040Z"
  flags: []
generated:
  at: "2026-10-07T22:42:12.892Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: c4cbd36021e184ce007386960bd926812cea9dc0cc4bc8e3a590bab937723ddf
evidence:
  - kind: blog
    url: https://demiliani.com/2026/09/01/why-your-business-central-job-queue-needs-idempotent-external-effects-when-integrating-external-systems/
    title: Why your Business Central job queue needs idempotent external effects when integrating external systems.
    date: "2026-09-01"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "14203"
source_id: demiliani-com
source_name: Stefano Demiliani
url: https://demiliani.com/2026/09/01/why-your-business-central-job-queue-needs-idempotent-external-effects-when-integrating-external-systems/
published_at: "2026-09-01T08:34:56.000Z"
author: Stefano Demiliani
full_text: false
words: 1379
quotes: []
code_objects_mentioned:
  - table Queued Export Bad
  - codeunit Queued Export Worker Bad
  - table Queued Export Good
  - codeunit Queued Export Worker Good
systems:
  - integration
  - administration
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://demiliani.com/2026/09/01/why-your-business-central-job-queue-needs-idempotent-external-effects-when-integrating-external-systems/embed/
  image: https://i0.wp.com/demiliani.com/wp-content/uploads/2026/09/jobqueueidempotent.jpg?fit=1200%2C807&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 807
  site_name: Stefano Demiliani
  favicon: https://demiliani.com/wp-content/uploads/2022/09/sd_wordpress_logo.png?w=32
  probed_at: "2026-10-07T11:50:13.234Z"
---

# Why your Business Central job queue needs idempotent external effects when integrating external systems.

[Read the post](https://demiliani.com/2026/09/01/why-your-business-central-job-queue-needs-idempotent-external-effects-when-integrating-external-systems/) · Stefano Demiliani (Stefano Demiliani, MVP) · 2026-09-01 · 1379 words · tier community · reviewed (checked by Opus)

> Job queue entries that call external APIs risk duplicating actions when AL transactions roll back after an external call succeeds. Use the outbox row's SystemId as a stable idempotency key that the external system enforces to prevent duplicate exports, payments, or shipments on retry.

## Key points

- AL transaction rollback does not undo external API calls, creating a gap between database state and real-world side effects.
- The anti-pattern is calling external APIs before updating local records; if the local update fails, the row retries and sends the same request again.
- External systems must deduplicate requests using a stable idempotency key (like the outbox row's SystemId) that exists before the API call.
- Delete operations require treating certain response codes (like 404) as success and deleting the local row only after the external call confirms completion.
- Idempotency must be enforced by the external API itself; a local flag set after the call rolls back with everything else on failure.

## 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 "Queued Export Bad"
- codeunit "Queued Export Worker Bad"
- table "Queued Export Good"
- codeunit "Queued Export Worker Good"

Not found in BC28-30: table "Queued Export Bad", codeunit "Queued Export Worker Bad", table "Queued Export Good", codeunit "Queued Export Worker Good".

## Context

- Features: job queue retry, HTTP client, idempotency key, transaction rollback, outbox table, SystemId, external system integration

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