Skip to main content
RichRelevance

Streaming Property Service

Introduction

The streaming-property service is leveraged to define property definitions  for a specific item type. A group of property definitions for one item type is called a property definition collection.    Published property definition collections are required to be associated to a snapshot.

Currently there are four item types: product, category, region and reference content.    Each item type can have different property definitions.  These property definitions represent the attributes of an item type. 

For more information on creating and managing the property definition collection go to Property Definition Collection.

Types of Property Definitions

In a property definition collection, there are three types of property definitions:

  1. Canonical properties:  Pre-defined property definitions
    • Some are required by RichRelevance products.
    • It is recommended not to alter canonical properties as Rich Relevance applications require them.
      • However, search attributes can be altered - example "storable" can be changed to true or false.
      • propertyValueStyle can also be modified.
  2. Derived properties:   
    • Reserved names which cannot be used for custom property definitions
    • Derived properties are populated by Rich Relevance applications and not the customer.
      • Cannot be used when ingesting products.
  3. Custom properties:
    • Client defined

Canonical and derived property definitions are pre-defined and are automatically created when the property definition collection is created.  The only elements in a canonical or derived property definition that can be modified are:

  • findAttributeSettings 
    • Find search attributes.  
  • propertyValueStyle
  • scopedActionSettings 
    • For Scoped Actions - the property with this element limits a scoped action to a set based on the value of the property. It is ususally used with custom property definitions

If other elements in a canonical property are modified, such as canonicalName, the property definition collection will fail when updated.  Also a derived property cannot be used when ingesting products, they are reserved for RichRelevance products to use. 

It is recommended not to remove any canonical properties as each Rich Relevance product requires specific properties.

  • Recommend requires the following properties:  product_id, name, image_url, link_url, price and recommendable.
  • Please note that 'Image_url' is a required canonical property which needs to be ingested. For customers who don't have images, please have this field populated with a dummy ID. 
  •  Find:  if the image_url is not populated in a product, then by default those products will not be returned in the result set.  A work-around is to use the "fl" (field list) parameter and not include the image_url.  Products will then be returned even if they don't have an image_url. 
    • Find ignores the "recommendable" property

Below is an example of the canonical property definition for rating:


 "rating": {
            "canonicalName": "product_rating",
            "dataType": "float",
            "origin": "canonical",
            "propertyValueStyle": "baseOnly",
            "required": false,
            "findAttributeSettings": {
                "facetable": true,
                "storable": true,
                "searchable": true,
                "filterable": true,
                "sortable": false,
                "regionAware": false
            }
          }

Custom property definitions need to be provided if specific attributes are required for an item.  For example, if a product has an attribute called "promotion", then this attribute needs to be defined in the property definition collection before ingesting the product.   If an attribute is not defined in the property definition collection, the ingested product will fail. 

Property definitions collections are required to create a snapshot, and catalog items can only be ingested once a snapshot is created. 

Product snapshot - requires both product and category property definition collections

Place snapshot - requires the region property definition collection. 

FIND Specific Requirements

The search attribute settings (findAttributeSettings) must be set in the product definition collection. They are only required in the product definition collection and not other property definition collections. 

NOTE: The Streaming Catalog does not leverage the current Portal Search Attributes when setting up the index. By default only the canonical attributes are initially displayed in the Portal Search Attributes.  However, attributes that are searchable are still required in the Portal Search Attributes in order to be able to include them the search configuration (sliders).  Only the "searchable" parameter is required.  Other parameters such as "facetable" will be ignored.

If the image_url is not populated, those products will not be returned in the Find result set.  For customers who don't have images, there are two options.  The first is to provide a dummy value for the image_url.  The second is to use the "fl" parameter (field list)  and not include the image_url in the list of fields to be returned by the query.  Products will then be returned even if they don't have an image_url.  See Find API - fl parameter for more details. 

Property Definition Collections

Each property definition collection contains the property definitions for one item type (product, category,  region or referenceContent).

There are five actions for property definition collections: create, publish, clone, archive and delete.  There are four states: creating, published, archived and deleted.

Action State Note:
create* creating

