Blog

AddressTools Free: Configure country-specific validation rules

Why are some validation rules country specific?

AddressTools allows you to configure some of its validation rules on a per-country basis.

Example:

United States

  • Allow Only Listed States = TRUE
  • State Mandatory = TRUE

China

  • Allow Only Listed States = FALSE
  • State Mandatory = TRUE

This above example can be seen in the screenshot below.

Country-specific validation rules are essential when certain elements of address data are required for different countries. These types of restrictions are particularly popular to avoid integration nightmares when data is pushed out to different systems.

Configuring the country-specific settings

To configure country-specific validation rules:

  • Go to App Launcher | AddressTools Free Administration.
  • Navigate to Country Specific Settings on the sidebar.
  • Configure the Multi-Select Picklists to your requirements by selecting a country in the relevant list and selecting the horizontal arrow to move it from one list to the other.
  • Once all items have been adjusted, select Save.

Note: despite a value existing in one of the enforced lists, the setting will not be enabled until it is checked in the address block configuration, followed by checking Validation Enabled in the settings tab. This will be covered in the following articles.


Back to the AddressTools Free installation walkthrough

AddressTools Free: Configure country standardization

Country standardization format selection

We’ll start configuring country standardization. To set the format for the country values:

  • Go to App Launcher | AddressTools Free Administration.
  • Select Settings from the sidebar.
  • Tick Standardization Enabled.
  • Select Save.

Enable country standardization for an address block

Now that the desired country standardization needs to be enabled for specified address blocks.

  • From the sidebar, navigate to Address Blocks.
  • Select Edit next to the address block you want to enable country standardization for.
  • Scroll to Global Settings.
  • Check Standardize Country.
  • Select Save.

Repeat the above steps for each address block you want to enable country standardization for.


Back to the AddressTools Free installation walkthrough

AddressTools Free: Understanding validation rules and what’s available

First things first

Before we get started, address validation and address verification are often thought to be the same thing, but within AddressTools, they are two separate pieces of functionality. Let’s take a closer look at both so you can work on implementing the right features for your organization.

What is address validation?

Address validation provides validation rules to the configured address blocks in Salesforce. For example, make fields mandatory, limit field entry to only acceptable values, and enforce regular expressions for fields like Zip/postal code. Validation rules are great for ensuring that data meets organizational requirements, simplifying reporting, minimizing dirty data, and it can be essential to reduce integration syncing headaches.

What is address verification? (Only available though AddressTools Premium)

Address verification leverages external data points such as USPS, Royal Mail and Canada Post to verify the deliverability of an address. There are interactive real-time and automated/batch options available to verify address data with AddressTools. To find out more about address verification in AddressTools, check out the Understanding address verification in AddressTools article.

What address validation rules are available in AddressTools?

See a full list of validation rules available in AddressTools below:

Country-wide:

  • Country Mandatory
  • Allow Only Listed Countries

Country-specific:

  • State Mandatory
  • Allow Only Listed States

Now that we know what validation rules are available, let’s take a look at configuring the country-specific validation rules, followed by enabling all the rules for configured address blocks.


Back to the AddressTools Free installation walkthrough

AddressTools Free: Add new address block

What’s in an address block configuration?

With the object’s trigger created or confirmed that one already exists, we now need to create an address block configuration.

An address block configuration identifies address fields on an object that we’ll want to enable AddressTools functionality onto. It also provides settings specific to that address block which can be enabled/disabled at a later stage such as making fields mandatory, or enabling standardization.

Let’s take a look at all the parts that go into an address block configuration:

  • Object – the object where the address fields exists.
  • Postal Address Fields – street, city, state, ZIP/postal code and country field.
  • Global Settings – enablement for international validation rules and standardization.
  • Country Specific Settings – enablement for country specific validation rules.

As you can see, there are a lot of pieces that go into an address block configuration. However, certain settings can be skipped depending on your implementation.

This article will cover binding the object, record type, and postal address fields with AddressTools. The additional items will be covered in the specific articles related to enabling their features.

