ContextSuite

Product Structure in Commerce Events

The Product object is a richly detailed structure designed to capture comprehensive information about every single item involved in a commerce-related event. When you send a Commerce object as part of an event like Order Completed, it contains a products array, and each element in that array is a Product object.

Our schema significantly extends standard e-commerce tracking specifications. It's designed to capture not just what was sold, but also crucial supply chain, classification, and contextual details. This depth is the key to unlocking powerful analytics, from real-time dashboarding to predictive modeling.

A key concept to understand is the relationship between the line items in the products array and the header-level fields in the parent Commerce object. Properties like commerce.revenue, commerce.tax, and commerce.discount are typically the sum or aggregation of the corresponding values (unit_price, tax_percentage, discount_percentage) from every Product object in the list. This provides both a high-level summary and granular, item-level detail in a single event.


Product Properties

The properties of a Product object are grouped into logical sections.

Entry & Ordering Information

This group defines why the product is included in the event and its position within a list, such as on a receipt or in a shopping cart.

PropertyDescriptionProvided By
entry_typeThe reason the product is included (e.g., Purchased Item, Returned, View Item).User-Provided
positionThe product's position in a list or cart, starting from 1.User-Provided (Optional)
line_idA unique identifier for this specific line item in the transaction.User-Provided (Optional)

Product Identification

These are the universal and store-specific identifiers that uniquely define the product. Providing at least one is crucial for linking event data to your product catalog.

PropertyDescriptionProvided By
product_idThe internal database ID for the product.User-Provided
entity_gidThe Context Suite Graph ID (GID) for the product, if it exists.User-Provided (Optional)
skuThe Stock Keeping Unit, a store-native identifier.User-Provided (Optional)
barcodeThe product's barcode value.User-Provided (Optional)
gtinThe Global Trade Item Number.User-Provided (Optional)
upcThe Universal Product Code.User-Provided (Optional)
eanThe International Article Number (European Article Number).User-Provided (Optional)
isbnThe International Standard Book Number, for books.User-Provided (Optional)
serial_numberThe unique serial number for this specific unit.User-Provided (Optional)
supplier_numberThe product number used by the supplier.User-Provided (Optional)

Product Details

This section captures descriptive attributes of the product.

PropertyDescriptionProvided By
productThe name of the product.User-Provided
variantThe specific variant of the product (e.g., "Large", "Red").User-Provided (Optional)
brandThe brand associated with the product (e.g., "Acme").User-Provided (Optional)
core_productThe fundamental product, stripped of brand and variant (e.g., "Spaghetti").User-Provided (Optional)
conditionThe condition of the product (e.g., "New", "Used", "Fresh").User-Provided (Optional)
sizeThe size of the product.User-Provided (Optional)
packagingThe packaging type (e.g., "Box", "Bottle").User-Provided (Optional)
originThe country or region of origin.User-Provided (Optional)
bundleThe name of the bundle this product is a part of.User-Provided (Optional)

Product Classification

Classification is one of the most powerful extensions. Properly categorizing products allows for sophisticated segmentation and analysis in our ready-made dashboards. This includes standard categories as well as the GS1 global standard.

PropertyDescriptionProvided By
main_categoryThe top-level category of the product (e.g., "Electronics").User-Provided
categoryThe name of the sub-category (e.g., "Smartphones").User-Provided (Optional)
gs1_brickThe GS1 Brick classification name.User-Provided (Optional)
gs1_classThe GS1 Class name.User-Provided (Optional)
gs1_familyThe GS1 Family name.User-Provided (Optional)
gs1_segmentThe GS1 Segment name.User-Provided (Optional)

Timed Events and Tickets

For non-physical goods like services, rentals, or travel tickets, these properties define the time-based aspects.

PropertyDescriptionProvided By
startsThe start date/time for the service or event.User-Provided (Optional)
endsThe end date/time for the service or event.User-Provided (Optional)
durationThe duration in minutes.User-Provided (Optional)
destinationThe destination for a travel-related product.User-Provided (Optional)
seatsSeat assignments for a ticketed event.User-Provided (Optional)

Supply Chain

Tracking supply chain information directly on the event provides deep insights into manufacturer performance and supplier relationships.