Can modify.  Cannot be used with a snapshot

* Don't add "create" action to endpoint.  POST will create a new collection.

publish published

Can be used when creating a snapshot.

Can add a new property but cannot modify an existing one. 

clone creating  
archive archived Will continue to be viable for an existing snapshot but cannot be used with a new snapshot
delete* deleted

Can only delete a "creating" property definition collection.  Cannot delete a 
"published" property definition collection as it maybe associated to a snapshot.

*Don't add "delete" to endpoint. DELETE will delete the collection.

DELETE https:<host>/streaming-property/v1/<apiKey>/collection/<itemType>/<collectionId>

 

Create a new property definition collection

When a property definition collection is "created", the response will include all the canonical and derived attributes specific to the item type plus the collectionId.  It's state will be "creating".   Any property definition can be updated or new property definitions added while in the "creating" state.  Once the property definition collection is "published", existing property definitions cannot be updated but new ones can be added at any time.

Below is the syntax to create a new property definition collection.  Further details can be found in the Syntax Overview. An example API call with a full response is in the Examples section

 POST https://<host>/streaming-property/v1/<apiKey>/collections/<itemType>

Updating an existing property definition - "creating" state only

Existing property definitions can only be updated in property definition collections which are in the "creating" state.  For any update a full property definition is required.  To update either the PUT or PATCH can be used.  Below is the syntax for PATCH where one or more property definitions can be updated.

PATCH https://<host>/streaming-property/v1/<apiKey>/collections/<itemType>/<collectionId>/definitions

The example below illustrates changing a canonical property's find attributes.  In this case the facetable parameter is changed to false.  

collectionID: 123, itemType: product. 
 

PATCH https://<host>/streaming-property/v1/<apiKey>/collections/product/123/definitions

Body

{
 "brand": {
                "canonicalName": "product_brand",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 255,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            }
  }

Add a new property definition

A  new property definition can be added to a "creating" or "published" property definition collection with no restrictions.  

The most common requirement is to add a custom property.  It is the same syntax as updating a property definition.  

Modify an existing property in a "published" property definition collection

  • If changes are required, a new property definition collection can be created or the existing collection can be cloned.  The new or cloned collection will be in the “creating” state so updates can be made.
  • If the property definition was used by a snapshot, a new snapshot needs to be created to leverage the new property definition collection

Notes

Property definition collections need to be created before creating a snapshot.  Currently  "Published" property definition collections are required for all snapshot states: "creating",  "complete" or "active". All snapshots must reference the required property definition collections. 

There are separate snapshot types for product, place and referenceContent.  

  • Product snapshots require product and category property definition collections.
  • The place snapshot requires just the region property definition collection.  
  • The referenceContent snapshot requires the referenceContent property definition collection. 

Streaming-Property Syntax for Creating and Managing Property Definition Collections

 

Hosts:

Production

https://gateway.richrelevance.com/

QA

https://qa-gateway.richrelevance.com/

Staging

https://staging-gateway.richrelevance.com/

The following syntax is for creating, managing state, and getting details of a property definition collection.  

Base URL:   https://<host>/streaming-property/v1/

Full URL: https://<host>/streaming-property/v1/<apiKey>/collections/<itemType>/<collectionId>/<action>

API Endpoints

Actions Syntax
Create a property definition collection for a specific item type.  The canonical and derived properties for the item type will automatically be created.  Example for creating a product property definition collection is here.  POST {baseURL}/<apiKey>/collections/<itemType>
List all property definition collections for a given site (apiKey) GET  {baseURL}/<apiKey>/collections
List all property definition collections for a given site and item type. GET  {baseURL}/<apiKey>/collections/<itemType>
Retrieve a specific collection specified by site, itemType and collection id.  GET  {baseURL}/<apiKey>/collections/<itemType>/<collectionId>
Publish a collection.  The collection must be in “creating” state. POST {baseURL}/<apiKey>/collections/<itemType>/<collectionId>/publish
Clone a collection.  POST {baseURL}/<apiKey>/collections/<itemType>/<collectionId>/clone
Delete a collection DELETE {baseURL}/<apiKey>/collections/<itemType>/<collectionId>
Archive a collection POST {baseURL}/<apiKey>/collections/<itemType>/<collectionId>/archive

