Creating Address Fields¶
Overview¶
An address block maps AddressTools onto the fields of your object, and every field it maps has to exist before you can select it. This page lists the fields an address block can use, and links to a guide for creating each one.
The postal address fields are the address itself, so every block needs them. The rest widen what AddressTools can store against that address: some are filled in by address verification, while others, such as the lookup fields, are populated whenever an address is edited.
Why These Fields Are Needed¶
AddressTools writes each value into a field you nominate on the address block. If no field is mapped, the value has nowhere to go and is discarded. Creating the field and mapping it on the block turns that value into data you can report on.
Which fields you need depends on how much of AddressTools you use:
- The postal address fields are always required. Without them there is no address for AddressTools to read, so nothing else will run.
- The status field is required if you use address verification. It records the outcome and tells AddressTools which addresses it has already checked, so verification cannot run without it.
- Everything else is optional, so create the fields that will be useful to you.
Note
The address blocks supplied out of the box already have their postal address fields mapped, along with a status field, a county field and the three location fields, so if you are working with those you only need to create the fields you want to add on top. See Binding an Address Block.
Postal Address Fields¶
These are the fields that make up the address itself: country, state, city, ZIP or postal code, and one or more street lines. Every address block needs them mapped.
These will line up with the standard Salesforce address fields. For custom objects or addresses you can either create each field separately or use the singular Salesforce Address field.
- Postal Address Fields covers what AddressTools expects of each field when you are using your own address fields rather than the standard Salesforce ones.
Additional Address Fields¶
These four fields are filled in by address verification, so they are only worth creating if you use it.
- Address Status is a picklist holding the outcome of verification for this address. It is required if you use verification: without it, verification cannot run against the block.
- County is a text field holding the county or administrative area the address falls in.
- Address Label is a long text area holding the address formatted for posting in its own country.
- Property Use is a picklist recording whether the premises are residential, commercial, mixed or unknown.
Location Fields¶
Geocoding is purchased separately from address verification, so these fields are only populated if your org holds geocoding lookups. To add geocoding, contact sales@provenworks.com.
With geocoding, verification also returns the coordinates of the address and how precisely they pinpoint it. Coordinates on the record let you place it on a map, calculate distances, plan territories and drive location-based automation, on any object with an address block.
An address block maps three location fields: latitude, longitude and geocode accuracy.
- Geolocation holds the latitude and longitude of the address. It is a compound field, and each component is mapped separately.
- Geocode Accuracy is a picklist recording how precisely the geolocation pinpoints the address.
Lookup Fields¶
Lookup fields link a record to the AddressTools reference data, so you can report on the country, state or ZIP code as a record rather than as text. They are populated whenever an address is edited, not only when it is verified, so they are worth adding even if you do not use verification.
- Create Lookup Fields covers all three: a country lookup, a state lookup and a ZIP code lookup. AddressTools can generate them for you, or you can create them by hand.
Before You Start¶
Each guide creates a field through Setup > Object Manager, so you need permission to edit the object's fields. Decide on a naming convention first: the supplied blocks name their fields after the address they belong to, so an Account billing address uses Billing Address Status and Billing County. Following that pattern keeps things clear on objects with more than one address.
Creating a field is the first step, but it also has to be mapped on the address block before AddressTools will populate it. Sometimes settings must also be enabled for certain features like verification and lookup fields. You can find the full steps on how to configure each AddressTools feature fully in the next section Feature Administration.