Before territory boundaries (e.g., countries, states, postal codes) can be used for record assignment, they must be mapped to specific fields on an object. For example, when assigning Accounts based on State/Province, it is necessary to specify whether the State/Province field should come from the shipping address or billing address.
Fields are pre-mapped for Leads, Accounts, and Contacts, but you can edit these mappings if they don’t meet your requirements.
Creating Object Mappings
Kubaru territories are compatible with any object in Salesforce. Follow these steps to map a new object:
- Select Kubaru from the App Launcher menu.
- Click the Territories tab in the navigation menu.
- Click Object Mappings.
- Click the Add Object button.
- Select an Object (e.g., Opportunity).
- If Territory Field Status shows “Not Deployed”, you’ll need to add the Kubaru Territory field to the object. See the Territory Field section below for instructions.
- If Apex Trigger Status shows “Not Deployed”, you’ll need to add a trigger to the object. See the Apex Trigger section below for instructions.
- Enable the Active toggle.
- Select a field to map for Country (e.g., “Billing Country”). Note: click Add Row to map additional fields. Records will be associated with a territory if the boundaries match at least one mapped field.
- Select a field to map for State (e.g., “Billing State”).
- Select a field to map for Zip/Postal Code (e.g., “Billing Postal Code”).
- (Optional) Select a field to map for Other (e.g., “Billing City”).
- Click Save.

Things to keep in mind
Territory Field
The Kubaru Territory field must be added to any objects that you wish to associate with territories. This field will be stamped with the appropriate territory when records are created or updated.
Follow these instructions to add the Kubaru Territory field to an object:
- Select Kubaru from the App Launcher menu.
- Click the Territories tab in the navigation menu.
- Click Object Mappings.
- Click the Add Object button or edit an existing object.
- Click the Deploy Field link.
- (Optional) Expand the Profile Access picklist and select which profiles should have read access to this field. Leave unchecked if you don’t want the field to be visible on page layouts and reports.
- Click Deploy.
- Click Finish.

The Kubaru Territory field can be added to layouts and reports:

Apex Trigger
An Apex trigger must be added to allow territories to be automatically stamped on records when they’re created or updated. This trigger is automatically deployed for some standard objects such as Leads, Cases, Opportunities, and Accounts. For other objects, you’ll need to follow these instructions to deploy a trigger:
- Select Kubaru from the App Launcher menu.
- Click the Territories tab in the navigation menu.
- Click Object Mappings.
- Click the Add Object button or edit an existing object.
- Click the Deploy Trigger link. Note: if the Apex Trigger Status shows “Deployed”, then you don’t need to manually deploy a trigger.
- Click Deploy.
- Click Finish.