Parameters

Parameter Description Additional Information and Options
apiKey

Unique identifier for a customer's environment.  For example, if a customer has multiple environments in production or staging, each would have a unique apiKey.  There can be many apiKeys associated to a client_ID. 

Provided by RR to customer
collectionId Unique identifier for the property definition collection. collectionId is provided in the response to a POST when creating the collection.  It is the "id" in the response.
name Name of the property definition collection Currently the name is the same as the id.  There are plans to allow a customer to create a custom name (string, 255 characters). 
itemType The item type for this property definition collection.

Supported item types:  product, category, region and referenceContent

 

 

state Three states: creating, published and archived.  When a collection is initially created using POST, the state is “creating”.  When using the POST with the “publish” parameter, the state will be “published”. Can only "publish" if the state was "creating". creating, published, archived
action Since there is not an explicit "action" for creating,  there are three action parameters:  publish,clone and archive. Clone will create a new collection based on the existing one and it’s state will be “creating” publish, clone, archive

Property Definitions 

Below are actions and syntax for managing property definitions in a property definition collection.

New property definitions and updates can only be applied to a “creating” collection.  When updating or creating,  a property definition needs to be complete. 

Property Definition Actions and Syntax

 

Base URL:   https://<host>/streaming-property/v1/

'Authorization:Bearer <tokenValue>’

Full URL:   https://<host>/streaming-property/v1/<apiKey>/collections/<itemType>/<collectionId>/definitions

'Authorization:Bearer <tokenValue>’

 

Action Syntax

Update or Create one  property definition.

 

PUT {baseURL}/<apiKey>/collections/<itemType>/<collectionId>/definitions/<propertyName>{property definition}

Update or create more than one property definition.

Note: Any definition supplied must be complete.

PATCH {baseURL}/<apiKey>/collections/<itemType>/<collectionId>/definitions

Body

{<propertyName>{property definition}, <propertyName>{property definition}}

 

Delete one property definition from a “creating” collection only.  Currently do not support deleting multiple property definitions.  DELETE  {baseURL}/<apiKey>/collections/<itemType>/<collectionId>/definitions/<propertyName>. 

Property Definition Elements

Element Description Data Type Length limit

Optional/ Mandatory

Values
<propertyName> Name of the specific property definition. string, (case sensitive) 255 Mandatory Can be any string value. An example could be “color”. 
canonicalName Name of a canonical property. Not to be modified. It will be provided.  string, (case sensitive) 255 For Canonical properties only.   For custom property definitions this value is not required.
dataType

The data type of the property definition. 

Data types with the suffix of "list" refers to the cardinality which means it supports multi-values.

Note: There is no need to supply “cardinality” with the Streaming Catalog which was formerly required with the feed.

 

string (case sensitive)   Mandatory

"boolean", "booleanList", "date". "dateList", "datetime",  "datetimeList", "double", "doubleList", "float", "floatList", "int", "intList", "long", "longList", "price", "priceList" "string", "stringList"

 

Further details on Dates can be found below after this section. 

origin Defines the origin which can be canonical, derived or custom.  string (case sensitive)   Default is "custom" for new property definitions

"canonical" - pre-defined property

Default: "custom" - client-defined

"derived" - system generated attributes. Also pre-defined.

propertyValueStyle See below for detailed explanation. string   Optional

Default: "baseOnly"

"fullyCoveredOverride", "overrideWithDefault"

findAttributeSettings Search attribute settings are required for Find. This element is only set for product property definitions. It will use the existing validation rules which are explained below.  Boolean for each attribute   Optional “facetable”: false,
“storable”: false,
“searchable”: true,
“filterable”: false,
“sortable”: false,
“regionAware”: false
scopedActionSettings Required to determine the set of products to be updated and deleted in a scoped action.   Only one property definition can be used in a Scoped Action.  Boolean (propertyMatch)   Optional

