Connectors

/

Microsoft Dynamics 365 Business Central

/

Create a Dynamics 365 Business Central sales invoice
Write

Raise Business Central invoices without billing twice

For finance teams who want draft sales invoices with lines resolved and duplicates caught, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Create a Dynamics 365 Business Central sales invoice
Invoice Contoso in Business Central for 12 hours of consulting by resource JLEE and one Setup Fee item.
Draft invoice for Contoso, total 2,190.00. - Line 1: resource JLEE, 12 hours at 145.00 - Line 2: Setup Fee, 1 at 450.00 - Duplicate check: no open or recent invoice matches this total Shall I create the draft invoice?
Microsoft Dynamics 365 Business Central
Sample figures. Your results come from your own account.
No items found.

On this page

The problem

The problem

The prompt

Who it's for

How it works

Connector

Microsoft Dynamics 365 Business Central

Microsoft Dynamics 365 Business Central
Run it on your own Microsoft Dynamics 365 Business Central data.

Connect Microsoft Dynamics 365 Business Central, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

A duplicate invoice costs trust and a credit memo

Billing a customer in Business Central means checking they are not blocked, finding the right items, accounts or resources for each line and making sure the invoice was not already raised. A duplicate damages trust and takes a credit memo to undo.

Without PopdockAI

  • Check the customer is not blocked
  • Find the item, account or resource for each line
  • Search open and posted invoices for a repeat
  • Issue a credit memo when a duplicate slips out

With PopdockAI

  • The customer is checked for an invoicing block
  • Each line resolves to an item, open posting account or resource
  • Open and recent invoices with a matching reference or total are flagged
  • You preview it, then a draft is created and read back

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** Create a draft sales invoice for `{customer-name}` for `{lines}`.

Pass `{company}` as the company argument on every call. If `{company}` is empty, leave the company argument out so the connector's default company is used.

**Step 1: Resolve the customer**

Call `business-central-get-customer` with name.contains set to `{customer-name}`. If several match, list them and stop. If blocked is Invoice or All, stop and explain.

**Step 2: Resolve each line**

Each entry in `{lines}` is an item, a G/L account or a resource with a quantity and optionally a price.

* Items: `business-central-get-item` with item-number or description.contains; line-type Item.
* Services billed to an account: `business-central-get-account` with account-number or name.contains; it must be account-type Posting, not blocked, direct-posting true; line-type Account.
* Time: `business-central-get-resource` with resource-number or name.contains, not blocked; line-type Resource.

Stop and ask on no match or several matches.

**Step 3: Duplicate check**

Call `business-central-get-sales-transaction` with sell-to-customer-number and document-type Invoice, and `business-central-get-posted-sales-invoice` with sell-to-customer-number and posting-date.from 7 days ago. If one has a matching external-document-number or the same total, warn that this may be a duplicate.

**Step 4: Preview and confirm**

Show customer, invoice date, due date if the user gave one, lines (type, number, description, quantity, unit price, amount), total, and warnings. Ask for confirmation.

**Step 5: Create**

After confirmation call `business-central-create-sales-invoice` once with customer-number and bill-to-customer-number, invoice-date, and external-document-number or customer-purchase-order-reference when given. Then for each line call `business-central-create-sales-invoice-line` with document-number, line-type, number-on-line, quantity, unit-price and description where given.

**Step 6: Confirm the result**

Call `business-central-get-sales-transaction` with document-number and `business-central-get-sales-transaction-line` with document-number. Report the invoice number and total, and say it is a draft that still has to be posted in Business Central.

**Rules & Guidelines:**

* Do not call any create or update tool until the user has confirmed the exact values shown in the preview.
* Call `business-central-create-sales-invoice` exactly once.

**Validation:**

* If `{lines}` is empty, ask for them first.

Who it's for

One answer, three teams that use it

Billing specialists

Raise invoices without the lookups

Describe the lines in plain words and get a draft invoice with the right items, accounts and resources.

Invoice Northwind Traders in Business Central for 8 hours of training by resource PSHAH and one Travel Fee item.

Accounts receivable

Catch duplicate billing before it goes out

Open and recently posted invoices with the same reference or total are flagged before anything is created.

Create a Business Central invoice for Fabrikam, reference PO-7781, 1 Annual Support item, and check we have not billed it already.

Services managers

Bill resource time straight away

Bill consulting or service hours as soon as the work is done, without waiting for someone in finance.

Bill Contoso for 20 hours of resource JLEE in Business Central as a draft invoice.

How it works

What PopdockAI does when you ask

You name the customer and the lines and your AI assistant resolves each one in Business Central and looks for duplicates. Nothing is created until you approve, and it stays a draft for posting.

01

Ask

You name the customer and the lines.

Your AI tool

02

Check

It confirms the customer is not blocked and resolves items, accounts or resources.

No items found.

03

Confirm

It flags possible duplicate invoices and you preview and approve.

No items found.

04

Create

It creates the draft invoice once and reads back its number and total.

Your AI tool

The outcome

Draft invoices raised right, never twice

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

One prompt template with infinite possibilities.

‍

Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.

Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

Try PopdockAI Free
See Documentation