ProductRecord

  • product_id
    Type: string · Product Id
    min length:  
    1
    max length:  
    512
    required

    The unique identifier for this product. The Id can be in any format you use in your product database (e.g. the product's SKU, UPC, or UUID or serial number). We will use this Id to track how users interact with products and content in the Interactions records you upload to Miso. It is important to keep the Id consistent between two datasets. For products that have multiple variants, you should have a unique product_id for each variant, and use product_group_id to group them together.

    For example, for a T-shirt with SKU 123ABC that comes in 4 sizes: S, M, L, XL, we should create four different products:

    { 
      "product_id": "123ABC-S",
      "product_group_id" "123ABC"
    }
    { 
      "product_id": "123ABC-M",
      "product_group_id" "123ABC"
    }
    { 
      "product_id": "123ABC-L",
      "product_group_id" "123ABC"
    }
    { 
      "product_id": "123ABC-XL",
      "product_group_id" "123ABC"
    }
    
    • Constraints
      • Can't contain ,
      • Can't start with _
      • Length <= 512
  • anchors
    Type: array string[] · Anchors

    The anchor texts paragraphs in the content. This usually corresponds to <a> tags in HTML. This field need to be an array of strings

  • authors
    Type: array string[] · Authors

    The author(s) of the product or content asset. This field needs to be an array of strings.

  • availability
    Type: string · Availabilityenum

    The availability of the product. Miso mainly uses availability to filter OUT_OF_STOCK items out of its recommendations. As a default, we assume the product is IN_STOCK.

    values
    • IN_STOCK
    • OUT_OF_STOCK
    • PRE_ORDER
  • brand
    Type: string · Brand

    The brand of the product.

  • categories
    Type: array array string[][] · Categories

    In Miso, you describe a product or content category as a hierarchical list of strings from broad to narrow, called a category. (See the category_page_view interaction.)

    Use the categories field of products to specify the hierarchical category or categories that the product belongs to. A product may belong to only a single category, or multiple.

    For example, a product could be in both:

    • Toys & Games > Toys > Dolls, Playsets & Toy Figures > Stuffed Animals, and
    • Arts & Entertainment > Hobbies & Creative Arts > Collectibles.

    This field should be a list of a list of strings, where category levels go from broad to narrow, such as:

    {"categories":
        [
            // the first category the product belongs to
            ["TOYS & GAMES", "TOYS", "DOLLS, PLAYSETS & TOY FIGURES", "STUFFED ANIMALS"],
            // the second category the product belongs to
            ["ARTS & ENTERTAINMENT", "HOBBIES & CREATIVE ARTS", "COLLECTIBLES"]
        ]
    }
    

    If your product taxonomy has only one single level, that is not an issue:

    {"categories":
        [
            // the first category the product belongs to
            ["Toys"],
            // the second category the product belongs to
            ["Collectibles"]
        ]
    }
    

    The categories are optional, but very important for profiling the products and tracking users' preferences. (See also the category_page_view interaction)

  • children
    Type: array object[] · Children

    Children objects of the product, such as chapters of a book, or sections of a podcast. Children are only useful for long-form contents, and are only used for snippet extraction purpose.

    • id
      Type: string · Id
      required
    • custom_attributes
      Type: object · Custom Attributes
    • description
      Type: string · Description
    • headers
      Type: array string[] · Headers
    • html
      Type: string · Html
    • title
      Type: string · Title
    • url
      Type: string · Url
  • collections
    Type: array string[] · Collections

    The collection(s) the product belongs to.

  • color
    Type: string · Color

    The color of the products. Similarly to size, when color of the products matters, it is recommended to create one product for each color variant of a product. When Miso generate search or recommendation results, we use the product_group_id to remove variants of the same product, and only show the variant that the user is most likely to buy.

  • condition
    Type: string · Conditionenum

    The condition of the product. By default, we assume condition= NEW

    values
    • NEW
    • USED
    • REFURBISHED
  • cover_image
    Type: string · Cover Image
    min length:  
    1
    max length:  
    65536
    Format: uri

    The URL of the cover image of the product. This is for displaying the product in your Dojo Sandboxes and is not used for Engine training. It is optional, but strongly recommended for a better Sandbox experience.

  • created_at

    The time when the product was first created or became available on your site as an ISO-8601 date or datetime string.

    • Type: string · Created AtFormat: date-time

      The time when the product was first created or became available on your site as an ISO-8601 date or datetime string.

  • custom_attributes
    Type: object · Custom Attributes

    Dictionary of custom attributes for the product. You can specify attributes specific to your business in a {"KEY":VALUE} format, where KEY must be a string, and VALUE can be:

    • a bool
    • a string or an array of string
    • a number or an array of numbers
    • an array of objects
    • null

    For example, a video streaming site using Miso may have the movie Jumanji with the following custom attributes:

    {
      "custom_attributes": {
        "cast": [
          "Robin Williams", "Jonathan Hyde", ...
        ],
        "director": "Joe Johnston",
        "genres": [
          "Adventure", "Fantasy", "Family"
        ],
        "filming_locations": [
           {"country": "USA", "state": "New Hampshire", "city": "Keene"},
           {"country": "Canada", "state": "British Columbia", "city": "Vancouver"}
        ],
        "popularity": 7.439,
        "adult": false
      }
    }
    

    The custom attribute types need to be consistent across every record in the dataset. For instance, in the example above, the cast attribute needs to be a string or an array of string or null for every record in the dataset that specify cast attribute.

    Similarly, the popularity attribute needs to be a number, an array of numbers, or null for every record in the dataset that specifies the popularity attribute. If you try to insert a record with an incompatible data type, the insertion for that record will fail.

    • propertyName
      • Type: boolean
  • description
    Type: string · Description

    The description text of the product. Use it when you do not have HTML; otherwise prefer html, which also carries the structure of the document.

    Miso assumes description holds longer text than the other string fields. For example, term frequency matters more here than in a field such as the title. A plain-spoken, detailed description gives Miso's semantic understanding more to work with.

  • enable_question_answering
    Type: boolean · Enable Question Answering

    Whether to enable question answering capability against the html field.

  • headers
    Type: array string[] · Headers

    The headers in the content. This usually corresponds to <h1>, <h2>, <h3> ... tags in HTML. This field need to be an array of strings

  • html
    Type: string · Html

    The HTML content of the product, and the preferred field for the body text.

    Miso searches this field and applies semantic understanding to it, in the same way as description. It also reads the tags to understand the structure of the document — where a heading starts a section, what belongs to one paragraph, and what is a list or a table. That structure helps Miso find the passage that answers a question.

    Send html when you have it. Send description when plain text is all you hold. There is no need to send the same body in both.

  • language
    Type: string · Language
    min length:  
    2

    The language of the product description and content in two-letter ISO 639-1 code. For example, English = en, Chinese = zh. Miso will use this field to determine the proper way to index the product description. If this field is not specified, we will determine the language automatically.

    We also use the language field to determine users’ interests in content of different languages. This is particularly important for content media sites that have different languages of content.

  • location

    The location information of the product (e.g. for hotels or restaurants). We support geolocation filtering and sorting when creating search and recommendation results if location information is given.

    • Type: array object[] · Location

      The location information of the product (e.g. for hotels or restaurants). We support geolocation filtering and sorting when creating search and recommendation results if location information is given.

  • margin
    Type: number · Margin

    The margin of the product. Note that for our margin optimization algorithm to work, the margin you specify here does not need to be the actual dollar amount, but it needs to be something in proportion to that.

    • Constraints:
      • Need to be a number, but no constraint on the range of the number
  • material
    Type: string · Material

    The material of the products. Similarly to size and color, if material of the product matters and there are multiple material variants, we should create one product for each material variant. When Miso generates search or recommendation results, we use the product_group_id to remove variants of the same product, and only show the variant that the user is most likely to buy.

  • original_price
    Type: number · Original Price

    The (original) price of the product. We only use this number to calculate the amount of discount, and use that to profile user behaviors.

    • Constraints:
      • Need to be a number, but no constraint on the range of the number
  • paragraphs
    Type: array string[] · Paragraphs

    The text paragraphs in the content. This usually corresponds to <p> tags in HTML. This field need to be an array of strings

  • parent_id
    Type: string · Parent Id

    The parent_id is used to declare a parent-child relationship between two "Products". Such relationships are common in marketplaces and content media sites with user generated contents. For example, an E-commerce marketplace (such as E-bay or Amazon) may have "Shops" (as parents) and "Merchandises" (as children), and a social streaming site, such as YouTube, may have "Channel" (as parents) and "Video" (as children). In these sites, both entities can be modeled as "Products", and can both be returned in Search and Recommendation APIs.

    Declaring the parent-child relationships allows Miso to automatically propagate interactions from one product to the other. For example, when a user "watch" a Video, Miso will propagate this signal to the Channel which publishes this Video, even if users do not directly interact with the Channel page. Such implicit interactions are particularly useful when making recommendations for Channel because it gives Miso much more information about users' interests to different Channels than solely relying on users' direct interactions with the them, which happens less often.

    parent_id needs to be a non-empty string referring to the product_id of the parent product. The parent product can be uploaded in a separate batch, and does not need to exist before its children products.

    The implicit interactions will only exist during Miso's training process, and will not show up in the Interaction dataset.

  • product_group_id
    Type: string · Product Group Id

    The product_group_id is used to prevent the same product (but a different variant) from showing multiple times in the search or recommendation results. When one product has multiple variants (for example, different sizes, colors, or materials), you should assign a unique product_id to each variant, but assign the same product_group_id to all of them. If product_group_id is not given, we default to the value of product_id.

  • published_at

    The time when the product was published as an ISO-8601 date or datetime string.

    • Type: string · Published AtFormat: date-time

      The time when the product was published as an ISO-8601 date or datetime string.

  • publishers
    Type: array string[] · Publishers

    The publisher(s) of the product or content asset. This field needs to be an array of strings.

  • rating
    Type: number · Rating

    The overall rating of the product in the range of [0, 5]. If you use a different rating scale, please convert it to the range of [0, 5].

  • related_ids
    Type: array string[] · Related Ids

    The product_id or product_group_id of other products that are related to this Product

  • sale_price
    Type: number · Sale Price

    The sale price of the product.

    • Constraints:
      • Need to be a number, but no constraint on the range of the number
  • short_description
    Type: string · Short Description

    The short_description text of the product. Miso assumes short_description contains a shorter version or a summary of the description field.

  • size
    Type: string · Size

    The size of the product. For example, for an eCommerce site that sells T-shirts, each T-shirt might come in several different sizes. In this case, we recommend that you should create one product entry for each size variant. When Miso generate search or recommendation results, we use the product_group_id to remove different variants of the same product, and only show the variant that the user is most likely to buy.

  • subtitle
    Type: string · Subtitle

    The subtitle of the product (usually for contents).

  • tags
    Type: array string[] · Tags

    The tags that have been associated with the product.

    For example:

    {"tags": ["TAG_1", "TAG_2", ...]}
    
  • title
    Type: string · Title

    The title of the product. During a search, Miso will put predictive weight behind the title, because it is often the main way users identify a product.

  • type
    Type: string · Type

    The type of product. This is for sites that have more than one type of product or content that they want their users to interact with. If your site has only one type of product, you can leave this field out. A classic example is travel sites, which have both hotel and flight sales. It is also useful for sites that let users interact with products as well as product bundles. For example, on YouTube, each video is a product that users can watch, while each channel, containing multiple videos, is also a product that users can subscribe to.

    For model quality, it is preferable to model all these distinct product types in the same data set, so that a user's interests for one type of product can inform their interests in another type of products. The type field helps Miso make these distinctions.

  • updated_at

    The time when the product was updated as an ISO-8601 date or datetime string.

    • Type: string · Updated AtFormat: date-time

      The time when the product was updated as an ISO-8601 date or datetime string.

  • url
    Type: string · Url
    min length:  
    1
    max length:  
    65536
    Format: uri

    Url to the product detail page. This is for displaying the product in your Dojo Sandboxes and is not used for Engine training. It is optional, but strongly recommended for a better Sandbox experience.