Skip to content
Last updated

This page provides practical examples for integrating supplier data with Norce Commerce Connect. It includes sample API calls, code snippets, and guidance for importing supplier products, prices, and availability.

Supplier Integration Overview

Supplier integration in Norce Commerce Connect enables you to import and update supplier product catalogs, including product details, prices, and stock availability. This is essential for keeping your product catalog synchronized with supplier data.

Example Integrations Using Postman

You can explore and test supplier integration endpoints using our Postman collection:

  • Norce Commerce Connect Supplier Examples:
    Open Postman Collection
    (This collection contains ready-to-use requests for supplier import scenarios.)

Using Client Libraries

Norce Commerce provides .NET client libraries to simplify integration tasks.

These libraries include data contracts and helper classes for interacting with the API.

Importing Supplier Products

The ImportProducts endpoint allows you to import or update supplier products and SKUs in Norce Commerce.

  • API Reference:
    ImportProducts
    (See the API documentation for full details.)

Note:
There is a similar method in the Product namespace for client catalog data. The supplier method is specifically for supplier product imports.

Required Keys for Import

To insert or update supplier products, the following keys are required:

  • SupplierId: ID of the supplier in Norce Commerce (specified in the header)
  • SupplierPartNo: Unique part number for the supplier product
  • Manufacturer: Manufacturer code in Norce Commerce
  • ManufacturerPartNo: Unique combination with Manufacturer
  • WarehouseCode: Identifies the supplier warehouse
  • LocationCode: Identifies the warehouse location
  • PriceListCode: Identifies the supplier price list

Example Requests in Postman

Example: Importing Supplier Products Using .NET Client Library

The following example demonstrates how to import supplier products using the Norce Commerce .NET client library. This code shows how to construct the request, set required fields, and send data to the API.

Show .NET code example
// filepath: c:\Data\GitHub\docs.norce.io\developer-portal\system-integration\supplier-integration-examples.md
// Using Storm Client library: https://github.com/StormCommerce/Storm.Connect.Contracts
// Nuget: https://www.nuget.org/packages/Enferno.Services.StormConnect.Contracts/
static void Main()
{
    var serviceUrl = "https://demo.api-se.norce.tech/commerce/connect/4.0/";
    var applicationId = 0;
    var secretKey = Guid.NewGuid();
  
    var job = ImportSupplierProduct(serviceUrl, applicationId, secretKey);
}
  
public static JobDto ImportSupplierProduct(string serviceUrl, int applicationId, Guid secretKey)
{
    const int accountId = 0;
    const int supplierId = 0; // Supplier ID in Norce
  
    var productHeader = new SupplierProductHeader()
    {
        AccountId = accountId,
        SupplierId = supplierId,
        FullFile = false,
        FieldsThatAreSet = new List<SupplierProductField>()
        {
            SupplierProductField.SupplierPartNo,
            SupplierProductField.ProductName,
            SupplierProductField.CategoryCode,
            SupplierProductField.Manufacturer,
            SupplierProductField.ManufacturerPartNo
        },
        OnhandFieldsThatAreSet = new List<SupplierOnHandField>
        {
            SupplierOnHandField.Value
        },
        PriceFieldsThatAreSet = new List<SupplierPriceField>
        {
            SupplierPriceField.CostPurchase
        }
    };
  
    var requestUri = new Uri(new Uri(serviceUrl), "supplier/ImportProducts");
    var myRequest = new MyRequest<SupplierProductHeader, SupplierProduct>(
        productHeader, GetSupplierProducts());
    return RestHelper.SendStreamedData<JobDto, SupplierProductHeader, SupplierProduct>(
        requestUri.AbsoluteUri, applicationId, secretKey, myRequest);
}
  
private static IEnumerable<SupplierProduct> GetSupplierProducts()
{
    // Format and map your data to the Norce Commerce Connect standard here
    return new List<SupplierProduct>
    {
        new SupplierProduct
        {
            SupplierPartNo = "SupplierPartNo123", // Required key
            ProductName = "TestArticle 123",
            CategoryCode = "SupplierCategory01",
            Manufacturer = "Manufacturer01", // Required key
            ManufacturerPartNo = "TESTMFRPARTNO01", // Required key
            OnHand = new List<SupplierOnHand>
                            {
                                new SupplierOnHand
                                {
                                    WarehouseCode = "Standard", // Part of onhand key
                                    LocationCode = "Standard", // Part of onhand key
                                    Value = 12M // Available qty
                                }
                            },
            PriceList = new List<SupplierPrice>
                            {
                                new SupplierPrice
                                {
                                    PriceListCode = "STD1", // Price key
                                    CurrencyCode = "SEK",
                                    CostPurchase = 125.00M // Excl. VAT
                                }
                            }
        }
    };
}

Further Reading

For more integration scenarios and technical details, see: