Conditional Affinity Sample
A product model is having two parents:
Consider a product model where conditional affinity is defined at all the child products:
The XPATH defined in the product model is evaluated against the submitted order schema.
The following table describes the attribute-based conditional affinity scenarios:
Attribute | Sample XPATH Expressions | Order Payload |
---|---|---|
AffinityCondition | exists($var/Order/OrderHeaderUDF[name=UDFNAME and value="UDFVALUE"]) |
<ord1:udf> <ord1:name>UDFNAME</ord1:name> <ord1:value>UDFVALUE</ord1:value> </ord1:udf> |
AffintyCorrelation | $var/Order/orderlines[productID= 'Child_A1']/ OrderlinesUDF[name= 'UDFNAME']/ value/text() |
<ord1:line> <ord1:lineNumber>1</ord1:lineNumber> <ord1:productID>Child_A1</ord1:productID> <ord1:quantity>1</ord1:quantity> <ord1:uom>1</ord1:uom> <ord1:action>PROVIDE</ord1:action> <ord1:actionMode>New</ord1:actionMode> <ord1:udf> <ord1:name>UDFNAME</ord1:name> <ord1:value>UDFVALUE</ord1:value> </ord1:udf> </ord1:line> |
AffintyParentGroup | Child_B1 and Child_B2 have immediate parent. The two is affinity grouped when: AffintyParentGroup=true | |
AffinityActionValue
The affinityAction Group must be true |
$var/Order/orderlines[productID= 'Child_A1']/OrderlinesUDF[name= 'UDFNAME']/value/text() |
<ord1:line> <ord1:lineNumber>1</ord1:lineNumber> <ord1:productID>Child_A1</ord1:productID> <ord1:quantity>1</ord1:quantity> <ord1:uom>1</ord1:uom> <ord1:action>PROVIDE</ord1:action> <ord1:actionMode>New</ord1:actionMode> <ord1:udf> <ord1:name>UDFNAME</ord1:name> <ord1:value>UDFVALUE</ord1:value> </ord1:udf> </ord1:line> |
Copyright © Cloud Software Group, Inc. All rights reserved.