This page provides practical examples for integrating product-related data with Norce Commerce Connect. It covers importing products, prices, price lists, on hand (inventory), and image data.
Norce Commerce Connect is an integration framework for synchronizing product data between Norce Commerce and external systems such as ERP, PIM, and supplier catalogs. Integration is typically performed using REST APIs or .NET client libraries.
You can explore ready-made API examples using Postman:
Norce Commerce provides .NET client libraries to simplify integration:
The ImportProducts
API method is used to import or update product and SKU data from external sources such as ERP or PIM systems.
Insert: To add new products, provide these required fields:
ManufacturerCode
– Manufacturer identifier in NorceManufacturerPartNo
– Unique withManufacturerCode
PartNo
– Product identifierStatus
– Product status enumType
– Product type enum
Update: To update existing products, provide:
PartNo
– SKU identifier
Supplier Imports: Product data from suppliers is usually imported using the
ImportProducts
method in the Supplier namespace. See Supplier Integration Examples.
View .NET code sample for importing products
//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 = ImportProduct(serviceUrl, applicationId, secretKey);
}
public static JobDto ImportProduct(string serviceUrl, int applicationId, Guid secretKey)
{
const int accountId = 0;
var productHeader = new ProductHeader()
{
AccountId = accountId,
FullFile = false,
ProductFieldsThatAreSet = new List<ProductField>()
{
ProductField.ManufacturerCode,
ProductField.Variants,
ProductField.Cultures,
ProductField.Categories
},
ProductCultureFieldsThatAreSet = new List<ProductCultureField>
{
ProductCultureField.Name,
ProductCultureField.Description,
ProductCultureField.Title
},
VariantFieldsThatAreSet = new List<VariantField>
{
VariantField.ManufacturerPartNo,
VariantField.Skus
},
VariantCultureFieldsThatAreSet = new List<VariantCultureField>
{
},
SkuFieldsThatAreSet = new List<SkuField>
{
SkuField.Status,
SkuField.Type,
SkuField.VatRate
},
SkuCultureFieldsThatAreSet = new List<SkuCultureField>
{
SkuCultureField.ErpName,
SkuCultureField.Comment
},
SkuPriceListFieldsThatAreSet = new List<SkuPriceListField>
{
},
IgnoreSkuPriceListFieldsWhenEmpty = new List<SkuPriceListField>
{
},
SkuStructureItemFieldsThatAreSet = new List<SkuStructureItemField>
{
}
};
var requestUri = new Uri(new Uri(serviceUrl), "product/ImportProducts");
var myRequest = new MyRequest<ProductHeader, Product>(productHeader, GetProducts());
return RestHelper.SendStreamedData<JobDto, ProductHeader, Product>(
requestUri.AbsoluteUri, applicationId, secretKey, myRequest);
}
private static IEnumerable<Product> GetProducts()
{
// NOTE Format and map your data to the Norce Commerce Connect standard here
return new List<Product>
{
new Product
{
ManufacturerCode = "MFR0000001", // NOTE Required key
Variants = new List<Variant>
{
new Variant
{
ManufacturerPartNo = "MFRPARTNOTEST01", // NOTE Required key
Skus = new List<Sku>
{
new Sku
{
PartNo = "TESTSKU01", // NOTE Required key
Status = SkuStatus.Active, // NOTE Required key
Type = SkuType.Standard, // NOTE Required key
VatRates = new List<VatRate>
{
new VatRate
{
Rate = 25.00M,
SalesArea = SalesArea.Sweden
}
},
Cultures = new List<SkuCulture>
{
new SkuCulture
{
CultureCode = "sv-SE",
ErpName = "ERP Name",
Comment = "Comment"
}
}
}
}
}
},
Cultures = new List<ProductCulture>
{
new ProductCulture
{
CultureCode = "sv-SE",
Name = "Name",
Description = "Description",
Title = "Title"
}
},
Categories = new List<ProductCategory>
{
new ProductCategory
{
Code = "CAT001",
SortOrder = 1
}
}
}
};
}
The ImportOnhands
API method updates inventory (on hand) data for SKUs.
Required fields:
PartNo
– Product identifierWarehouseCode
– Warehouse identifierLocationCode
– Warehouse location identifier
Note: SKU, Warehouse, and Location must already exist in Norce Commerce. If not, the data is ignored.
View .NET code sample for importing on hand data
//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 = ImportSkuOnhand(serviceUrl, applicationId, secretKey);
}
public static JobDto ImportSkuOnhand(
string serviceUrl, int applicationId, Guid secretKey)
{
const int accountId = 0;
var onhandHeader = new SkuOnhandHeader
{
AccountId = accountId,
FullFile = false,
SkuOnhandFieldsThatAreSet = new List<SkuOnhandField>()
{
// Creates/Updates only the below fields in the import.
SkuOnhandField.OnhandValue,
SkuOnhandField.IncomingValue,
SkuOnhandField.NextDeliveryDate,
SkuOnhandField.LeadTimeDayCount
}
};
var requestUri = new Uri(new Uri(serviceUrl), "product/ImportOnhands");
var myRequest = new MyRequest<SkuOnhandHeader, SkuOnhand>(
onhandHeader, GetOnhands());
return RestHelper.SendStreamedData<JobDto, SkuOnhandHeader, SkuOnhand>(
requestUri.AbsoluteUri, applicationId, secretKey, myRequest);
}
private static IEnumerable<SkuOnhand> GetOnhands()
{
// NOTE Format and map your data to the Norce Commerce Connect standard here
return new List<SkuOnhand>
{
new SkuOnhand
{
PartNo = "PartNo123", // NOTE This is required key for onhand
WarehouseCode = "Warehouse1", // NOTE This is a required key for onhand
LocationCode = "Location1", // NOTE This is a required key for onhand
OnhandValue = 1.0M,
IncomingValue = 2.0M,
NextDeliveryDate = DateTime.Now.AddDays(2),
LeadTimeDayCount = null
}
};
}
The ImportSkuPriceLists
API method updates pricing data for SKUs.
Required fields:
PartNo
– Product identifierPriceListCode
– Price list identifier (calledAgreement
in Query)QuantityBreak
– Usually 1; defines when a price is active
Note: The product and price list must already exist in Norce Commerce. Otherwise, the data is ignored.
View .NET code sample for importing SKU price lists
//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 = ImportSkuPriceList(serviceUrl, applicationId, secretKey);
}
public static JobDto ImportSkuPriceList(
string serviceUrl, int applicationId, Guid secretKey)
{
const int accountId = 0;
var priceListHeader = new SkuPriceListHeader
{
AccountId = accountId,
FullFile = false,
SkuPriceListFieldsThatAreSet = new List<SkuPriceListField>()
{
// Creates/Updates only the below fields in the import.
SkuPriceListField.PriceSale,
SkuPriceListField.CostPurchase
}
};
var requestUri = new Uri(new Uri(serviceUrl), "product/ImportSkuPriceLists");
var myRequest = new MyRequest<SkuPriceListHeader, SkuPriceList>(
priceListHeader, GetPriceLists());
return RestHelper.SendStreamedData<JobDto, SkuPriceListHeader, SkuPriceList>(
requestUri.AbsoluteUri, applicationId, secretKey, myRequest);
}
private static IEnumerable<SkuPriceList> GetPriceLists()
{
// NOTE Format and map your data to the Norce Commerce Connect standard here
return new List<SkuPriceList>
{
new SkuPriceList
{
PartNo = "PartNo123", // NOTE This is required key for pricelist
PriceListCode = "PriceList1", // NOTE This is required key for pricelist
QuantityBreak = 1, // NOTE This is a required key for pricelist
PriceSale = 2.00M, // Excl VAT
CostPurchase = 1.00M, // Excl VAT
}
};
}
Explore these related topics for a deeper understanding of Norce Commerce integrations: