Skip to content
Last updated

Product Integration: From Norce to ERP

This guide explains how to integrate product data from Norce Commerce into an ERP system. It covers the data model, key fields, event and query mechanisms, and best practices for extracting and mapping product information.

Overview

When products are created in Norce and need to be synchronized with an ERP, it is essential to understand the data structure, relevant fields, and integration process.

Integration Flow

To transfer product data from Norce to an ERP system:

  1. Listen to Events: Detect changes in Norce Commerce using event notifications.
  2. Query for Details: Use the Query API to fetch detailed product information.
  3. Map and Transfer: Map Norce fields to ERP fields and transfer the data.

Event and Query Mechanisms

Norce Commerce provides two main mechanisms for integration:

  • Events: Notify you of changes to products.
  • Queries: Allow you to fetch detailed product data.

References:

Key Product Fields

The following table summarizes the most important fields for ERP integration. Each field is listed with its entity, description, and usage.

FieldEntityDescriptionUsage
PartNoProductSkuNorce-generated product identifier. Rules for generation can be set in the Admin UI.Use this as the primary identifier when creating products in the ERP.
StatusProductSkuProduct lifecycle status: Active (1), Coming (2), Expiring (3), Hidden (4), Inactive (5).New products are usually "coming" until ready to sell.
TypeProductSkuProduct type in Norce. Common types: Standard (1), Freight (3), ManagedStructure (37), Service (11), Extended (14), ManagedERPPackage (38).Not all types are created in the ERP. For example, ManagedStructure and Extended are often left in Norce.
NameProduct, ProductCultureShort product name.
EanCodeProductSkuPrimary GS1/EAN code. Multiple codes possible.
ManufacturerProductRequired on all products. Combined with ManufacturerPartNo, must be unique.
ManufacturerPartNoProductRequired on all products. Combined with Manufacturer, must be unique.
(Supplier)PartNo, SupplierIdSupplierSkusSupplier-specific product identifiers. Multiple suppliers possible.
CategoryIdCategoryPrimary category for each product. Used to ensure correct creation in ERP.
VatCodeIdSalesAreaVAT rate per sales area.If null, inherited from primary category or application.
ParametricId, Values, ListId, MultipleListIdProductParametric, *MultipleStructured product attributes (parametrics). Use metadata to look up details.Not all parametrics are needed in the ERP. Selection varies by client.
FlagIdClientProductFlagProduct flags. Use metadata to look up details.Not all flags are needed in the ERP. Selection varies by client.

Example: Fetching Product Data

To fetch product data from Norce Commerce Query, use the following example query:

https://query.lab.storm.io/2.0/Products/ProductSkus('ThePartNo')?$expand=Product($select=DefaultName,ManufacturerId,ManufacturerPartNo;$expand=Categories($filter=IsPrimary eq true;$select=CategoryId),SupplierSkus($select=PartNo,SupplierId),Parametrics($select=ParametricId,DefaultVarcharValue,DefaultHtmlValue,IntegerValue,DecimalValue,BooleanValue,DateValue,ListId,NormalizedValue),ParametricMultiple($select=ParametricId,MultipleId),Flags($select=FlagId,IsActive)),SalesAreas($select=SalesAreaId,VatCodeId)&$select=PartNo,StatusId,TypeId,EanCode,PriceLists

Sample JSON Response:


