How can we get the value of 'Config_Item_Id' for a BOM node (which is populated in the table CZ_PRICING_STRUCTURE) during configurator runtime session.
Is there a java method which we can use to retrieve it?
We tried using IRuntimeNode.getConfigItemId() but it doesnt seem to work as its always returning the value as 1 (instead of the correct config_item_id)
The config item id is generated (and associated with the configurator items during runtime) and is even present/accessible in the CZ_pricing_Structures table (during the session), hence getConfigItemID method should return the correct/corresponding value at runtime. Right?
Not sure what value cz_pricing_structures will contain for config item id and parent config item id columns when its new configuration, but config item ids will be generated only after saving configuration. For reconfiguration, may be the table can have old config item id data populated. You can try printing it in debug session before saving it.
You can also validate if the config item id that is getting saved in pricing structure table and the one that you get at end of configuration are same or different. Configurator may be saving some temporary id in the table just to calculate price. My only point is, if there is no data in cz_config_items table before saving configuration, which data pricing procedure will be able to retrieve before that.
Yes, i verified that the config item id in the pricing table and the cz_config_items table are the same (once we save the configuration).
The reason we have to do this is coz I have to pass additional parameters, which are item speciific (captured at confiugurator runtime session) while making a call to the pricing engine.
Hence, we are capturing some additional pricing parameters (during a runtime configurator session) in a custom table, and plan to link those to the corresponding items in the 'CZ_Pricing_Structure' table thru the config_item_id.