cancel
Showing results for 
Search instead for 
Did you mean: 

How to access the categories of a product in cpq with python

inbe2812
Discoverer
0 Kudos

I like to read out the categories to which a product is assigned.

Could only retrieve single one category on product.

Is there a was to geh all categories of a product?

Thanks

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Fancy_Zou
Product and Topic Expert
Product and Topic Expert

Hello,

There are multiple ways to get the category to which a product is assigned, depending on the specific business requirements:

1. At the quote item level, after a product is added to the quote, the category to which the product is added can be retrieved. For example, if a product is assigned to both category A and category B, but the user adds/configures the product from category A, the category at the quote item level will be A.

  • IronPython: QuoteItem.CategoryId
  • Tag: <*CTX( Quote.CurrentItem.ProductInfo.CategoryId )*>

2. At the product master level, you can access all the categories to which the product is assigned.

3. On the Configurator, the displayed path at the top indicates the category from which the product is being configured. This information can be accessed through the Responsive Template.

4. Within the Product Catalog, the information of the displayed category can also be accessed through cpq.models.catalog using the Responsive Template.

Best Regards

Fancy

dmonta
Explorer
0 Kudos

Hi,

a product is assigned to only one category in SAP CPQ.

With API you can extract from the system all existing categories.

 

Fancy_Zou
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi dmonta, a product can be assigned to more than one categories in SAP CPQ.