{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Products/$metadata#ProductSkus(PartNo,StatusId,TypeId,EanCode,PriceLists,Product(DefaultName,ManufacturerId,ManufacturerPartNo,Categories(CategoryId),SupplierSkus(PartNo,SupplierId),Parametrics(ParametricId,DefaultVarcharValue,DefaultHtmlValue,IntegerValue,DecimalValue,BooleanValue,DateValue,ListId,NormalizedValue),ParametricMultiple(ParametricId,MultipleId),Flags(FlagId,IsActive)),SalesAreas(SalesAreaId,VatCodeId))/$entity",
    "PartNo": "PRD0001270",
    "StatusId": 1,
    "TypeId": 1,
    "EanCode": "123123123123123",
    "Product": {
        "ManufacturerId": 1685,
        "ManufacturerPartNo": "T540XP",
        "DefaultName": "T540XP",
        "Categories": [
            {
                "CategoryId": 41722
            }
        ],
        "SupplierSkus": [
            {
                "PartNo": "123456122433",
                "SupplierId": 1545
            },
            {
                "PartNo": "3214325436543",
                "SupplierId": 5246
            }
        ],
        "Parametrics": [
            {
                "ParametricId": 1726,
                "DefaultVarcharValue": null,
                "DefaultHtmlValue": null,
                "IntegerValue": null,
                "DecimalValue": null,
                "BooleanValue": true,
                "DateValue": null,
                "ListId": null,
                "NormalizedValue": 1.000
            },
            {
                "ParametricId": 16057,
                "DefaultVarcharValue": "Husqvarna T540 XP is developed for the exclusive top segment of saws with top handles focusing on professional customers such as arborists, gardeners, gardeners and property caretakers who need excellent performance combined with the best possible ergonom",
                "DefaultHtmlValue": null,
                "IntegerValue": null,
                "DecimalValue": null,
                "BooleanValue": null,
                "DateValue": null,
                "ListId": null,
                "NormalizedValue": null
            },
            {
                "ParametricId": 16061,
                "DefaultVarcharValue": null,
                "DefaultHtmlValue": null,
                "IntegerValue": null,
                "DecimalValue": null,
                "BooleanValue": null,
                "DateValue": null,
                "ListId": null,
                "NormalizedValue": null
            }
        ],
        "ParametricMultiple": [
            {
                "ParametricId": 16061,
                "MultipleId": 44776
            },
            {
                "ParametricId": 16061,
                "MultipleId": 44778
            },
            {
                "ParametricId": 16061,
                "MultipleId": 44780
            }
        ],
        "Flags": [
            {
                "FlagId": 565,
                "IsActive": true
            },
            {
                "FlagId": 915,
                "IsActive": true
            }
        ]
    },
    "SalesAreas": [
        {
            "SalesAreaId": 1,
            "VatCodeId": null
        },
        {
            "SalesAreaId": 2,
            "VatCodeId": null
        }
    ]
}

Metadata Lookups

Some fields reference IDs that require additional lookups for full context. To optimize performance, fetch metadata in batches and cache responses.

Category Metadata

Category information may be needed for ERP mapping. Fetch details such as DefaultName, Code, Id, and default values.

FieldEntityDescription
IdCategoryCategory identifier from ProductSku.
CodeCategoryCategory code.
DefaultNameCategoryCategory name.
BusinessAreaCategoryUse for ERP mapping if needed.
ParentCategoryIdCategoryHierarchyFor category tree lookups.
HierarchyCategoryHierarchyCategory hierarchy level (1 = top level).

Example: Fetching Category Metadata

https://query.lab.storm.io/2.0/Application/Categories?$select=Id,Code,DefaultName

Response

{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Application/$metadata#Categories(Id,Code,DefaultName)",
    "value": [
        {
            "Id": 2192,
            "Code": null,
            "DefaultName": "Bild"
        },
        {
            "Id": 2193,
            "Code": null,
            "DefaultName": "TV"
        },
        {
            "Id": 2194,
            "Code": null,
            "DefaultName": "LCD"
        },
        {
            "Id": 2195,
            "Code": null,
            "DefaultName": "LED"
        },
        {
            "Id": 2196,
            "Code": null,
            "DefaultName": "Tillbehör"
        },
        {
            "Id": 2197,
            "Code": null,
            "DefaultName": "Digital-TV"
        }
    ]
}

Example: Fetching Category Hierarchy Metadata

https://query.lab.storm.io/2.0/Application/CategoryHierarchy

Response

{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Application/$metadata#CategoryHierarchy",
    "value": [
        {
            "CategoryId": 2192,
            "ParentCategoryId": 2192,
            "Hierarchy": 1
        },
        {
            "CategoryId": 2193,
            "ParentCategoryId": 2192,
            "Hierarchy": 1
        },
        {
            "CategoryId": 2193,
            "ParentCategoryId": 2193,
            "Hierarchy": 2
        },
        {
            "CategoryId": 2202,
            "ParentCategoryId": 2192,
            "Hierarchy": 1
        },
        {
            "CategoryId": 2202,
            "ParentCategoryId": 2200,
            "Hierarchy": 2
        },
        {
            "CategoryId": 2202,
            "ParentCategoryId": 2202,
            "Hierarchy": 3
        }
    ]
}

