Import Fulfilled Shopify Orders
Overview
Fulfillment import allows you to import already-fulfilled orders from Shopify directly as Sales Invoices in Business Central. This is useful when orders are fulfilled in Shopify first, and you want to record them in Business Central as completed shipments.
Key differences from Order import:
-
Orders = Import unfulfilled orders as Sales Orders
-
Fulfillments = Import fulfilled orders as Sales Invoices
Prerequisites
Before importing fulfillments:
-
Complete basic Shopify Setup (API Url, API Token, Logging Mode)
-
Configure Customer settings (Guest Customer or New Customer registration)
-
Set Default Shopify Location
-
Optionally configure Item Template Code and Default Item No. for automatic item creation
Configuration
Task 1: Enable Fulfillment Import
-
Choose the 🔎 icon, enter Shopify Setup, and then choose the related link.
-
On the Sales Order fastTab:
-
Set Import Orders = Fulfillments
-
Optionally set Import Orders From DT = date/time to start importing from (e.g., 2025-01-01 00:00:00 to ignore older fulfillments)
-
Set Default Shopify Location = location code to use for imported invoices

-
-
Press OK to save settings.
Task 2: Test Fulfillment Import
-
Press Import New Documents button.
-
Press Yes to confirm.
-
System will:
-
Query Shopify for fulfilled orders
-
Skip orders already imported (checks JML Shopify Document ID field)
-
Create Sales Invoice for each new fulfillment
-
Import line items with quantities, prices, and discounts
-
Create or link customers
-
Create items if they don't exist (uses Item Template)
-
Optionally post invoices immediately
-
-
Check imported invoices:
- Choose the 🔎 icon, enter Sales Invoices, and filter by JML Shopify = Yes
How Fulfillment Import Works
Fulfillment Detection
System imports fulfillments where:
-
Order has
fulfillment_status=fulfilledorpartial -
Fulfillment has
status=success -
Fulfillment was created after Import Orders From DT date
-
Fulfillment ID does not exist in Business Central
Document Creation
For each fulfillment:
-
Sales Invoice Header created with:
-
Order Date and Posting Date = Fulfillment created date
-
External Document No. = Shopify Order Name (e.g., "#1001")
-
JML Shopify Document ID = Shopify Fulfillment GID
-
JML Shopify = Yes (marks as Shopify document)
-
Shipping Agent Code = Tracking company from fulfillment
-
Package Tracking No. = Tracking number from fulfillment
-
-
Sales Invoice Lines created with:
-
Only items that were included in this specific fulfillment
-
Quantities from
fulfillment_line_item.quantity -
Prices and discounts from original order line items
-
-
Customer created or linked:
-
Searches by email address
-
Creates new customer if Register New Customers = Yes
-
Uses Guest Customer No. if Register New Customers = No
-
-
Items created or linked:
-
Searches by SKU (Item No. or Item Variant)
-
Searches Item Reference table
-
Creates new item using Item Template Code if not found
-
Uses Default Item No. as fallback
-
Manual Posting
After fulfillments are imported as Sales Invoices, you need to manually post them in Business Central:
-
Open the Sales Invoice
-
Review the lines and verify all information
-
Press Post to create Posted Sales Invoice
-
Any posting errors will be displayed for correction
Common Issues
Problem: Duplicate invoices created
Solution: Check that JML Shopify Document ID field is correctly populated on Sales Invoices. System uses this field to prevent duplicates. If field is empty, duplicates may occur.
Problem: Items not found, using Default Item
Solution:
-
Ensure Shopify product variants have SKU defined
-
Configure Item Template Code in Shopify Setup
-
Import items from Shopify first using Sync Items = From Shopify
Problem: Customer not found, using Guest Customer
Solution:
-
Enable Register New Customers in Shopify Setup
-
Configure Customer Template with default posting groups
-
Ensure Shopify order has valid email address
Problem: Posting Sales Invoice fails with error
Solution:
-
Review Sales Invoice for missing mandatory fields
-
Ensure Location Code has Inventory Posting Setup
-
Ensure Item Template has correct posting groups
-
Check if customer has correct posting group setup
Problem: Tracking information not imported
Solution:
-
Verify that Shopify fulfillment has tracking information
-
Create Shipping Agent Code in Business Central matching Shopify tracking company name
-
System imports tracking company and tracking number to Sales Invoice Header
Monitoring Fulfillment Imports
View Import History
-
Choose the 🔎 icon, enter Shopify Log Entries, and then choose the related link.
-
Filter by:
-
Request Type contains "fulfillment"
-
Type = Error (to see only errors)
-
Created = last 7 days
-
-
Open a log entry to view:
-
Full GraphQL request sent to Shopify
-
Full JSON response received
-
Error details if any
-
Automatic Import Schedule
To set up automatic fulfillment import:
-
Follow instructions in "Automatic data export - import" section
-
Configure Orders Job Queue Entry
-
Set schedule (e.g., every 15 minutes)
-
System will automatically import new fulfillments based on schedule
Field Mapping
See "Fulfillments import – fields mapping" section for complete mapping of Shopify fulfillment fields to Business Central Sales Invoice fields.