Note: after initial data installation has occurred, Accounts (billing address, shipping address, person mailing address and person other address), Contacts (mailing address and other address), Leads (address) and Contract (billing address and shipping address) will already be configured with settings ready to customize.

Binding a new address block

  • Go to App Launcher | AddressTools Administration.
  • Select Address Blocks from the sidebar.
  • Click Add in the top right corner.
  • Choose the Object where the address fields exist.
  • Select Next.

Note: The configured functionality will apply to all record types for the object if record types are enabled for the object.

Within the Postal Address Fields section:

  • Under *Country Field, use the picklist to reveal the object’s available fields.
  • Find and select the country field’s API Name.
  • Under State Field, use the picklist to reveal the object’s available fields.
  • Find and select the state field’s API Name.
  • Under City Field, use the picklist to reveal the object’s available fields.
  • Find and select the city field’s API Name.
  • Under ZIP/Postal Code Field, use the picklist to reveal the object’s available fields.
  • Find and select the ZIP/postal code field’s API Name.
  • Under Street Field, use the picklist to reveal the object’s available fields.
  • Find and select the street field’s API Name.
  • Once every field has been configured within the Postal Address Fields section, click Save.

With the postal address fields now bound to an address block configuration, continue through the installation walkthrough and use the relevant setup articles for the functionality you require. The specific articles will walk you through the rest of the address block modal options as you require them, teaching you along the way.

Note: if you cannot find a field you are looking for in any of the picklists, this indicates that the field may already bound in an existing address block configuration for the same object, or you do not have permissions to view the field. First, check to see if the address block is already configured in AddressTools. If not, check the field level security of the fields in question.


Back to the AddressTools Free installation walkthrough

AddressTools Free: Trigger enablement

What do the triggers do?

AddressTools has a number of features that operate during the record insert and update operations into Salesforce. This includes (but is not limited to) enforcing validation rules, updating verification statuses, standardizing fields, and populating lookup fields.

A trigger is required on the objects that contain address fields that are configured with AddressTools. Without the trigger, most functionality will not fire and other functionality may appear to not behave as intended.

What triggers are already provided with the package?

The following objects already have a trigger provided with the package. This means you don’t need to create them:

  • Account
  • Contact
  • Contract
  • Lead

If you only plan to use AddressTools exclusively on the objects noted above, you can move on to the next article.

How can I disable the triggers provided with AddressTools?

In the event that you need to disable the triggers provided with the package, or you do not plan to use AddressTools functionality on some of the preconfigured objects:

  • Go to AddressTools Administration | Settings.
  • Scroll to Trigger Setting where you will find:
    • Enable Account Trigger
    • Enable Contact Trigger
    • Enable Contract Trigger
    • Enable Lead Trigger
  • Use the pencil icon next to the appropriate setting and uncheck the field.
  • Once done, select Save.

Back to the AddressTools Free installation walkthrough

AddressTools Free: Install a default country for all users (optional)

Install a default value to all user records

To use QuickComplete Country functionality, you are required to install a default country. This populates the custom field pw_cc__QuickCompleteCountry__c on the User object for all users in the organization.

You can find out more about the QuickComplete by reading the article here. This is covered later in the installation walkthrough.

To install a default country:

  • Go to App Launcher | AddressTools Free Administration.
  • Use the picklist and select a Country under Default Country Installation.
  • If the picklist is empty, you may need to refresh the page after completing a data installation.
  • Select Install.

A process will begin in the background to populate the records in the organization. The time taken will vary in relation to how many users are in your organization.


Back to the AddressTools Free installation walkthrough

AddressTools Free: First-time data installation

What’s installed during data installation?

When data installation is run, you will install data to the following custom objects that are installed with the AddressTools package:

  • Countries
  • States

The data installed into these objects acts as the backbone for AddressTools’ standardization and validation rules.

Furthermore, during the initial run of data installation, the following address blocks are configured within AddressTools to quick start your implementation:

  • Account - Billing Address
  • Account - Shipping Address
  • Account - Person Mailing Address
  • Account - Person Other Address
  • Contact - Mailing Address
  • Contact - Other Address
  • Contract - Billing Address
  • Contract - Shipping Address
  • Lead - Address