{"scopedActionSettings" :           {"propertyMatch”: true}

   }
 

If not provided, default is false.

Can have multiple property definitions with this parameter but only one can be used with a scoped action at one time.

required Defines whether or not a value is required for a given Property.  Currently should be set to "false". boolean   Optional

Default: false

true

lengthLimit character limit for a "string" property. integer   Optional

Default: 1024 .

Max limit: 4096

 

Note: Some canonical properties will have a length limit of 255 and should not be changed. 

Date formats

  • date
    • The format for "date" is based on the short date format defined in the Portal in Admin--> Site configurations
    • In the example below, the format for November 2, 2020 would be 02/11/2020. 

Screen Shot 2020-11-02 at 10.02.49 AM.png

  • datetime
    • The format for "datetime" is based on the long date format defined in the Portal in Admin--> Site configurations.

propertyValueStyle

  • baseOnly (default) 
    • Property values with this style only appear in the base properties section, and so can be shown directly to the shopper. Examples include physical properties, such as screen size.
  • fullyCoveredOverride
    •  Property value with this style appears only in an override section, where each override context has this value. Since there is only one value for a given override context, the value can be shown directly within its context. Examples include language text, where each language code has a translated value. Base values of this property are ignored.
    • NOTE:  Currently the Catalog in the Portal requires a base value for an attribute.  It is recommended to add a base value (such as the “english” value). Find will still use the over-ride values and not the base value.  
  • overrideWithDefault
    • Properties with this value style include overrides for some override contexts, but not all, and also have an default value in the base properties section. With this style, all the property values have to be considered before any value can be shown to the shopper. Examples include properties that vary by region, such as availability. Due to the data optimization, any unchanged property value only propagates when the force flag is true, so either all values have to be updated in all contexts plus the base with force = true, or the consuming application has to retrieve the full item from the long term item store before applying any update when force = false.

 

Search Attribute Validation Rules

The following are search attribute validation rules.

  • Sortable
    • Multi-value attributes are not sortable.   This would apply to any property definition with a dataType with the "list" suffix.  Such as "stringList"
    • Only single value attributes may be sortable
  • Product_external_id and content_external_id: 
    • must be filterable and storable  
  • product_region_id:
    • is a derived property used internally where "storable" will always be "false".  Even if it is changed to "true", Find will not return it in a result set.  
  • Image attributes:
    • must be storable.  
  • Any facetable attribute must be filterable   

Example 1: Find Search Attributes

Example of adding property definitions with the findAttributeSettings

  • This example add or updates named definitions to collection 123 of item type "product"

collectionId: 123

apiKey: 1234


PATCH https://<host>/streaming-property/v1/1234/collections/product/123/definitions
“myProperty1”: {
  “dataType”: “string”,
  “origin”: “custom”,
  “propertyValueStyle”: “baseOnly”,
  “required”: false,
  “findAttributeSettings”: {
       “facetable”: false,
       “storable”: false,
       “searchable”: true,
       “filterable”: false,
       “sortable”: false,
       “regionAware”: false
           }
  },
“myProperty2”: {
 “dataType”: “string”,
 “origin”: “custom”,
 “propertyValueStyle”: “baseOnly”,
 “required”: false,
 “findAttributeSettings”: {
      “facetable”: false,
      “storable”: false,
     “searchable”: true,
     “filterable”: false,
      “sortable”: false,
      “regionAware”: false
       }
 }
 

Example 2:  Custom property definition "size"

Example of a custom property definition called "size"

Note:  The canonicalName is not required.  Origin needs to be “custom”

size":{
"dataType":"string","
"origin":"custom",
  "required":false“,
"findAttributeSettings”: {
      “facetable”: true,
      “storable”: true
     “searchable”: true,
     “filterable”: true,
      “sortable”: true,
      “regionAware”: false
       }
}

 

Steps to create a Property Definition Collection

The following is a step by step summary with examples to create property definition collections for a product snapshot.   The states are important to consider when associating to snapshots.  

Product snapshot requires both published product and category property definition collections

Place snapshot requires a published region property definition collection.

Summary of steps

1. Create a new product definition collection (POST)  - state: "creating" 

  • A new product definition with a state of "creating" is created
  • The response will include all pre-defined canonical and derived properties
  • The response also includes the collectionId
  • Example of "Post" call and response is below

