Bookshelf Home | Contents | Index | PDF

## Best Practices for Creating Attribute Adjustments

Use attribute adjustments in cases where:

• The values of the variables that are used to determine the results are not known ahead of time.
• Integrations to external systems are secondary criteria.
• There is a small number of total rules, in the thousands at the most.

#### Using Sort Order to Improve Performance

You can use the Sort Order and Sort Method fields of the Dimensions record to specify the order in which attributes are processed. For information about how this affects performance, see Order of Conditions in Multiple-Condition Pricing Tables.

#### Using Nonequality Operators to Improve Performance

You can reduce the number of rules required by using the nonequality comparison operators to limit the size of the rules table, when possible. For example, if any shirt that is of length 40 or smaller receives a 10% discount, then you can set up a condition dimension for the Length attribute with operator > to set up the price adjustment rule. For more information, see Adding Attribute Adjustment Conditions.

CAUTION:  Make sure that the attribute adjustment is set up so that the attribute adjustment returns only one record. When nonequality operators are used, the attribute adjustment may return more than one record. Pricing administrators are responsible for setting up the dimensions in the appropriate way or setting up the pricing procedure to handle multiple matches.

NOTE:  Using wildcards does not improve performance, but it does decrease the number of records in the rules table.

#### Numeric Dimensions and Operators

If a condition dimension is compared with a numeric value using the equal (=) operator, you can improve performance by setting its data type to text. Property sets can store only text values, and when you use a numeric comparison, there is an overhead to convert the text to numeric values at run time. You must use numeric values for less than (<) or greater than (>) comparisons, but if you are using an = comparison, you will get the same result whether the data is numeric or text.

#### Using Comparison Operators

When the rules in attribute adjustments use comparison operators such as > and <:

• The data types of the condition dimensions must be number or date.
• Pay special attention to the following:
• Whether the rule must act on all the rows of data when you enter the values that the conditions must match
• The Sort Order properties of the dimensions. Blanking out or duplicating the sort order will give undefined results.
• The Sort Order and Sort Method fields of the dimensions. These fields determine the order in which the rules are processed, and you must select values that minimize the number of records that must be processed.