The postal code list is your organization's master of postal (PIN) codes, each with the city, state, region and country it belongs to. Branch postal codes link a code to the branch and company that serve it. Together they tidy the address on new leads, opportunities and quotes and route new leads to the right branch.
Overview
There are two lists, and both are kept by an administrator:
- Postal Codes. One record for each code you serve: Code, City, State, Region and Country.
- Branch Postal Codes. One record for each code that a branch covers: Postal Code, Branch, Partner Account (the company the branch belongs to) and Coverage Type.
Users never open these lists in daily work. They see the effect when they type a postal code on a lead, opportunity or quote.
When to use it
- You want City, State and Country filled in correctly from the postal code, instead of being typed by hand.
- You want a new enquiry to land with the branch and company that cover the customer's area, without anyone choosing them.
- You use Setup → Process Studio → Assignment rules and want a rule that finds the branch for a postal code.
If your organization works from a single location, you only need the postal code list. Branch postal codes are hidden when We operate from multiple locations is off.
How xMatix handles it
Matching uses Code. xMatix compares the postal code on the record with the Code of your postal code records. Leading and trailing spaces and differences in letter case don't matter. The record's Name is a generated record number (series PC). It is never the postal code, so don't search or match on it.
The postal code is tidied. When the typed code matches a record, xMatix rewrites it with the spelling stored in Code.
The place is filled in from the postal code record. If the postal code record has a value, it replaces the value on the document, because a postal code can belong to only one place. If the postal code record leaves a value blank, the value on the document is kept. If no postal code record matches, nothing changes and the typed address stays as it is.
| Document | Postal code read | Fields filled |
|---|---|---|
| Lead | Postal Code | City, State, Country (a lead has no Region) |
| Opportunity | Billing Postal Code | Billing City, Billing State, Billing Region, Billing Country |
| Quote | Billing Postal Code | Billing City, Billing State, Billing Region, Billing Country |
This happens each time one of these records is created or saved. Shipping addresses and other documents, such as orders and invoices, are not looked up.
New leads are routed to a branch. After tidying the postal code, xMatix looks for a branch postal code on that code. If it finds one, it copies the mapping's Branch and Partner Account onto the lead. This happens on every save, not only the first. If several mappings cover the same code, the one created first is used. The built-in routing ignores Coverage Type, and it doesn't check whether the branch is active.
An assignment rule takes over. Your organization may have an assignment definition under Setup → Process Studio → Assignment rules that sets a lead's Partner Account or Branch when the lead is created. If so, the built-in postal code routing stops for leads, and the rule decides. Rules can include lookup steps on Postal Code and Branch Postal Code, so you can still route by postal code with conditions of your own.
Prerequisites
- A security profile that can create and edit Postal Code and Branch Postal Code records.
- Your branches and companies (partner accounts) already exist. See Branches.
- Postal Code and Branch Postal Code must be added to an app menu. The shipped apps don't include them (see Configuration). You can also load both lists with the import wizard.
Procedure
Step 1 — Put the lists in a menu
Go to Setup → Design Studio → Apps, open the app your administrators use, and use Manage Items to add Postal Code and Branch Postal Code. They then appear in that app's navigation. You only do this once.
Step 2 — Add a postal code
Open Postal Codes and select New. The form has Code, City, State, Region and Country. Enter the code exactly as you want it stored, for example 411029, and fill in the place. Then save.
The record is saved with a generated name such as PC followed by a date and a running number. The All Postal Code list shows Name, Code, City, State and Country.
The shipped create form lists only a few sample cities and states (Pune, Mumbai, New Delhi and Chandigarh; Maharashtra and Punjab). Before you add your own codes, extend those lists. See Configuration.
Step 3 — Load many postal codes at once
For a full list, use the import wizard: Setup → Platform → Data → Import, target entity Postal Code. Map your columns to Code, City, State, Region and Country. Don't map anything to Name, because it is generated. City and State are picklist fields, so their values must match the picklist exactly. Run a dry run first. See Import data.
Step 4 — Map a postal code to a branch
Open Branch Postal Codes and select New. Choose these values:
- Partner Account: the company that serves the area.
- Branch: the list offers only branches of that company.
- Postal Code: the code you added in Step 2.
- Coverage Type: optional. The built-in routing ignores it (see Configuration).
Save. The mapping gets a generated name in the BP series. From the next save, a lead with that postal code is routed to this branch and company.
To import mappings, target Branch Postal Code and fill the postal code lookup with a dot column on its code, such as PostalCode.Code. The record name is a generated number, so a plain name column won't find your codes.
Step 5 — Check the result on a lead
Create a test lead with only a name, a phone number and the postal code, then save it. City, State and Country should be filled from your postal code record. Branch and Partner Account should match the mapping.
Step 6 — Change or remove a postal code
On the Postal Codes list, Edit lets you change rows in place and Delete removes the selected rows. The record page itself has no buttons.
Changing a postal code record doesn't update existing leads, opportunities or quotes. They pick up the new values the next time each one is saved. Before you delete a postal code, delete its branch postal codes, or re-point them to another code.
Fields
Postal code
| Field | What it means | Notes |
|---|---|---|
| Code | The postal code itself, for example 411029. | xMatix matches on this field and copies its spelling onto documents. Keep one record per code. It is not marked required, but a record without a Code is never matched. |
| City | The city the code belongs to. | A picklist. Copied to City on leads and Billing City on opportunities and quotes. |
| State | The state the code belongs to. | A picklist. Copied to State on leads and Billing State on opportunities and quotes. |
| Region | Your own region grouping, as free text. | Copied to Billing Region on opportunities and quotes. Leads have no region. |
| Country | The country, as free text. | Copied to Country on leads and Billing Country on opportunities and quotes. |
| Name | A generated record number in the PC series. | Read-only in practice. It is not the postal code. |
Branch postal code
| Field | What it means | Notes |
|---|---|---|
| Partner Account | The company that serves this postal code. | Copied to the lead's Partner Account by built-in routing, even when it is empty. Always fill it. |
| Branch | The branch that serves the postal code. | Only branches of the chosen partner account are offered. Copied to the lead's Branch. |
| Postal Code | The postal code record this mapping is for. | Choose the record whose Code you want to route. |
| Coverage Type | A classification of the mapping. | The shipped values (All, Marketing, Sale) are inactive, so the list is empty until you activate or add values. Only assignment rules that filter on it use it. |
| Name | A generated record number in the BP series. | Required on the record page; filled automatically on save. |
The full field list is in the reference pages for Postal Code and Branch Postal Code.
Business rules
- Codes match on Code, not on Name. Spaces at either end and letter case are ignored when matching.
- The postal code record wins. A non-empty City, State, Region or Country on the matched record replaces the value on the lead, opportunity or quote at every save. A blank value on the postal code record leaves the document's value alone.
- An unknown code is left alone. If no postal code record matches, the typed code and address are saved unchanged and the lead is not routed.
- Routing writes both fields. The mapping's Branch and Partner Account are both copied to the lead, including empty values. If a mapping has no Partner Account, the lead's partner account is cleared, and the lead is refused because every lead needs one.
- The oldest mapping wins. When several branch postal codes cover one code, the one created first is used, and the others are ignored by built-in routing.
- Routing repeats on every save. A branch someone changed by hand on the lead is set back on the next save while the postal code still maps to another branch.
- Assignment rules take precedence. An assignment definition that sets a lead's Partner Account or Branch on create switches the built-in routing off for leads.
- No automatic numbering of codes. Name is generated from the PC and BP series. Code is never generated.
Example
A two-wheeler dealer group opens a new branch, Kothrud Branch, under its company Sunrise Motors, to serve postal code 411038.
- The administrator opens Postal Codes, selects New, enters Code 411038, City Pune, State Maharashtra, Region West and Country India, and saves. The record is named with the next PC number.
- On Branch Postal Codes, they select New and choose Partner Account Sunrise Motors, Branch Kothrud Branch and Postal Code 411038, then save.
- A receptionist creates a lead for a walk-in customer and types 411038, followed by a stray space, into Postal Code.
- On save, the postal code is stored as 411038. City becomes Pune, State Maharashtra and Country India. Branch becomes Kothrud Branch and Partner Account Sunrise Motors.
- Later, a sales manager creates a quote for the same customer with Billing Postal Code 411038. The billing city, state, region and country are filled in the same way. Quotes are not routed to a branch.
Training
Practice exercise
In a sandbox:
- Add a postal code with Code 999001, City Pune, State Maharashtra and Country India.
- Map it to any active branch and its partner account.
- Create a lead with First Name Test, a phone number and Postal Code 999001 (type it with a space at the end), leaving City, State, Branch and Partner Account empty.
Expected result: the lead saves with Postal Code 999001, City Pune, State Maharashtra, Country India, and the branch and partner account from your mapping. Now change the lead's State to Punjab and save again. State goes back to Maharashtra, because the postal code record wins.
Quick reference
- Matching uses Code. Name is a generated PC number.
- Lead, opportunity and quote are filled from the postal code. Other documents are not.
- On opportunities and quotes, only the billing address is looked up.
- A blank field on the postal code record never clears the document's value.
- Branch routing applies to leads only, and it runs on every save.
- Several mappings for one code: the oldest wins.
- Always set Partner Account on a branch postal code.
- An assignment rule that sets Partner Account or Branch replaces built-in routing.
- Import mappings with a
PostalCode.Codecolumn, not the name.
Permissions
Postal Code and Branch Postal Code use ordinary record permissions: read, create, edit and delete on each entity in a security profile (see Security profiles). In the shipped profiles, the administrator, standard user, sales executive and sales manager profiles have full access to both. The general sales and service profiles have full access to Branch Postal Code only. Review these grants if only administrators should change routing.
Configuration
- Menu entry. Setup → Design Studio → Apps → the app → Manage Items: add Postal Code and Branch Postal Code. Without this step, administrators can still load the lists with the import wizard. See Create an entity (step 7).
- City and State choices. City and State are picklist fields. Add your values with the field's Manage PickList Values under Setup → Design Studio → Entities → Postal Code → Schema → Fields. The shipped create form, Postal Code Create, has its own fixed City and State options. Edit those two controls in the layout designer so that they offer your values (see Design a form layout). The record page already reads the picklist.
- Coverage Type values. All three shipped values are inactive. Activate them or add your own under Branch Postal Code → Coverage Type → Manage PickList Values if your assignment rules filter on coverage.
- Record numbering. The PC series (Postal Code Name Setting) and the BP series name the records. Change them under Setup → Feature Hub → Platform → Document Settings (see Email templates and document numbering).
- Routing with conditions. For routing that should skip inactive branches, filter by coverage, or pick a person as well as a branch, create an assignment definition under Setup → Process Studio → Assignment rules. Give it lookup steps on Postal Code (matching Code to the lead's postal code) and Branch Postal Code. The rule editor's help includes this recipe. Once that definition sets Partner Account or Branch on leads, the built-in routing stands aside.
- Single-location organizations. When We operate from multiple locations is off (Setup → Feature Hub → Administration → Org Settings), branch postal codes are hidden. The postal code list still fills in addresses.
Common problems
City and State are not filled when I type a postal code
No postal code record has that Code. Check the list for the code, including any hidden characters, and add it. If the record exists, check that its City and State are filled. Blank values on the postal code record are never copied.
The lead's state keeps changing back after I correct it
The lead's postal code matches a postal code record. At each save, the record's State replaces the value on the lead. Correct the postal code record if it is wrong, or correct the lead's postal code if the customer is elsewhere.
The lead goes to the wrong branch
Several branch postal codes cover that code, and the oldest one is used. Delete or re-point the extra mappings, keeping one per code. If the wrong branch is the only mapping, correct the mapping. Remember that routing runs again on every save of the lead.
"A partner account is required…" after routing
The branch postal code that matched has no Partner Account, so routing cleared the lead's partner account. Fill in Partner Account on the mapping and save the lead again.
Saving a lead fails for one particular postal code
Check whether two postal code records carry exactly the same Code. The branch routing expects one record per code and can fail when it finds two. Delete the duplicate, and move any branch postal codes to the record you keep.
My mapping import can't find the postal codes
The import matched the postal code lookup on the record name, which is a PC number. Use a PostalCode.Code column for the lookup instead.
Common questions
Why does Name show a PC number instead of the postal code?
Postal code records are numbered like documents: on save, Name is filled from the PC numbering series. The postal code itself lives in Code, and that is the field xMatix matches on. Keep that in mind when you build list filters, imports or assignment rules. Always filter or match on Code. A value typed into Name is replaced by the next number when the record is created.
Are orders, invoices and accounts filled from the postal code list?
No. The postal code list fills the address on leads (Postal Code) and on the billing address of opportunities and quotes (Billing Postal Code). Orders, invoices, delivery orders, purchase orders and bills take their address from the account and its contact addresses. Shipping postal codes are never looked up. Addresses on accounts and contact addresses are also stored as typed.
Do opportunities and quotes get routed to a branch too?
No. Built-in branch routing applies to leads only. On an opportunity or quote, the postal code list only tidies the billing address. The company and branch are set the same way as when there is no postal code list. If you need routing on another entity, create an assignment definition for that entity under Setup → Process Studio → Assignment rules. Use lookup steps on Postal Code and Branch Postal Code.
Does changing a postal code record update existing leads?
Not straight away. The lookup runs when a lead, opportunity or quote is saved, so existing records keep their address until someone saves them again. At that save they take the new City, State, Region and Country, and a lead is routed using the current mappings. Existing records are not updated in bulk, so plan corrections with that in mind.
Can users search for the nearest branch by postal code?
No. No screen in xMatix, on the web or in the mobile app, looks up a branch from a postal code or a city. Branch postal codes are read in two places only: the built-in lead routing described above, and assignment rules that include a lookup step on Branch Postal Code. To see which branch covers a code, open your Branch Postal Codes list and filter it on the postal code. Remember that only the oldest mapping for a code routes leads, so the first row created is the one that counts.