2. Modify and add custom product property definitions for the "creating" product property definition collection (PUT/PATCH)

  • For pre-defined canonical property definitions can only modify:
    • search attributes (under the findAttributeSettings)

    • propertyValueStyle

    • scopedAction

  • Add and modify any custom property definitions

3. Review changes (GET)

4. Repeat steps 2 and 3 until satisfied with the product property definition collection

5. Create a category property definition collection following the same steps above (steps 2 and 3)

6.  "Publish" both the product and category property definition collections - state: "published"

7. The published property definition collections are ready to be associated to a snapshot.

Examples

The following are examples of creating and managing a product property definition collection.

1. Create the Property Definition Collection for a Product Snapshot

Below is the API call to create a product property definition collection. 

 POST  https://gateway.richrelevance.com/streaming-property/v1/<apiKey>/collections/product
 
 'Authorization:Bearer <tokenValue>’

Response: Property definition collection id is returned with state, and all the pre-defined canonical and derived property definitions.

The tracking ID can be found at the end of the response under "statusTracker"

{
    "propertyDefinitionCollection": {
        "id": 11374,
        "name": "11374",
        "itemType": "product",
        "state": "creating",
        "definitions": {
            "end_date": {
                "canonicalName": "product_end_date",
                "dataType": "date",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": false,
                    "searchable": false,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "list_price_max": {
                "canonicalName": "product_price_range_max_cents",
                "dataType": "price",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false
            },
            "product_region_id": {
                "dataType": "longList",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": false,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "rating": {
                "canonicalName": "product_rating",
                "dataType": "float",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": true,
                    "regionAware": false
                }
            },
            "description": {
                "canonicalName": "product_description",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 1024,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": false,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "in_stock": {
                "canonicalName": "in_stock",
                "dataType": "boolean",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": false,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": true
                }
            },
            "product_category_id": {
                "dataType": "longList",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": false,
                    "searchable": false,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "product_effectiveprice_cents": {
                "dataType": "price",
                "origin": "derived",
                "propertyValueStyle": "overrideWithDefault",
                "required": false,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": false,
                    "filterable": true,
                    "sortable": true,
                    "regionAware": true
                }
            },
            "product_category_name": {
                "dataType": "stringList",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 1024,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "price": {
                "canonicalName": "product_pricecents",
                "dataType": "price",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": false,
                    "filterable": true,
                    "sortable": true,
                    "regionAware": true
                }
            },
            "product_id": {
                "dataType": "long",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "product_sku_id": {
                "dataType": "string",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 1024,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": false,
                    "searchable": false,
                    "filterable": false,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "link_url": {
                "canonicalName": "product_link_id",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 255,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": false,
                    "filterable": false,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "findable": {
                "canonicalName": "product_findable",
                "dataType": "boolean",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false
            },
            "price_description": {
                "canonicalName": "price_description",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 1024
            },
            "brand": {
                "canonicalName": "product_brand",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 255,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "start_date": {
                "canonicalName": "product_release_date",
                "dataType": "date",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": false,
                    "searchable": false,
                    "filterable": true,
                    "sortable": true,
                    "regionAware": false
                }
            },
            "sale_price_min": {
                "canonicalName": "product_sale_price_range_min_cents",
                "dataType": "price",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false
            },
            "recommendable": {
                "canonicalName": "product_recommendable",
                "dataType": "boolean",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false
            },
            "margin": {
                "canonicalName": "margin",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 50
            },
            "image_url": {
                "canonicalName": "product_image_id",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 255,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": false,
                    "filterable": false,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "sale_price": {
                "canonicalName": "product_saleprice_cents",
                "dataType": "price",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": false,
                    "filterable": true,
                    "sortable": true,
                    "regionAware": true
                }
            },
            "sale_price_max": {
                "canonicalName": "product_sale_price_range_max_cents",
                "dataType": "price",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false
            },
            "list_price_min": {
                "canonicalName": "product_price_range_min_cents",
                "dataType": "price",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false
            },
            "name": {
                "canonicalName": "product_name",
                "dataType": "string",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 255,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": false,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "num_reviews": {
                "canonicalName": "product_num_reviews",
                "dataType": "int",
                "origin": "canonical",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "product_category_external_id": {
                "dataType": "stringList",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 1024,
                "findAttributeSettings": {
                    "facetable": true,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            },
            "product_external_id": {
                "dataType": "string",
                "origin": "derived",
                "propertyValueStyle": "baseOnly",
                "required": false,
                "lengthLimit": 1024,
                "findAttributeSettings": {
                    "facetable": false,
                    "storable": true,
                    "searchable": true,
                    "filterable": true,
                    "sortable": false,
                    "regionAware": false
                }
            }
        }
    },
    "statusTracker": {
        "trackingId": "7f39730a-5fd7-11ea-9cb2-fdac9789e86e",
        "trackingInstant": "2020-03-06T18:22:54.530023400Z"
    }
} 
 

 

 

2. Add Custom Property Definitions or Update existing Property Definitions in a Product Property Definition Collection

 

It is possible to add a new custom property definition to a "creating" or "published" property definition.  

To modify an existing property definition, this can only be done in a "creating" collection and not a "published" property definition.

 

In the example below, we will add new property to a published property definition.

 

collectionID: 26660

PUT http://gateway.richrelevance.com/streaming-property/v1/<apiKey>/collections/product/11374/definitions/size: 
'Authorization:Bearer <tokenValue>’

Body:
{"dataType":"string","origin":"custom","required":false, 
"findAttributeSettings": {"facetable": true,"storable": true, "searchable": true,"filterable": true, "sortable": false,"regionAware": false}}

 

Response: A trackingID is returned along with the all the properties in the collection include the new property.  At the end of the response there is a summary of new, updated and deleted properties for this specific collection.  The snapshot is also referenced as a property definition collection can belong to multiple snapshots. 

{
    "statusTracker": {
        "trackingInstant": "2020-11-05T00:39:18.285025200Z",
        "trackingId": "56923ccc-1eff-11eb-88ad-1b7e642befe5"
    },
    "data": {
        "siteId": 608,
        "collection": {
            "id": 26660,
            "name": "26660",
            "itemType": "product",
            "state": "published",
            "definitions": {
                "end_date": {
                    "canonicalName": "product_end_date",
                    "dataType": "date",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": false,
                        "searchable": false,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "list_price_max": {
                    "canonicalName": "product_price_range_max_cents",
                    "dataType": "price",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false
                },
                "product_region_id": {
                    "dataType": "longList",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": false,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "rating": {
                    "canonicalName": "product_rating",
                    "dataType": "float",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": true,
                        "regionAware": false
                    }
                },
                "description": {
                    "canonicalName": "product_description",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": true,
                        "filterable": false,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "in_stock": {
                    "canonicalName": "in_stock",
                    "dataType": "boolean",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": false,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": true
                    }
                },
                "product_category_id": {
                    "dataType": "longList",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": false,
                        "searchable": false,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "product_effectiveprice_cents": {
                    "dataType": "price",
                    "origin": "derived",
                    "propertyValueStyle": "overrideWithDefault",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": false,
                        "filterable": true,
                        "sortable": true,
                        "regionAware": true
                    }
                },
                "product_category_name": {
                    "dataType": "stringList",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "price": {
                    "canonicalName": "product_pricecents",
                    "dataType": "price",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": false,
                        "filterable": true,
                        "sortable": true,
                        "regionAware": true
                    }
                },
                "product_id": {
                    "dataType": "long",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "product_sku_id": {
                    "dataType": "string",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": false,
                        "searchable": false,
                        "filterable": false,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "link_url": {
                    "canonicalName": "product_link_id",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 255,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": false,
                        "filterable": false,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "findable": {
                    "canonicalName": "product_findable",
                    "dataType": "boolean",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false
                },
                "price_description": {
                    "canonicalName": "price_description",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024
                },
                "brand": {
                    "canonicalName": "product_brand",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 255,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "start_date": {
                    "canonicalName": "product_release_date",
                    "dataType": "date",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": false,
                        "searchable": false,
                        "filterable": true,
                        "sortable": true,
                        "regionAware": false
                    }
                },
                "sale_price_min": {
                    "canonicalName": "product_sale_price_range_min_cents",
                    "dataType": "price",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false
                },
                "recommendable": {
                    "canonicalName": "product_recommendable",
                    "dataType": "boolean",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false
                },
                "margin": {
                    "canonicalName": "margin",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 50
                },
                "image_url": {
                    "canonicalName": "product_image_id",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 255,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": false,
                        "filterable": false,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "store": {
                    "dataType": "string",
                    "origin": "custom",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "scopedActionSettings": {
                        "propertyMatch": true
                    }
                },
                "sale_price": {
                    "canonicalName": "product_saleprice_cents",
                    "dataType": "price",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": false,
                        "filterable": true,
                        "sortable": true,
                        "regionAware": true
                    }
                },
                "marce": {
                    "dataType": "string",
                    "origin": "custom",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    },
                    "scopedActionSettings": {
                        "propertyMatch": true
                    }
                },
                "sale_price_max": {
                    "canonicalName": "product_sale_price_range_max_cents",
                    "dataType": "price",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false
                },
                "list_price_min": {
                    "canonicalName": "product_price_range_min_cents",
                    "dataType": "price",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false
                },
                "name": {
                    "canonicalName": "product_name",
                    "dataType": "string",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 255,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": true,
                        "filterable": false,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "num_reviews": {
                    "canonicalName": "product_num_reviews",
                    "dataType": "int",
                    "origin": "canonical",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "size": {
                    "dataType": "string",
                    "origin": "custom",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "product_category_external_id": {
                    "dataType": "stringList",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": true,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                },
                "product_external_id": {
                    "dataType": "string",
                    "origin": "derived",
                    "propertyValueStyle": "baseOnly",
                    "required": false,
                    "lengthLimit": 1024,
                    "findAttributeSettings": {
                        "facetable": false,
                        "storable": true,
                        "searchable": true,
                        "filterable": true,
                        "sortable": false,
                        "regionAware": false
                    }
                }
            }
        },
        "snapshots": {
            "9758": "product"
        },
        "added": [
            "size"
        ],
        "updated": [],
        "removed": []
    }
}

Use the trackingID to check the status as below.

https://<host>/streaming-status/v1/<apiKey>/trackingId/cfe4b2ca-1efe-11eb-88ad-175aaa904061
'Authorization:Bearer <tokenValue>’


Response from status service:

[
    {
        "siteId": 608,
        "snapshotId": 9758,
        "statusId": "d0011401-1efe-11eb-9930-391743bf3b81",
        "trackingId": "cfe4b2ca-1efe-11eb-88ad-175aaa904061",
        "source": "streaming-engine",
        "statusType": "PropertyChangeEvent",
        "message": "PropertyChangeEvent",
        "kafkaSource": {
            "topic": "streaming.engine.in",
            "partition": 7,
            "offset": 331406
        },
        "level": "SUMMARY",
        "statusData": {},
        "datacenter": "qa",
        "trackingInstant": "2020-11-05T00:35:32.333025Z",
        "statusInstant": "2020-11-05T00:35:32.519014500Z",
        "msSinceRequest": 186
    },
    {
        "siteId": 608,
        "snapshotId": 9758,
        "statusId": "cff5c9cb-1efe-11eb-88ad-bfc931fca502",
        "trackingId": "cfe4b2ca-1efe-11eb-88ad-175aaa904061",
        "source": "streaming-property",
        "statusType": "PropertyChangeEvent",
        "message": "PropertyChangeEvent for site: 608, snapshot: (PRODUCT:9758), collection: (PRODUCT:26660)\n added: [size]\n updated: []\n removed: []",
        "level": "SUMMARY",
        "statusData": {},
        "datacenter": "qa",
        "trackingInstant": "2020-11-05T00:35:32.333025Z",
        "statusInstant": "2020-11-05T00:35:32.445025100Z",
        "msSinceRequest": 112
    }
]

d

  • Was this article helpful?