--- title: "Product" slug: "product-data-object-java-library-s2s" description: "Track products with the Java library: ID, cost, quantity, status, variant, parameters and categories via MappIntelligenceProduct." status: "update" updated: 2026-11-02T16:50:58Z published: 2026-11-02T16:50:58Z canonical: "docs.mapp.com/product-data-object-java-library-s2s" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.mapp.com/llms.txt > Use this file to discover all available pages before exploring further. # Product Mapp Intelligence enables detailed tracking of product interactions across the entire shopping journey. Each product event is assigned a **product status** that defines the context in which a product is viewed or interacted with. This allows you to analyze user behavior from the first product impression to the final purchase. --- ## Product Status The following product statuses are supported in Mapp Intelligence: | **Product Status** | **Description** | | --- | --- | | **VIEW** | Product viewed on a product detail page. | | **BASKET** | Product added to a shopping cart. | | **ADD_TO_WISHLIST** | Product added to a wishlist. | | **DELETE_FROM_WISHLIST** | Product removed from a wishlist. | | **ADD_TO_CART** | Product added to a shopping cart. | | **DELETE_FROM_CART** | Product removed from a shopping cart. | | **CHECKOUT** | Product moved to checkout. | | **CONFIRMATION** | Product purchased. | Mapp Intelligence can automatically detect **abandoned shopping carts** when products are tracked with the relevant statuses, but no purchase confirmation follows. --- ## Categories Product categories define fixed classifications for products and enable structured analysis. These groups must be configured in Mapp Q3 before being tracked via the library. Find more information [here](/v1/docs/how-to-set-up-categories). When implementing, include the **ID number** and the respective **value** as a string. The value should not exceed 255 characters; additional characters are truncated. > [!NOTE] > Note > > Categories are assigned once to a product. If a product is tracked with a category, all subsequent product calls will also be assigned to this category. Only the first tracked value will be shown. Mapp therefore recommends implementing products and categories while embedding the library. See also [How can I replace missing values ("-") in categories?](/v1/docs/how-can-i-replace-missing-values-in-categories) --- ## Parameters E-Commerce Parameters enrich tracked product data with additional website-specific information or metrics. They must be configured in Mapp Q3 before they can be tracked via the library. During setup, you define the data type (text or number) and other attributes for each parameter. Mapp Intelligence provides a range of predefined E-Commerce Parameters for common product-related use cases, such as *Product Sold Out*, *Product on Sale*, and *Category*. Alternatively, you can create custom E-Commerce Parameters to capture completely individual product information — for example, product size, color, brand, or campaign-specific attributes. For detailed setup instructions and a full overview of predefined parameters, see [How to set up custom parameters](/v1/docs/how-to-set-up-custom-parameters). --- ## Details for the Java Library - **Product status:** The statuses are constants of `MappIntelligenceProduct`, for example `MappIntelligenceProduct.CONFIRMATION`. `setStatus` only accepts the values of these constants (`view`, `add`, `del`, `checkout`, `conf`, `add-wl`, `del-wl`), so always pass the constants. A string such as `"VIEW"` or `"CONFIRMATION"` is ignored without a log entry, and the previous status is kept. The default status is `VIEW`. - **Product collections:** Pass the products in a `MappIntelligenceProductCollection` (method `add`). All products of a collection are sent in one request: the values of all products are joined with `;` in the order in which the products were added. If a product does not have a parameter or category that another product has, its value is left empty (for example `ca1=shoes;`). The values `true` and `false` are sent as `1` and `0`. - **E-Commerce Parameter IDs:** Product parameters (`cb<ID>`) share their IDs with page and event goals and with the E-Commerce Parameters of orders. The IDs 760 and 767 are used by `setSoldOut` and `setVariant`. Do not use them with `setParameter`. - **Null values:** A string setter or a `setParameter` or `setCategory` value called with `null` is not transmitted, and `add(null)` on a product collection is ignored. No exception is thrown. --- **Supported Methods** | **Method** | **Description** | **Where to configure *** | | --- | --- | --- | | **constructor** | Initializes a product object. A product ID is required and may not exceed 110 characters. | – | | **setId** | Defines the unique product identifier (e.g. SKU or article number). Required for all product measurements. | – | | **setCost** | Sets the total price of the product. “0” values are allowed. For multiple quantities, use the total price, not the unit price. | – | | **setQuantity** | Defines the quantity of the product. | – | | **setStatus** | Defines the product status. The following values are supported: - VIEW - BASKET - ADD_TO_CART - DELETE_FROM_CART - CHECKOUT - CONFIRMATION - ADD_TO_WISHLIST - DELETE_FROM_WISHLIST | – | | **setVariant** | Transmits the variant of the product, for example color or size. | EP > Product variant | | **setSoldOut** | Indicates whether the product is sold out (true) or in stock (false). | *EP > Product sold out* | | **setParameter** | Adds product-specific parameters to enrich tracking data. | *EP > Own Configuration* | | **setCategory** | Assigns a product category for structured grouping and analysis. | *PC > New Category* | * **Configuration Path Abbreviations:** - **EP** = *Mapp Q3 > Configuration > Custom Parameters > E-Commerce Parameters > Preconfigured > …* - **PC** = *Mapp Q3 > Configuration > Categorization > Product Categories > …* #### Generated request parameters | **Method** | **Request parameter** | **Constant** | | --- | --- | --- | | **constructor** / **setId** | `ba` | `PRODUCT_ID` | | **setCost** | `co` | `PRODUCT_COST` | | **setQuantity** | `qn` | `PRODUCT_QUANTITY` | | **setStatus** | `st` | `PRODUCT_STATUS` | | **setVariant** | `cb767` | `PRODUCT_VARIANT` | | **setSoldOut** | `cb760` (`1` = sold out, `0` = in stock) | `PRODUCT_SOLD_OUT` | | **setParameter** | `cb<ID>` | `CUSTOM_PRODUCT_PARAMETER` | | **setCategory** | `ca<ID>` | `CUSTOM_PRODUCT_CATEGORY` | **Methods** #### constructor ```java MappIntelligenceProduct mappProductData = new MappIntelligenceProduct(); ``` ```java /** * @param i Saves products placed in the shopping cart. This property must be entered if products are to be *          measured. A product ID may not contain more than 110 characters */ MappIntelligenceProduct mappProductData = new MappIntelligenceProduct(String i); ``` #### setId ```java /** * @param i Saves products placed in the shopping cart. This property must be entered if products are to be *          measured. A product ID may not contain more than 110 characters * * @return MappIntelligenceProduct */ mappProductData.setId(String i); ``` #### setCost ```java /** * @param c Contains the product price ("0" prices are allowed). If you transmit a product several times *          (quantity property greater than 1), use the total price not the unit price * * @return MappIntelligenceProduct */ mappProductData.setCost(double c); ``` #### setQuantity ```java /** * @param q Contains the product quantity * * @return MappIntelligenceProduct */ mappProductData.setQuantity(int q); ``` #### setStatus ```java /** * @param s Contains states of your product (VIEW, BASKET, ADD_TO_CART, DELETE_FROM_CART, *          CHECKOUT, CONFIRMATION, ADD_TO_WISHLIST, DELETE_FROM_WISHLIST) * * @return MappIntelligenceProduct */ mappProductData.setStatus(String s); ``` #### setVariant ```java /** * @param v Use this to transmit the variant of the product * * @return MappIntelligenceProduct */ mappProductData.setVariant(String v); ``` #### setSoldOut ```java /** * @param sOut Use this to transmit the product is sold out or in stock (sold out = true, in stock = false) * * @return MappIntelligenceProduct */ mappProductData.setSoldOut(boolean sOut); ``` #### setParameter ```java /** * You can use parameters to enrich analytical data with your own website-specific information and/or metrics. * * @param i ID of the parameter * @param v Value of the parameter * * @return MappIntelligenceProduct */ mappProductData.setParameter(int i, String v); ``` #### setCategory ```java /** * Product categories allow the grouping of products. * * @param i ID of the parameter * @param v Value of the parameter * * @return MappIntelligenceProduct */ mappProductData.setCategory(int i, String v); ``` **Example** ```java MappIntelligenceConfig mic = new MappIntelligenceConfig( "111111111111111", "analytics01.wt-eu02.net" ); MappIntelligenceProduct mappProductData = new MappIntelligenceProduct(); mappProductData.setId("id of a product") .setCost(19.95) .setQuantity(5) .setStatus(MappIntelligenceProduct.VIEW) .setVariant("blue") .setSoldOut(true) .setParameter(2, "parameter 2") .setParameter(15, "parameter 15") .setCategory(2, "category 2") .setCategory(15, "category 15"); MappIntelligenceProductCollection mappProductCollection = new MappIntelligenceProductCollection(); mappProductCollection.add(mappProductData); try (MappIntelligenceTracking mit = new MappIntelligenceTracking(mic)) {    mit.track((new MappIntelligenceDataMap()).product(mappProductCollection)); } ```