Siebel Interactive Designer API Reference > Siebel-Specific Functions >

BuildProductStr


Usage

In cases where the customizable product string cannot be automatically generated from the model, construct the string programatically using BuildProductStr and the supporting cell functions documented in this section.

The function may be called in cell functions or as part of a button/link/javascript that executes after the configuration engine has run.

Syntax

ISS.BuildProductStr(id, qty, AttrStr[] attrs, ProdStr[] children, relationshipName)

Argument
Description
id
A string for the product ID.
qty
Optional argument. Integer value for the quantity. Defaults to 1.
attrs
Optional argument. Array of attribute strings.
children
Optional argument. Array of customizable product strings.
relationshipName
Optional argument. String for the relationship name defined in the creation of the customizable product.

Example
Example 1

var myChildStr = "relationship=ChildSlot&*prodID=ARS-625&*qty
=1&*attributes={}&*children={}";

ISS.BuildProductStr("TRS-525",1,ISS.BuildAttributeList("Color
=Yellow", "Texture=Coarse"), ISS.BuildChildList(myChildStr), "Slot1");

Returns:

"relationship=Slot1&*prodID=TRS-525&*qty=1&*attributes
={Color=Yellow&*Texture=Coarse}&*children
={relationship=ChildSlot&*prodID=ARS-625&*qty=1&*attributes
={}&*children={}}"

Example 2

var child1 = ISS.BuildProductStr(ISS.GetBusCompID("CDPLAYER.PARTNUM"), 1, null, null, "CD_PLAYER");

var child2Attrs = ISS.BuildAttributeList(ISS.GetAttribute("SPEAKERS.WATT"));

var child2 = ISS.BuildProductStr(ISS.GetBusCompID("SPEAKERS.PARTNUM"),4, child2Attrs, null, "SPEAKERS");

var rootPart = ISS.BuildProductStr(ISS.GetBusCompID("ROOT"),1, null, ISS.BuildChildList(child1, child2));

rootPart has value:

"relationship=null&*prodID=KJR- 157&*qty=1&*attributes={}&*children={relationship
=CD_PLAYER&*prodID=AFT-157&*qty=1&*attributes
={}&*children={}|*relationship=SPEAKERS&*prodID=HGT-697&*qty
=4&*attributes={Watts=60}&*children={}}"


 Siebel Interactive Designer API Reference 
 Published: 18 April 2003