Overview

  • Hublify integrates an option to save a product to a customer specific wish- or watchlist
  • You can also save this list anonymously if you don't know the customer yet
  • Dataset: product_watch

Product Wishlist for a known customer

Adding products

To add a product to a person watchlist, you only need the pcode of the product and the id for the person

Request URL

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

Request parameter

{
    "dataset": "product_watch",
    "fields": {
        "fk_prdwatch_persid": 12345,       // Internal ID for the person this is for
        "fk_prdwatch_pcode": "HFYPRD0001"  // Pcode for the product
    }
}

Response

{
    "status": true
}

Getting the current list

You can use data from the product- and or person-records to filter your list of watched products and to display them.

Request URL

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

Request parameter

Example: All products on the watchlist for a specific person

{
    "dataset": "product_watch",
    "filter": {
        "personid": "K000012345" // get all products that person "K000012345" has on their watchlist
    },
    "fields": [
        "prdwatch_id"
        "pcode",
        "name"
    ]
}

 

Response

{
    "data": [
        {
          "prdwatch_id": 123,        // the internal id for this 
          "pcode": "HFYPRD0001",
          "name": "Demo Produkt"
        }
    ],
    "status": true
}

Removing products

To remove a product from a watchlist, you can either use the internal ID or combine the IDs for product and person

Request URL

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

Request parameter - using the internal ID

{
    "dataset": "product_watch",
    "filter": {
        "prdwatch_id": 123  // Internal ID of the product_watch record
    }
}

 

Request parameter - using person and product details

{
    "dataset": "product_watch",
    "filter": {
        "fk_prdwatch_persid": 12345,       // Internal ID for the person this is for
        "fk_prdwatch_pcode": "HFYPRD0001"  // Pcode for the product
    }
}

Product Wishlist for an anonymous visitor

You can also collect products in a wishlist if you don't know the person.
For this case hublify provides a RefID that you can use instead.

Adding products

If you provided neither person or refid, a refid will be automatically created that you can use for the user-session.
 

Request URL

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

Request parameter if you don't have a refID yet

{
    "dataset": "product_watch",
    "fields": {
        "fk_prdwatch_pcode": "HFYPRD0001"       // Pcode for the product
    }
}

Response

{
    "status": true,
    "data": {
        "prdwatch_refid": "pwtch61640aa665574" // automatically created RefId - remember this for future calls 
    }

}

Request parameter for subsequent calls

{
    "dataset": "product_watch",
    "fields": {
        "prdwatch_refid": "pwtch61640aa665574", // RefId you remembered 
        "fk_prdwatch_pcode": "HFYPRD0002"       // Pcode for the product
    }
}

 

Getting the current list

You can use the saved refid to get the wishlist for this anonymous visitor

Request URL

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

Request parameter

Example: All products on the refID-based watchlist

{
    "dataset": "product_watch",
    "filter": {
        "prdwatch_refid": "pwtch61640aa665574",  // The RefID for this anonymous visitor
    },
    "fields": [
        "prdwatch_id"
        "pcode",
        "name"
    ]
}

 

Response

{
    "data": [
        {
          "prdwatch_id": 123,        // the internal id for this 
          "pcode": "HFYPRD0001",
          "name": "Demo Produkt"
        }
    ],
    "status": true
}

Removing products

To remove a product from a watchlist, you can either use the internal ID or combine the IDs for product and refId

Request URL

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

Request parameter - using the internal ID

{
    "dataset": "product_watch",
    "filter": {
        "prdwatch_id": 123  // Internal ID of the product_watch record
    }
}

Request parameter - using refid and product details

{
    "dataset": "product_watch",
    "filter": {
        "prdwatch_refid": "pwtch61640aa665574",  // The RefID for this not yet personalized watchlist
        "fk_prdwatch_pcode": "HFYPRD0001"        // Pcode for the product
    }
}

Response

{
    "status": true
}