# KBA-01291: Using Sequence to control Change Item Allocations

## Question:

How do I use sequence in the allocation rules for Change Items?

The sequence field in allocation rules is used to control both how the allocation rules are grouped and the order in which they are processed. All allocation rules must have a sequence greater than zero.

If you give a set of allocation rules the same sequence number, all the potentially matching rules are considered as a group and the first match is used and all others in the group are discarded.  This is particularly useful when using threshold amounts to apply varying allocation percents.

Each time the hundreds position of the sequence value changes, a new subtotaling group is started and these allocation are also applied to all prior allocations.

The example below may help illustrate the use of sequences.  To keep the example simple, the allocations are applied to all cost codes and categories.

• Let‘s say that a Change Item has a subcontract line for \$1000 and direct materials for \$500.
• Three entries are found with Allocation sequence 10:
• 12% bond fee with a threshold amount of 5,000
• 11% bond fee with a threshold amount of 25,000
• 10% bond fee with no threshold amount
• Allocation sequence 20 is a 15% Management Fee
• Allocation sequence 150 is a 1.5% Insurance amount
• Allocation sequence 190 is a 0.6% BO tax
• When the allocation engine is run:
• The system adds 12% for Bond Fee so \$180 is added (which is 12% of \$1000 + \$500)
• Allocation sequence 20 adds 15% so \$225 is added (which is 15% of \$1000 + \$500)
• Note: allocations with sequence 100 and over will be applied against the new total of 1905 (\$1000 + \$500 + \$180 + \$225)
• Allocation sequence 150 adds 1.5% so \$28.58 is added (which is 1.5% of 1905)
• Allocation sequence 190 adds .6% so \$11.43 is added (which is 0.6% of 1905)
• Note: allocations with sequence 200 and over would be apply against the new total of \$1945.01