Quick facts

Some information on personalized products and prices

  • Product availability (online-status) can be configured specifically for a person or persongroup
  • Prices can be adjusted for each person or persongroup
  • When a product does not have an individual price or status configured for a person, the shop wide standard settings automatically apply
  • Once an individual price for a product is set for a person, all price data for this product and person will be based on the individual settings
  • Individual prices can be relative to the standard prices or absolute
  • Price groups and quantity based discounts are available in general and on an individual level
  • Companyaccounts have the same products and prices available for all their subaccounts
  • The Cart-API will automatically use the personalized prices if you specify the person

Prerequisites

You should have

  • an user-account enabled for api access & PIM access
  • an api-client
  • at least one product-record stored in your Hublify PIM
  • at least one person-record stored in your Hublify CRM

Specialized price fields

Personalized products provide a set a special price fields for easy access to the currently valid prices for this person.
These already include fallbacks to persongroup or shop prices if no individual price is set and would also ignore discount-prices that are out of date.
Use these fields to get the correct current prices.

"ecs_price_netto": "100.0000",              // this is the currently valid price (either standard or discount) before tax
"ecs_price_brutto": "119.0000",             // this is the currently valid price (either standard or discount) incl. tax
"ecs_standard_price_netto": "100.0000",     // this is the standard price before tax
"ecs_standard_price_brutto": "119.0000",    // this is the standard price price incl. tax
"ecs_discount_price_netto": null,           // this is the discount price before tax or null if discount is not set or currently not valid
"ecs_discount_price_brutto": null           // this is the discount price price incl. tax or null if discount is not set or currently not valid
"ecs_price_scale": {
    "15": {
        "ecs_price_brutto": 107.1,
        "ecs_uvp_brutto": 119,
        "ecs_discount_pct": 10,
        "ecs_price_netto": 90,
        "ecs_uvp_netto": 100,
        "min_quantity": 15
    },
    "30": {
        "ecs_price_brutto": 95.2,
        "ecs_uvp_brutto": 119,
        "ecs_discount_pct": 20,
        "ecs_price_netto": 80,
        "ecs_uvp_netto": 100,
        "min_quantity": 30
    }
}

Getting a product list

Simply provide the fields you want to have returned and the person this relates to.
Info: In the following example an additional filter for online-products was added as well and an optional limit-parameter is given to avoid too big results returned.

Request URL

https://{your hublify url}/api/eos_10/data_getList

Request parameter

{
    "dataset": "product_personalized",   // request the personalized version of the product
    "filter": [
        "persid": 1234,                  // use the Hublify internal ID to specify the person you want to see the products for
        "state": 2                       // optional filter for "online" products
    ],
    "fields": [
        "pcode",
        "name",
        "drvd_categories",
        "ecs_price_brutto"               // current price incl. tax for the products
    ],
    "sql": {
        "limit": {
            "max": 3
        }
    }
}

Response

{
    "data": [
        {
            "pcode": "BP00001",
            "name": "Graypants Beleuchtungspaket",
            "drvd_categories": {
                "model": "productgroup",
                "primaryKey": "node_id",
                "displayKey": "node_name",
                "data": [
                    {
                        "node_id": 3,
                        "node_code": "lightning_pendant",
                        "node_name": "H\u00e4ngeleuchten",
                        "node_path": "|Wohninterieur|Lampen|H\u00e4ngeleuchten"
                    }
                ]
            },
            "ecs_price_brutto": "989.9900"
        },
        {
            "pcode": "CRI00001",
            "name": "Duomo XXXL dekorative Sch\u00fcssel",
            "drvd_categories": {
                "model": "productgroup",
                "primaryKey": "node_id",
                "displayKey": "node_name",
                "data": [
                    {
                        "node_id": 12,
                        "node_code": "bowles",
                        "node_name": "Sch\u00fcsseln",
                        "node_path": "|K\u00fcchenutensilien|Sch\u00fcsseln"
                    }
                ]
            },
        },
        {
            "pcode": "EK00001",
            "name": "Duomo XXL dekorative Sch\u00fcssel",
            "drvd_categories": {
                "model": "productgroup",
                "primaryKey": "node_id",
                "displayKey": "node_name",
                "data": [
                    {
                        "node_id": 12,
                        "node_code": "bowles",
                        "node_name": "Sch\u00fcsseln",
                        "node_path": "|K\u00fcchenutensilien|Sch\u00fcsseln"
                    }
                ]
            },
            "ecs_price_brutto": "100.0000"
        }
    ],
    "status": true
}

Filters, sorting etc.

You can use all the usual filters, segments, fields etc that you already know from the regular "product" dataset.
 Just use the described special price fields and add a filter to specify the person.

Request URL

https://{your hublify url}/api/eos_10/data_getList

Request parameter

{
    "dataset": "product_personalized",
    "sql": {
        "order": "ecs_price_brutto ASC, name ASC",
        "limit": {
            "max": 2
        }
    },
    "filter": {
        "persid": 1234,
        "drvd_category_code": "lightning_floor"
    },
    "fields": [
        "pcode",
        "ecs_price_brutto"
    ]
}

Aggregated Data

You can also request aggregated data with your personalized product prices .
 Multiple measurements for the same group can be requested together.

Request URL

https://{your hublify url}/api/eos_10/data_getList

Request parameter

{
    "dataset": "product_personalized",
    "fieldMeasure": [
        {
            "field": "ecs_price_brutto",   
            "aggregation": "MIN",
            "alias": "priceFrom"
        },
        {
            "field": "ecs_price_brutto",
            "aggregation": "MAX", 
            "alias": "priceTo"
        }
    ]
}