DoliSharp.Shopify 8.0.6

dotnet add package DoliSharp.Shopify --version 8.0.6
                    
NuGet\Install-Package DoliSharp.Shopify -Version 8.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DoliSharp.Shopify" Version="8.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DoliSharp.Shopify" Version="8.0.6" />
                    
Directory.Packages.props
<PackageReference Include="DoliSharp.Shopify" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DoliSharp.Shopify --version 8.0.6
                    
#r "nuget: DoliSharp.Shopify, 8.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DoliSharp.Shopify@8.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DoliSharp.Shopify&version=8.0.6
                    
Install as a Cake Addin
#tool nuget:?package=DoliSharp.Shopify&version=8.0.6
                    
Install as a Cake Tool

DoliSharp.Shopify

Shopify ↔ Dolibarr connector for DoliSharp. It maps Shopify customers and orders to Dolibarr third parties and orders (webhooks), and can push warehouse stock to Shopify inventory.

This package is based on ShopifySharp (MIT), the .NET client for the Shopify Admin API. DoliSharp.Shopify uses ShopifySharp to talk to Shopify (products, variants, inventory levels) and to deserialize webhook payloads. It is a Dolibarr sync layer on top of ShopifySharp, not a fork of it.

Target framework: .NET 8. Depends on DoliSharp.

Features

  • Webhook topics: orders/create, orders/updated, orders/cancelled (ShopifyWebhookTopics)
  • Ensures a Dolibarr third party exists for the Shopify customer (match by email), then creates / updates / deletes the matching Dolibarr order
  • Orders are correlated via Dolibarr RefExt (Shopify-{orderId})
  • Line items are matched to Dolibarr products by SKU ↔ product ref
  • ISyncStockService — copy Dolibarr warehouse stock onto Shopify inventory levels (SKU ↔ product ref)
  • FulfillShopifyOrderCommand — fulfill remaining Shopify fulfillment orders (e.g. locker pickup) without notifying the customer
  • orders/updated updates Dolibarr lines / third party but does not write order status (fk_statut)

Installation

dotnet add package DoliSharp
dotnet add package DoliSharp.Shopify

Quick start

Register DoliSharp first (order / product / third-party services), then the connector:

using DoliSharp;
using DoliSharp.Credentials;
using DoliSharp.Shopify;
using Microsoft.Extensions.DependencyInjection;

services.AddDoliSharp(new DolibarrCredentials(
    Url: "https://your-dolibarr.example.com",
    Token: "YOUR_DOLAPIKEY"
));

services.AddShopifyConnector(
    shopifyUrl: "https://your-shop.myshopify.com",
    shopAccessToken: "shpat_..."
);

AddShopifyConnector registers MediatR handlers from this assembly, ISyncStockService, and the ShopifySharp product / variant / inventory services.

Process a webhook

Forward the raw body and Shopify headers to MediatR. The host app is responsible for receiving HTTP webhooks (this package is a library, not an ASP.NET endpoint).

using DoliSharp.Shopify.Webhooks.Commands;
using DoliSharp.Shopify.Webhooks.Domain;
using ErrorOr;
using MediatR;

var webhook = new WebhookRequest(
    Id: someId,
    Body: rawJsonBody,
    Headers: headerDictionary // X-Shopify-Topic, X-Shopify-Webhook-Id, …
);

ErrorOr<Success> outcome = await sender.Send(new ProcessShopifyWebhookCommand(webhook));
Topic Behavior
orders/create Ensure third party exists, create and validate a Dolibarr order
orders/updated Ensure third party exists, update the Dolibarr order with RefExt Shopify-{id} (lines / third party only; status is left unchanged)
orders/cancelled Delete the matching Dolibarr order
other Logged and ignored (Success)

Sync stock Dolibarr → Shopify

Variants must have a SKU, inventory management set to Shopify, and a mapped location. Stock on the Dolibarr warehouse is written to the Shopify inventory level.

using DoliSharp.Shopify.Stock;
using DoliSharp.Shopify.Stock.Abstractions;

var sync = provider.GetRequiredService<ISyncStockService>();

var request = new StockSyncRequest()
    .AddStockSyncWarehouse(dolibarWarehouseId: 1, shopifyWarehouseId: 123456789);

var movement = await sync.SynchroniseDolibarrWithShopifyAsync(request);

Fulfill a Shopify order

Used after locker pickup. Lists remaining fulfillment orders and creates a fulfillment (NotifyCustomer = false). Idempotent when none are open.

using DoliSharp.Shopify.Fulfillment;

ErrorOr<Success> fulfilled = await sender.Send(new FulfillShopifyOrderCommand(shopifyOrderId));

Requires Shopify scopes read_merchant_managed_fulfillment_orders and write_merchant_managed_fulfillment_orders.

Mapping

Shopify Dolibarr
Customer email Third party (lookup / create / update)
Customer id Third party RefExt = Shopify-{id}
Order id Order RefExt = Shopify-{id}
Line item SKU Product Ref
Variant SKU (stock sync) Product Ref

Error handling

Results use ErrorOr. Domain codes live in DoliSharp.Shopify.Domain.DomainErrors.

if (outcome.IsError)
    return outcome.FirstError.Description;

License

DoliSharp.Shopify is licensed under the Apache License 2.0.

Shopify API access is provided by ShopifySharp, copyright Joshua Harms / Nozzlegear, licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.0.6 106 9/12/2026
8.0.5 109 9/12/2026
8.0.4 97 9/12/2026
8.0.3 96 9/12/2026
8.0.2 112 9/1/2026
8.0.1 101 9/1/2026
8.0.0 154 8/13/2026
0.1.0 126 8/11/2026