Flag Metadata

Flags may contain important information for ERP integration. Look up flag metadata to get code or group information.

FieldEntityDescription
IdProductFlagsFlag identifier.
CodeProductFlagsFlag code.
TypeIdProductFlagsProduct flag (1) or Variant flag (2)
DefaultNameProductFlagsFlag name.
(Group)IdProductFlagGroupGroup identifier.
(Group)DefaultNameProductFlagGroupGroup name.

Example: Fetching Flag Metadata

https://query.lab.storm.io/2.0/Application/ProductFlags?$select=Id,TypeId,DefaultName,Code&$expand=Group($select=Id,Code,DefaultName)
{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Application/$metadata#ProductFlags(Id,TypeId,GroupId,DefaultName,DefaultDescription,IsManuallyEditable,Code,Cultures(CultureCode,Name,Description),Group(Id,DefaultName,DefaultDescription,Cultures(CultureCode,Name,Description)))",
    "value": [
        {
            "Id": 42,
            "TypeId": 1,
            "GroupId": 9,
            "DefaultName": "Utförsäljning",
            "DefaultDescription": null,
            "IsManuallyEditable": true,
            "Code": "sale",
            "Group": {
                "Id": 9,
                "DefaultName": "Manual flags",
                "DefaultDescription": "Manually defined product flags",
            }
        }
    ]
}

Parametric Metadata

Parametrics are structured product attributes. Look up parametric metadata to map values for ERP.

FieldEntityDescription
IdParametricParametric identifier.
CodeParametricParametric code.
DefaultNameParametricParametric name.
(List)IdParametricListList value identifier.
(List)CodeParametricListList value code.
DefaultVarcharValueParametricListList value text.
(Multiple)IdParametricMultipleMultiple value id.
(Multiple)CodeParametricMultipleMultiple value code.
DefaultValueParametricMultipleMultiple value text.

Example: Fetching Parametric Metadata

https://query.lab.storm.io/2.0/Application/Parametrics?$select=Id,DefaultName,Code

Response

{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Application/$metadata#Parametrics(Id,DefaultName,Code)",
    "value": [
        {
            "Id": 1684,
            "DefaultName": "Anitamodell",
            "Code": null
        },
        {
            "Id": 1714,
            "DefaultName": "Fjärrkontroll",
            "Code": "fjarrkontroll"
        }
    ]
}

Example: Fetching List Value Metadata

https://query.lab.storm.io/2.0/Application/ParametricListValues?$select=Id,ParametricId,DefaultVarcharValue,Code

Response

{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Application/$metadata#ParametricListValues(Id,ParametricId,DefaultVarcharValue,Code)",
    "value": [
        {
            "Id": 2145,
            "ParametricId": 1668,
            "DefaultVarcharValue": "4:3",
            "Code": "4-3"
        },
        {
            "Id": 2146,
            "ParametricId": 1668,
            "DefaultVarcharValue": "16:9",
            "Code": "16-9"
        }
    ]
}

Example: Fetching Multi-List Value Metadata

https://query.lab.storm.io/2.0/Application/ParametricMultipleValues?$select=Id,ParametricId,DefaultValue,Code

Response

{
    "@odata.context": "https://query.lab.storm.io/Query/2.0/Application/$metadata#ParametricMultipleValues(Id,ParametricId,DefaultValue,Code)",
    "value": [
        {
            "Id": 1505,
            "ParametricId": 1671,
            "DefaultValue": "DVB-T",
            "Code": null
        },
        {
            "Id": 1506,
            "ParametricId": 1671,
            "DefaultValue": "DVB-C",
            "Code": null
        },
        {
            "Id": 1507,
            "ParametricId": 1671,
            "DefaultValue": "DVB-C",
            "Code": null
        }
    ]
}

Built-in Attributes in Norce

Norce provides additional fields that may be useful for ERP integration. These include integration part numbers, commodity codes, weights, units of measurement, and logistics data.

