Skip to content

Products — Graph Reference

Public Graph nodes, fields, edges, and sets contributed by the Products app. Use these as the basis for your requires.graph declarations — see Declaring App Dependencies.

Sets

SetNode
productsasset.product
priceListsasset.priceList
pricesasset.price
yaml
requires:
  graph:
    sets:
      products: { node: asset.product }
      priceLists: { node: asset.priceList }
      prices: { node: asset.price }

asset.product

Default asset number prefix: PROD. Each product can have multiple SKUs (subitems) and multiple prices across price lists and currencies.

Fields

FieldTypeNotes
nametextLocalizable. Has dimension locale.
vatClassenumVAT class for the product.

Edges

EdgeCardinalityRelated node
skusmanyasset.product.sku
pricesmanyasset.price
yaml
asset.product:
  fields:
    name:
      type: text
      dimension: locale
    vatClass:
      type: enum
  edges:
    skus:
      cardinality: many
      relatedNode: asset.product.sku
    prices:
      cardinality: many
      relatedNode: asset.price

asset.product.sku

A subitem of asset.product, reachable via the skus edge.

Fields

FieldTypeNotes
skuNumbertextThe SKU identifier.
quantitynumberQuantity per product unit.
yaml
asset.product.sku:
  fields:
    skuNumber:
      type: text
    quantity:
      type: number

asset.priceList

Default asset number prefix: PL. Price lists scope prices to a set of channels and can either be authored manually or derived from another price list.

Fields

FieldTypeNotes
activebooleanWhether prices on this list are currently effective.
channelKeys[enum]Enum definition: channels.
sourceTypeenumOne of manual, derived.
sourcePriceListKeytextFor derived price lists: the source list's assetNumber.

Edges

EdgeCardinalityRelated node
pricesmanyasset.price
sourcePriceListsingleasset.priceList
derivedPriceListsmanyasset.priceList
yaml
asset.priceList:
  fields:
    active:
      type: boolean
    channelKeys:
      type: '[enum]'
      enumDefinition: channels
    sourceType:
      type: enum
    sourcePriceListKey:
      type: text
  edges:
    prices:
      cardinality: many
      relatedNode: asset.price
    sourcePriceList:
      cardinality: single
      relatedNode: asset.priceList
    derivedPriceLists:
      cardinality: many
      relatedNode: asset.priceList

asset.price

Default asset number prefix: PR. Each price belongs to one product and one price list, scoped to a single currency.

Fields

FieldTypeNotes
currencyCodetextISO 4217 currency code.
currentPricenumberCurrent effective unit price.
priceListKeytextForeign key to asset.priceList.assetNumber.
productNumbertextForeign key to asset.product.assetNumber.
deactivatedAtinstantSet when the individual price is deactivated.
sourceSetIduuidFor derived prices: ID of the source mutation set.
sourcePriceKeytextFor derived prices: the source price's assetNumber.

Edges

EdgeCardinalityRelated node
priceListsingleasset.priceList
productsingleasset.product
sourcePricesingleasset.price
yaml
asset.price:
  fields:
    currencyCode:
      type: text
    currentPrice:
      type: number
    priceListKey:
      type: text
    productNumber:
      type: text
    deactivatedAt:
      type: instant
    sourceSetId:
      type: text
    sourcePriceKey:
      type: text
  edges:
    priceList:
      cardinality: single
      relatedNode: asset.priceList
    product:
      cardinality: single
      relatedNode: asset.product
    sourcePrice:
      cardinality: single
      relatedNode: asset.price

uuid in requires.graph

The supported requires.graph field types are text, enum, number, instant, [text], [enum]. Declare sourceSetId as text in your requires block — UUIDs are stored as text on the graph and will compare correctly.

Activity log event types

The Products app emits these eventType values on the activityLog for asset.price and asset.priceList mutations:

Event typeEmitted on
priceChangeasset.price when the current price value changes
priceDeactivationasset.price when deactivatedAt is set
priceReactivationasset.price when deactivatedAt is cleared
priceListActivationasset.priceList when active flips to true
priceListDeactivationasset.priceList when active flips to false

The Price Lookup module consumes these to compute price-change history within a window. If your own components query the activity log directly, expect these eventType values.

© 2024 Hantera AB. All rights reserved.