How to run data installation for the first time

Warning – before running the data installation, check your organisation’s storage limit. This can be seen at a glance in the Overview panel in the AddressTools Administration tab. There’s a lot of data to install so ensure you’re not going to exceed it. This can be common in a sandbox or developer org.

To get started:

  • Go to App Launcher | AddressTools Free Administration.
  • Use the Get Started button under Data Installation.
  • Select a Language.
  • If you’re using a sandbox, it is recommended to check the Only install sample data setting.
  • Select Install.
  • Read the warning and then Yes when ready.

The full data installation process can take a while, so now might be a good time to grab a coffee and read through the “Understanding” articles available in the rest of the installation walkthrough.

Back to the AddressTools Free installation walkthrough

AddressTools Free Installation Walkthrough

AddressTools Free is the ultimate address functionality tool for Salesforce jam-packed with features. This article will guide you through configuring the product for the first time and provide guidance on updating settings on an ongoing basis.

First-time initialization

Address block management

Validation rules

Standardization

QuickComplete Country

Deployment

 

PhoneTools (v2.4 onwards): How does TPS and CTPS screening work in Salesforce?

Introduction

PhoneTools is a quick-to-launch TPS and CTPS screening solution for Salesforce CRM allowing your organization to assist with PECR compliance in minutes. The solution is built solely for Salesforce, by Salesforce experts.

Out of the box

Out of the box, PhoneTools supports the following objects:

  • Accounts
  • Contacts
  • Leads

This means that we have already:

  1. Provided a custom trigger for each object
  2. Created the required functional fields for each object
  3. Configured the default phone fields in the “Fields to Screen” settings

This means if you’re using any of the objects and fields listed above, it’s a swift process to implement. If you’re not using the above objects or fields then don’t panic, we cover how to configure PhoneTools for these scenarios too!

How TPS and CTPS screening in Salesforce works

PhoneTools will screen any phone field that is configured in the package’s “Fields to Screen” settings. This means there is no code required to implement (with the exception of a formula if you would like to set up screening criteria, but we’ll cover this later!).

Each object that contains phone fields that need screening against the TPS and/or CTPS database must contain three custom functional fields to track the phone fields’ TPS and CTPS statuses. These fields will also identify when the next screen is due, and provide a summary status for the whole record. A description of these three fields can be seen below:

  • Phone Status Field – provides a record status that summarizes the screening results of the configured phone fields. See more information about the record statuses.
  • Next Screen Due Field – when a record is screened, a date stamp is added 21 days in the future. This will indicate when the record next needs to be screened. (You will not be charged any extra for screening a record more than once a month.)
  • Screening Results Field – a JSON output listing the results for each screened field. This is perfect if you’re interested in doing some custom development on top of the solution.

When a phone number is updated on a record, all three functional fields are set to NULL on the record. This indicates that the record needs screening. This can either be screened manually by your users, or have it automatically screened with a batch job.

When a record is screened, each of the functional fields will be updated in accordance with the response from the PhoneTools service.

How can my users tell what’s safe to call?

A Lightning component needs to be added to the users’ record app pages. This provides a breakdown of the statuses for each configured phone field to screen. See more information about the phone statuses.

The Phone Status Field noted earlier in will also contain a summary status for each record. This can be used in reports to quickly identify records that have all numbers listed on either database, no number listed on either database, or records that contain some numbers that are listed on either database.


Back to the PhoneTools (v2.4 onwards) installation walkthrough


PhoneTools (v2.4 onwards): Bind the formula to a Field to Screen setting

Configure the setting

We’ve now created a formula field containing the containing the conditions for screening a record, and we should also now have our phone fields configured in the Fields to Screen settings.

To add the formula field to a Field to Screen setting:

  • Go to App Launcher | PhoneTools Administration.
  • Navigate to the Configuration tab.
  • Select Edit next to one of the Fields to Screen rows where the formula should be applied.
  • Search and select the formula under Formula Field.
  • Press Save.

When the setting has been saved, the formula value will be updated for any configured phone field on the same object that is enabled for screening.


Back to the PhoneTools (v2.4 onwards) installation walkthrough