Supplier integration examples
Examples in Postman
Go directly to our Postman collection of examples:
Using client libraries
Norce Commerce has client libraries for c#. Read more about them here:
- Norce Commerce code repositories (Github)
- Norce Commerce Connect contracts and as a nuget
ImportProducts
ImportProducts is used to import products and sku´s from suppliers.
Note that there is a similar method in the Product namespace, that handles product data for the client catalog. While this method call handles the supplier products.
You find the full product schema here
To insert or update supplier products in Norce Commerce, the required keys are:
SupplierId
– Specified in header, references ID of supplier in Norce CommerceSupplierPartNo
– Unique part number for supplier productManufacturer
– Manufacturer Code in Norce CommerceManufacturerPartNo
– Combination ofManufacturerCode
andManufacturerPartNo
must be unique to be able to resolve product in Norce CommerceWarehouseCode
– Used to resolve correct supplier warehouse in Norce CommerceLocationCode
– Used to resolve correct supplier warehouse location in Norce CommercePriceListCode
– Used to resolve correct supplier price list in Norce Commerce
Examples in Postman
Examples in Client Libraries
Here is a code example using .net client library
//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() { //NOTE Format and map your data to the Norce Commerce Connect standard here return new List<SupplierProduct> { new SupplierProduct { SupplierPartNo = "SupplierPartNo123", // NOTE Required key ProductName = "TestArticle 123", CategoryCode = "SupplierCategory01", Manufacturer = "Manufacturer01", // NOTE Required key ManufacturerPartNo = "TESTMFRPARTNO01", // NOTE 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 } } } }; }
Suggested further reading
- Norce Commerce Connect code examples
- Calling Norce Commerce Connect
- Supplier integrations