Connectors

/

Microsoft Dynamics 365 Business Central

/

Create a Dynamics 365 Business Central sales order from a Shopify order
Write
Cross-Connector

Enter Shopify orders in Business Central once, every line mapped

For operations teams who want web orders in Business Central without retyping or duplicates, by asking their AI assistant.

Try PopdockAI free
Get a live demo
Create a Dynamics 365 Business Central sales order from a Shopify order
Enter Shopify order #1042 in Business Central as a sales order.
Shopify order #1042 is not in Business Central yet; customer Priya Shah matched by email. - Lines: 3 of 3 mapped by SKU - Discount: 10 percent code applied to each line - Total: 312.30, matches Shopify Shall I create the sales order?
Microsoft Dynamics 365 Business Central
Sample figures. Your results come from your own account.
shopify-get-order
shopify-get-order-line
shopify-get-product-variant

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

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

One wrong SKU or a second entry means shipping errors

Keying a Shopify order into Business Central means checking it was not entered already, finding the customer, mapping every line to an item and working out discounts. One wrong SKU or a second entry brings shipping errors and a messy credit.

Without PopdockAI

  • Search Business Central for the Shopify reference
  • Find the customer by email
  • Map each line to an item by SKU by hand
  • Work out discounts and hope the total matches

With PopdockAI

  • Canceled or already entered orders stop the job
  • The customer is matched by email and blocked accounts refused
  • Every line maps to an unblocked item by SKU or barcode, no partial orders
  • After you confirm, the order is checked against the Shopify total

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 sales order in Business Central for Shopify order `{order-name}`, with one item line per Shopify order line, using Business Central customer `{customer-number}` if given or else the customer whose email matches the order. Nothing is written until the user confirms the plan.

**Step 1: Read the Shopify order**

Call `shopify-get-order` with `name` set to `{order-name}`. If more than one or none comes back, report it and stop. If `cancelled-at` is set, report that the order is cancelled and stop. Keep `order-id`, `name`, `created-at`, `email`, `currency` and `total-price`.

Call `shopify-get-order-line` with `order-id` for `sku`, `title`, `quantity`, `price` and `total-discount`.

**Step 2: Make sure it is not already in Business Central**

Call `business-central-get-sales-transaction` and `business-central-get-posted-sales-invoice`, each with `external-document-number` set to the Shopify `name`. If either returns a record, report the existing document number and stop. Do not create a duplicate.

**Step 3: Resolve the customer**

If `{customer-number}` is given, call `business-central-get-customer` with `customer-number` set to it. Otherwise call `business-central-get-customer` with `email` set to the order's email. If no customer or more than one is found, report it and stop; ask the user for a customer number. If the customer is `blocked`, report it and stop.

**Step 4: Map every line to an item**

For each Shopify line, call `business-central-get-item` with `item-number` set to the line's `sku`. If nothing comes back, call `shopify-get-product-variant` with `sku` to get its `barcode`, then `business-central-get-item` with `gtin` set to that barcode. If any line cannot be mapped to exactly one unblocked item, list the unmapped lines and stop. Never create a partial order.

**Step 5: Show the plan and wait**

Show: the Business Central customer number and name, the external document number (the Shopify `name`), the order date (the date part of `created-at`), and a table of lines with item number, description, quantity, unit price (the Shopify `price`) and discount percent (the line's `total-discount` divided by quantity times price, times 100, rounded to 2 decimals). Show the Shopify total beside the sum of the planned lines, and say that shipping and taxes are not added as lines.

Ask the user to confirm. Stop here until they explicitly say yes.

**Step 6: Create**

1. Call `business-central-create-sales-order` with `customer-number` and `bill-to-customer-number` both set to the customer number, `external-document-number` set to the Shopify `name`, and `order-date` set to the order date. Leave `currency-code` empty unless the user says the order currency differs from the company's local currency. Keep the returned `number`.
2. For each line, call `business-central-create-sales-order-line` with `document-number` set to that number, `line-type` Item, `number-on-line` set to the item number, `quantity`, `unit-price` and `discount-percent`.

If a line fails, stop, report which lines were created and which failed, and do not retry or delete anything.

**Step 7: Confirm**

Call `business-central-get-sales-transaction-line` with `document-number` set to the new order number. Report the order number, each line as stored, and the order total against the Shopify total.

**Rules & Guidelines:**

* `shopify-get-order`, `shopify-get-order-line` and `shopify-get-product-variant` are on the shopify server and are only read. `business-central-get-sales-transaction`, `business-central-get-posted-sales-invoice`, `business-central-get-customer`, `business-central-get-item`, `business-central-get-sales-transaction-line`, `business-central-create-sales-order` and `business-central-create-sales-order-line` are on the business-central server.
* The only write tools this prompt may call are `business-central-create-sales-order` (once) and `business-central-create-sales-order-line` (once per line), and only after the user confirms in Step 5.
* Do NOT call `business-central-create-customer`, `business-central-create-item`, `business-central-update-sales-order`, `shopify-update-order` or any other create, add or update tool.
* If the user names a Business Central company, pass it as `company` on every Business Central call.

**Validation:**

* If the order has no lines, report it and stop.
* If the planned line total differs from the Shopify `total-price` by more than shipping and tax explain, point out the difference in the plan before asking for confirmation.

Who it's for

One answer, three teams that use it

Ecommerce managers

Get web orders into the ERP accurately

Each Shopify order arrives in Business Central complete, with discounts and totals checked.

Enter Shopify order #2087 in Business Central as a sales order.

Order processing

Never enter the same order twice

Orders already entered under the Shopify reference are stopped, so there is nothing to unwind later.

Check whether Shopify order #1990 is already in Business Central, and enter it if not.

Warehouse leads

Ship the right items every time

Lines map by SKU or barcode to unblocked items, so picks match what the customer bought.

Create the Business Central sales order for Shopify order #2101 for customer C00450.

How it works

What PopdockAI does when you ask

You give the Shopify order and your AI assistant checks for a duplicate, matches the customer and maps every line. Nothing is written until you confirm, and Shopify is never changed.

01

Ask

You give the Shopify order, and optionally a customer number.

Your AI tool

02

Check

It stops on canceled or already entered orders and matches the customer by email.

shopify-get-order

03

Map

Every line is mapped to an unblocked item by SKU or barcode, no partial orders.

shopify-get-order-line
shopify-get-product-variant

04

Create

After you confirm, it creates the order and checks it against the Shopify total.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for Microsoft Dynamics 365 Business Central and one secure connection to your AI tool. No code, no exports.

get-data

shopify-get-order

Returns Shopify orders with their financial status, fulfillment status and total. Filter by order number or name, customer, email, financial status, fulfillment status, created date and total price.
get-data

shopify-get-order-line

Returns the line items on Shopify orders with their price, quantity and fulfillment status. Filter by order, product, SKU, title, vendor, price and quantity.
get-data

shopify-get-product-variant

Returns Shopify product variants with their SKU, barcode, price, inventory quantity and inventory policy. Filter by product, variant, SKU, barcode, title, price and inventory quantity.
Read only.Nothing in Microsoft Dynamics 365 Business Central Changes

This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.

How Popdock AI secures your data

The outcome

Web orders entered once, every line mapped

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