A Territory is a named object defined by groups of categories and classifiers that is used to filter input to credit and primary measurement rules.
Territories filter transactions based on how they are classified. They can be used for a number of scenarios, but a common one is to allocate credit for a Transaction to a payee based on a criterion, such as the location, product or customer type.
Consider the scenario we saw earlier. Stacy, the Sales Rep for the western region, should get credit for any transaction in the US states of California, Nevada, or Arizona. Let’s add one more requirement: the transactions must also be for sales of bike products or accessories, but not repair services.
Stacy’s territory would be defined using the data in the category hierarchy we saw in the previous topic, and would look like (Bike Products OR Accessories) AND Western Region.
Territories:
- Are defined using Categories and Classifiers.
- Can be simple or complex.
- Can be referenced in Credit or Primary Measurement Rules.

Best Practices for Territories
- Use Parenthesis and Logical order of operations to make sure the statement is logically processed.
- For an AND condition, both parts must be true for the territory to succeed.
- For an OR condition, the match succeeds if either clause is true.
- Never leave a Territory object Blank, this will cause errors in the pipeline.
- Have a "dummy" Territory that evaluates as FALSE. You can then use this territory as the default for variables, which will prevent an error if a variable is not assigned.