FieldEntityDescription
IntegrationPartNo / DefaultIntegrationPartNoProductSku / CategoryOptional identifier for mapping multiple Norce products to one ERP product.
CommodityCode / DefaultCommodityCodeProductSku / CategoryCommodity code.
Grossweight / DefaultGrossWeightProductSku / CategoryGross weight.
UnitOfMeasurementId / DefaultUnitOfMeasurementIdProductSku / CategoryUnit of measurement: Pieces (1), Hours (2), Kilogram (3), Litres (4), Pairs (5), Square meters (6), Meters (7).
UnitOfMeasurementCountProductSkuNumber of items in a SKU.
IsDropShipOnly / DefaultIsDropShipOnlyProductSku / CategoryDrop ship only flag.
LogisticWidthProductSkuLogistic width.
LogisticHeightProductSkuLogistic height.
LogisticDepthProductSkuLogistic depth.
IsDangerousGoodsProductDangerous goods flag.
CodeProductVariant identifier for grouping.

Sales Areas and VAT Codes

VAT codes are determined by the sales area configuration. If the VAT code is null at the product level, check the category and then the sales area.

Priority Order:

  1. ProductSkuSalesAreas (product level)
  2. CategorySalesAreas (category level)
  3. SalesAreas (default for the sales area)

Fields:

FieldEntityDescription
SalesAreaId or IdProductSkuSalesArea / CategorySalesArea / SalesAreaSales area identifier.
DefaultNameSalesAreaSales area name.
DefaultCurrencyIdSalesAreaDefault currency for the sales area.
DefaultVatCodeIdSalesAreaDefault VAT code for the sales area.
IsPrimaryApplicationSalesAreaIndicates the primary sales area for the application.
CodeClientSalesAreaExternal code for the sales area.

Example: Fetching Sales Area Metadata

https://query.lab.storm.io/2.0/Core/SalesAreas?$select=Id,DefaultName,DefaultCurrencyId,DefaultVatCodeId
https://query.lab.storm.io/2.0/Application/ApplicationSalesAreas?$ApplicationId,SalesAreaId,IsPrimary,IsActive
https://query.lab.storm.io/2.0/Application/SalesAreas?$select=SalesAreaId,IsPrimary,Code
https://query.lab.storm.io/2.0/Core/Currencies

Manufacturer and Supplier Metadata

Fetch manufacturer and supplier codes for mapping to ERP-recognized identifiers.

FieldEntityDescription
ManufacturerIdClientManufacturerManufacturer identifier.
ManufacturerCodeClientManufacturerManufacturer code.
(Manufacturer)NameClientManufacturerManufacturer name.
SupplierIdClientSupplierSupplier identifier.
SupplierCodeClientSupplierSupplier code.
(Supplier)NameClientSupplierSupplier name.

Example: Fetching Manufacturer and Supplier Metadata

https://query.lab.storm.io/2.0/Application/ClientManufacturers?$select=ManufacturerId,ManufacturerCode,Name
https://query.lab.storm.io/2.0/Application/ClientSuppliers?$select=SupplierId,SupplierCode,Name

Event Settings for Product Integration

Configure event notifications to listen for relevant changes. The table below summarizes recommended event settings for ERP integration.

EntityOn InsertOn UpdateOn DeleteFilter
tCategorySalesAreaNoYes (vatcodeid)NoFilter on relevant sales areas for the ERP (commonly only one)
tClientProductSkuYesYes (choose only the fields the ERP needs)NoFilter on ERP-enabled product types only (usually 'Standard')
tClientProductSkuSalesAreaYesYes (vatcodeid)NoFilter on relevant sales areas for the ERP (commonly only one)
tProductYesYes (choose only the fields the ERP needs)Non/a
tProductFlag (*)YesYes (flagId, isactive)NoFilter on only the flags that the ERP is interested in
tProductParametric (*)YesYes (only the types of values needed)Yesn/a
tProductParametricMultiple (*)Yes (if needed)n/aYesn/a

(*) Flags and parametrics are only required if the client needs specific information for the ERP.

Example of Event settings in Admin UI

Event settings 1

Event settings 2

Explanation Here we are interested in sku's (tClientProductSku) that are created or updated, but only if they are of type Standard. Furthermore there are other product data we want to know if it is updated, like which sales areas that has vat, or some of the important product flags.

References:

Further Reading