PropertyDescriptionProvided By
supplierThe name of the product's supplier.User-Provided (Optional)
manufacturerThe name of the product's manufacturer.User-Provided (Optional)
product_mgrThe name of the internal product manager responsible for the item.User-Provided (Optional)

Purchase Details

This section contains all financial and transactional details for the specific line item.

PropertyDescriptionProvided By
unitsThe number of units purchased. Defaults to 1.User-Provided
unit_priceThe price of a single unit of the product.User-Provided
unit_costThe cost of a single unit of the product (COGS).User-Provided (Optional)
uomThe Unit of Measure (e.g., "kg", "lbs", "item").User-Provided (Optional)
tax_percentageThe total tax percentage applied to this line item.User-Provided (Optional)
discount_percentageThe discount percentage applied to this line item.User-Provided (Optional)
couponA coupon code applied specifically to this product.User-Provided (Optional)

Contextual Flags & URLs

These properties add final contextual details about the product in the event.

PropertyDescriptionProvided By
urlThe direct URL to the product's page.User-Provided (Optional)
img_urlThe URL for the product's primary image.User-Provided (Optional)
dwell_time_msThe time in milliseconds the product was in the user's viewport.Auto-Populated

Unlocking Advanced Analytics

Consistently and accurately populating the Product structure is not just about data collection; it's about enabling intelligence. When you provide rich data, especially for identification and classification, you immediately unlock:

  • Ready-Made Dashboards: Our platform automatically recognizes your data, populating dashboards for sales performance, category analysis, and brand comparisons without any configuration.
  • Basket Analysis: Understand which products are frequently purchased together, informing bundling, cross-selling, and store layout strategies.
  • Predictive Projections: Rich historical data fuels machine learning models for demand forecasting, inventory management, and customer lifetime value (CLV) predictions.

Example: Order Completed Event

Here is an extensive example of a jitsu.track call for an Order Completed event, showcasing how to populate the commerce and products structures for a mixed cart containing a physical good, a discounted item, and a service.

JavaScript
javascript
1jitsu.track('Order Completed', {
2  commerce: {
3    order_id: 'd9f80703-a8d8-44d4-9844-599a3a7f618a',
4    affiliation: 'Main Street Store',
5    revenue: 1069.89, // 999.99 + (99.99 * 0.8) + 0 - 10 (coupon)
6    tax: 85.59,
7    discount: 20.00,
8    coupon: 'SUMMER10',
9    currency: 'USD',
10    payment_type: 'Card',
11    payment_sub_type: 'Visa',
12    products: [
13      // Item 1: A standard physical good
14      {
15        entry_type: 'Purchased Item',
16        position: 1,
17        product_id: 'PROD-112233',
18        sku: 'ACME-TV-4K-55',
19        product: 'Acme 55" 4K Smart TV',
20        brand: 'Acme',
21        main_category: 'Electronics',
22        category: 'Televisions',
23        gs1_brick: 'TV/Video Display Units',
24        supplier: 'Electronics Distribution Inc.',
25        units: 1,
26        unit_price: 999.99,
27        unit_cost: 649.99,
28        url: 'https://example.com/products/acme-tv-4k-55'
29      },
30      // Item 2: A discounted accessory
31      {
32        entry_type: 'Purchased Item',
33        position: 2,
34        product_id: 'PROD-445566',
35        sku: 'ACME-SND-21',
36        product: 'Acme 2.1 Soundbar',
37        brand: 'Acme',
38        main_category: 'Electronics',
39        category: 'Home Audio',
40        units: 1,
41        unit_price: 99.99,
42        discount_percentage: 20.0, // 20% off
43        line_discounted: true
44      },
45      // Item 3: A service (installation)
46      {
47        entry_type: 'Purchased Item',
48        position: 3,
49        product_id: 'SVC-998877',
50        sku: 'SVC-TV-INSTALL',
51        product: 'Premium TV Installation Service',
52        main_category: 'Services',
53        category: 'Home Services',
54        units: 1,
55        unit_price: 0.00, // Included with TV promotion
56        starts: '2025-07-25T14:00:00Z',
57        ends: '2025-07-25T16:00:00Z',
58        duration: 120
59      }
60    ]
61  }
62});