Self-hosted commerce

AI agent for nopCommerce (self-hosted, C#)

Self-hosted commerce with JWT auth and C# services. Swapping it for Shopify is an adapter-internal detail, invisible to the platform core.

Auth method: jwt (self-hosted nopCommerce bearer tokens)

nopCommerce is a self-hosted ASP.NET / C# commerce platform. The adapter is a set of endpoints backed by your existing nopCommerce services — _orderService, _refundService, _productService — with authMethod "jwt". validateToken reuses your existing auth, getPermissions maps nopCommerce ACL checks to tool-permission strings, and executeTool dispatches idempotently into those services.

It is the same one-adapter, two-persona shape as Shopify: storefront customers and back-office merchants share a single host app, and governance gives each persona different powers through context and permissions rather than app-side branching. The only difference from Shopify is the adapter's internals — nopCommerce runs in-house with JWT, Shopify is hosted with OAuth2.

That is exactly why the choice between nopCommerce and Shopify is an adapter detail, not a platform concern. The platform-side contract is identical in both cases; only authMethod (jwt vs oauth2) and the service calls behind executeTool change.

Highlights
Endpoints over your existing C# services
Same one-adapter, two-persona model as Shopify
JWT auth — no second identity system
Shopify vs nopCommerce is an adapter-internal swap (jwt to oauth2)
How the integration works

The integration path.

01

Embed <agentic-panel> in your Razor/MVC or SPA storefront and admin surfaces and build a HostContext per screen.

02

Add adapter endpoints backed by nopCommerce services (_orderService, _refundService, _productService).

03

Map ACL checks (e.g. AuthorizeAsync("ManageRefunds", user)) to tool-permission strings in getPermissions.

04

Dispatch executeTool idempotently into your C# services; refunds and stock adjustments are controlled_write and gate for approval.

05

Register the host with authMethod "jwt".

Worked example

Idempotent executeTool over nopCommerce services (C#)

// getPermissions — map ACL to platform tool-permission strings
[HttpGet("agent-adapter/permissions")]
public async Task<string[]> GetPermissions() {
    var user = await _auth.ValidateAsync(Request);
    var perms = new List<string> { "tool.track_order.execute" };
    if (await _permissionService.AuthorizeAsync("ManageRefunds", user))
        perms.Add("tool.issue_refund.execute");
    if (await _permissionService.AuthorizeAsync("ManageProducts", user))
        perms.Add("tool.adjust_stock.execute");
    return perms.ToArray();
}

// executeTool — idempotent dispatch into nopCommerce services
[HttpPost("agent-adapter/tools/{toolId}/execute")]
public async Task<ToolResult> Execute(string toolId, [FromBody] ToolArgs a) {
    if (await _idem.SeenAsync(a.IdempotencyKey))
        return await _idem.ReplayAsync(a.IdempotencyKey);
    return toolId switch {
        "issue_refund" => Ok(await _refundService.RefundAsync(a.Args["orderId"], a.Args["amount"])),
        "adjust_stock" => Ok(await _productService.AdjustInventoryAsync(a.Args["productId"], a.Args["delta"])),
        _              => Fail("unknown tool"),
    };
}
Honest note

This is a documented integration approach with worked code — not a pre-built, install-and-go production connector. Governance, the adapter SDK, idempotency, and audit are built; the gateway-to-registered-adapter write dispatch is still maturing. See the full build-status honesty box →

Start your nopCommerce integration.

The adapter SDK and worked examples are in the docs. We'll walk your team through the two seams, the governance gate, and this path end to end.