Conditional Affinity combines InLink and CrossLink affinities in a single affinity type and provides additional flexibility. Affinity grouping enables different plan items to be grouped together based on the evaluation of the XPATH expression defined at the product catalog. The two affinity grouping types are:
Inlik Affinity
|
Crosslink Affinity
|
Affinity groups plan items having the same parent product share a common LinkID user-defined field value and have the same affinity plan fragment name
|
Affinity groups plan items having the same affinity plan fragment name
|
The additional configuration fields and rules in conditional affinity are:
Field
|
Description
|
AffinityType
|
Determines the type of affinity implemented.
- InLink
- CrossLink
- Sequenced Affinity
- ConditionalAffinity
|
AffinityCondition
|
Valid for Conditional type only. A String field containing an XPATH expression that evaluates to true or false based on data is in the order:
- If the expression is true, the product plan item is affinity-grouped
- If the expression is false, then the product plan item is not affinity-grouped
- If the field is blank, assume that the value is true
- If the XPATH expression evaluates to anything other than the true or false, Automated Order Plan Development fails and returns an exception
The XPATH expression evaluates against the following data fields on the order:
- Order Header user-defined field Name and Value
- Order Line ProductID
- Order Line Action and ActionMode
- Order Line user-defined field Name and Value
The XPATH expression can also be defined against the following plan data fields:
- planItem productID
- planItem user-defined field name value
- planItem Action
|
AffinityCorrelation
|
Valid for Conditional type only. The XPATH is evaluated on the Plan data and the order data. A String field containing an xpath expression based on a data is in the following order:
- All plan items that evaluate to the same AffinityCorrelation are grouped together
- The field is functionally similar to the LinkID method of correlating plan items in the InLink affinity. However, it lets correlation based on complex conditions without a restriction on the user-defined field names
- If the field is blank, a default LinkID value is shared by all other blank configurations
- If the XPATH expression evaluates to an empty string, the XPATH expression is blank, or assume a default LinkID
The XPATH expression evaluates against the following order data fields:
- Order Header user-defined field Name and Value
- Order Line ProductID
- Order Line Action and ActionMode
- Order Line user-defined field Name and Value
The XPATH expression can also be defined against the following plan data fields:
- planItem productID
- planItem user-defined field name value
- planItem Action
|
AffinityParentGroup
|
Valid for Conditional type only. A Boolean field containing the value true or false:
- If set to true, the plan items with products sharing the same immediate parent product are grouped together
- If set to false, the parent product is not considered for grouping
|
AffinityActionGroup
|
Valid for Conditional type only. A Boolean field containing the value true or false:
- If set to true, then only plan items with products that share the same action are grouped together
- If set to false, then the action is not considered for grouping
|
AffinityActionValue
|
AffinityActionValue is considered for grouping when AffinityActionGroup is set to true. This is valid for Conditional type only. String field containing an XPATH expression that evaluates to a String based on data is in the following order: The XPATH expression must evaluate to one of the following:
- PROVIDE
- UPDATE
- CEASE
- Empty String
If the XPATH expression evaluates to anything other than these actions, then Automated Order Plan Development fails and returns an exception.
- If the field is blank, or the return value from the XPATH expression is an empty string, the remaining action rules must be applied.
The XPATH expression can evaluate against the following data fields on the order:
- Order Header user-defined field Name and Value
- Order Line Action and ActionMode
- Order Line user-defined field Name and Value
The XPATH expression can also be defined against the following plan data fields:
- planItem productID
- planItem user-defined field name value
- planItem Action
|
AffinityProvide
|
Provide plan fragment name for affinity grouped plan item. Only plan items with the Provide action and the same value in this field are grouped together
|
AffinityUpdate
|
Update plan fragment name for affinity grouped plan item. Only plan items with the Update action and the same value in this field are grouped together
|
AffinityCease
|
Cease plan fragment name for affinity grouped plan item. Only plan items with the Cease action and the same value in this field are grouped together
|
AffinityCancel
|
Cancel plan fragment name for affinity grouped plan item. Only plan items with the Cancel action and the same value in this field are grouped together
|
In the case where plan items with different actions are grouped together due to affinity, the following logic is used to determine what action to apply to the plan item. The following rules apply:
- If AffinityActionValue is specified, then the action of the plan item is the result of evaluating this xpath.
- If AffinityActionValue is blank, or evaluates to an Empty String, then the remaining rules apply:
- If all order lines have the same action, then the plan item action is the same as the order lines.
- If order lines have different actions, then:
- If at least one order line has PROVIDE action, then the plan item has PROVIDE action.
- Otherwise if at least one order line has CEASE action, then the plan item has CEASE action.
- Otherwise, the plan item has UPDATE action.
For details, see
Fulfillment Catalog Product Catalog Guide.
Important: 1) If XPath is defined against plan data, the format must be
<Actual XPath> containing string $var/PlanItem. For example, if you want to define the XPath for user-defined field name-value pair
MSISDN=123, the XPath can be
$var/PlanItem[productID='GSMLine']/udfs[name='MSISDN']/value/text().
XPath evaluates data from the planItem. Refer to the
sample planItem xml.
2) If XPath is defined against the order data, the format must be
<Actual XPath> containing string $var/Order. Refer to
Sample order XML.
3) Default order data is considered for evaluation if XPATH does not contain
$var/PlanItem.
Note: Refer to
Sample XPATHs for XPATH definitions.
When Automated Order Plan Development returns a plan it indicates the action of the plan item. Under normal circumstances, this maps directly to the action of the associated order line that caused the creation of the plan item. In the case where plan items with different actions are grouped together, the following logic is applicable to determine what action to apply to the plan item.
- If AffinityActionValue is specified, then the action of the plan item is the result of evaluating this xpath.
- If AffinityActionValue is blank, or evaluates to an Empty String, then the remaining rules apply
- If all order lines have the same action, then the plan item action is the same as the order lines.
- If order lines have different actions, then:
- If at least one order line has PROVIDE action, then the plan item has PROVIDE action.
- Otherwise if at least one order line has CEASE action, then the plan item has CEASE action.
- Otherwise, the plan item has UPDATE action.
Copyright © Cloud Software Group, Inc. All rights reserved.