Blog

How to: solve “Too many SOQL queries: 101” within AddressTools

AddressTools’ triggers handle the standardization, validation, and some elements of verification in a Salesforce organization where the solution is configured.

To guarantee that the solution does what it is designed to do, the functionality invoked by the trigger is designed to be recursive to guarantee it is the last operation in the transaction. This ensures that if there are any other processes executing that touch the address data during the transaction, AddressTools will reinvoke against the data in the record.

A side effect of this behaviour is that for some orgs, “Too many SOQL queries: 101” can occur during an insert or update operation, more commonly during mass operations or organization with lots of processes executing on the upsert operation.

To disable the looping behaviour, follow the steps below:

  • Go to App Launcher | AddressTools Administration.
  • Select the Settings sub-tab and scroll down to Trigger Settings.
  • Click the pencil next to the Run Trigger Only Once setting.
  • Tick the box to enable this setting.
  • Select Save.

If you are still experiencing issues and need assistance, contact support@provenworks.com.


What is AddressTools?

We’re glad you asked! AddressTools is our 5* app for Salesforce which takes the worry out of bad address data by keeping all of your addresses validated, verified, corrected, and standardized. Like the sound of it? Try it for yourself on the AppExchange!

Improving location analysis with quality address data

Salesforce is one of the best CRM platforms out there, and with the acquisition of MapAnything, we’re pleased to see a focus on the importance of location-based use cases. But there’s STILL a problem… These solutions are only as good as the data you put into them. Whilst Salesforce offers a fantastic backbone for storing, organizing and reporting on your data, and MapAnything allows for advanced location analysis, what happens if the address data is invalid?

Many of our customers initially reach out to us with the low quality of their address data dragging down their mapping solutions. Whether it be data missing entirely, or incorrect values, poor data cripples the effectiveness and value of their mapping.

On average, 5% of deliveries will fail. Each failure carries not only the monetary cost of administration, re-handling and re-sending, but also the hidden costs of customer dissatisfaction. Marketing mailing is worthless if the copy never reaches the prospective client. Site visits can be delayed, or flummoxed entirely by an incorrect street or postal code.

So we understand the problem, how can we solve it?

At ProvenWorks, we provide an address quality solution called AddressTools which battles bad address data at the point of entry, both interactively and automatically.

Whether ensuring that spellings are correct or standardized, or that values are entered for certain countries, or fully verifying the address to the exact premise internationally, it all gets handled in Salesforce. Records are automatically flagged to notify the user whether or not an address is valid and deliverable.

Got questions? Chat to us!

Do you want to learn more about how AddressTools could be a great addition to your Salesforce org? We’d love to chat! Use the scheduler to book a free call with our team and start your journey to better address data.

Known bug with ‘Enable Secure Static Resources for Lightning Components’ forces delay to Summer’21

This article covers how to add an “Address Status” field to the NPSP Address object and display it on Household Accounts and Contacts.

By treating the Address object as the “true source” of address information, this is where the custom field belongs. Creating formula fields provides your Org with the functionality it needs to view the custom field data when looking at the Contact or Account record.

This specific use case covers displaying the Address Status field provided with the AddressTools Premium managed package but the following steps can be followed to implement other custom fields added to the Address object.

Adding a Custom Fields to the Addresses Object

As this guide covers the Address Status field provided with AddressTools, we need to add a new field to the Address object.

Create a new field on the Addresses object:

  • Type: Picklist
  • Name: Address Status
  • API Name: AddressStatus (this can be customized to your requirement)
  • Values: Not checked, Not matched, Parsed but not found, Ambiguous, Corrected, Verified.
  • Restrict picklist to the values defined in the value set: False.

If you are following this guide for configuration with AddressTools, see this article to complete an AddressTools implementation on the Address object.

In AddressTools context, any Address Status other than Corrected or Verified are considered “bad addresses” and need reviewing before sending mail.

Creating a Formula on the Contact to Display the Address Status for the Current Address

For Contacts, the Nonprofit Success Pack provides a “Current Address” lookup field which refers to a matching Address record. We will use this lookup to display the Address Status.

Create a new lookup on the Contact object:

  • Type: Formula
  • Name: Address Status Formula
  • Formula Return Type: Text
  • Select Next to enter the formula.

Enter the following formula:

  • TEXT(npsp__Current_Address__r.AddressStatus__c)

Note: ensure the field API name matches what was created in the previous section and TEXT() is only used for picklist fields.

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts
  • Select Save.

Creating a Lookup Field on the Account to Reference the Default Address

For Household Accounts, the Billing Address refers to the Address record where the Default Address equals True. This identifies the address record to fetch the Address Status from.

The Household Account does not have a lookup field as found in the Contact object, so we need to create a custom one.

Create a new field on the Account object:

  • Type: Lookup Relationship
  • Related To: Address
  • Field Label: Default Address
  • Field Name: DefaultAddress (this can be customized to your requirement)
  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts.
  • Select Next and uncheck Add Related List.
  • Select Save.

With the lookup field created, it needs to be automatically populated with the default address.

Populate the Lookup Field on the Account to Reference the Default Address

Create a new Process Builder by going Setup | Process Automation | Process Builder | New.

  • Process Name: Update Parent Account with Default Address
  • API Name: autofill
  • The process starts when: A record changes
  • Select Save.

Choose Object:

  • Object: Address
  • Start the process: when a record is created or edited
  • Select Save.

Add Criteria:

  • Criteria Name: When Address Is Default
  • Criteria for Executing Actions: Conditions are met

Set Conditions:

  • Field: Default Address
  • Operator: Equals
  • Type: Boolean
  • Value: True
  • Select Save.

Add Action:

  • Action Type: Update Records
  • Action Name: Update Parent Account – Record Type: Select a record related to the npsp__Address__c – Type to filter list…: Account
  • Choose
  • Criteria for Updating Records: No criteria—just update the records!

Set new field values for the records you update:

  • Field: Address
  • Type: Field Reference
  • Value: npsp__Address__c > Record ID
  • Save.
  • Active the process builder.

Note: A mass update will have to be run on the Address object to update existing records. You can use a data loading solution such as SimpleImport Premium to complete this job.

Creating a Formula on the Account to Reference the Address Status for the Current Address.

Create a new lookup on the Account object:

  • Type: Formula
  • Name: Address Status Formula
  • Formula Return Type: Text
  • Select Next to enter the formula.

Enter the following formula:

  • TEXT(DefaultAddress__r.AddressStatus__c)

Note: ensure the field API name matches what was created in the previous section and TEXT() is only used for picklist fields.

  • Select Next to Establish field-level security.
  • Select Next to Add reference field to Page Layouts
  • Press Save.

Summary

Your Organization will now have a field on both the Contact and Account referencing the Address Status value stored on the Address record. By leveraging Automated Address Verification in AddressTools, this address status will update automatically removing any requirement for end-user interaction.

Like the sound of AddressTools?

AddressTools is our 5* app for Salesforce which takes the worry out of bad address data by keeping all of your addresses validated, verified, corrected, and standardized. Like the sound of it? Try it for yourself on the AppExchange!

To find out more about how AddressTools Premium can improve the Nonprofit Success Pack, please do get in touch!

AddressTools: address verification statuses

AddressTools enables Salesforce users to verify address data through a number of means such as Scheduled Batch Address Verification, the Address Verification Flow Component and at point of entry with the package’s core functionality!

Six statuses are returned via the address verification processes, see their values and descriptions below:

  1. Verified – Address verified without change
  2. Corrected – Address verified with corrections
  3. Ambiguous – Address values match multiple verified addresses
  4. Parsed but not found – Address values partially matched to a verified address
  5. Not Matched – Address values cannot be matched or parsed
  6. Not Checked – Address has not been verified

If you’re looking to verify your address data in Salesforce, get in contact with info@provenworks.com to see how we can help!

How to: setup automated international address verification via Process Builder

Before getting started:

  • Requires an active verification credits subscription in your organization.
  • The address block requiring verification must be configured in the AddressTools Administration Address Blocks.
  • This feature is only suitable for low-volume data upsertion due to dependencies on ‘future methods’. Check out Scheduled Address Verification for high-volume implementations.

Create a New Process

Navigate to Setup | Process Automation | Process Builder.

Select New.

Provide a Name and API Name.

Set The process starts when to A record change.

Press Save.

Choose Object

Select Add Object to open the Choose Object panel.


Select Find an object…

Choose the relevant Object.

Under Start the process, select the appropriate option for your use case from the available options.

Press Save.

Add Criteria

Select Add Criteria to open the Define Criteria panel.

Name the criteria using the Name Criteria field.


Set Criteria for Executing Actions to Conditions are met.

Under Set Conditions, select the Find a Field and select the associated Address Status field for the address block and press Choose to confirm.


Set Operator to Equals.

Set Type to Picklists.

Set Value to Not checked.

If you want to add more criteria, select Add Row.

Set Conditions to All of the conditions are met (AND).

Press Save.

Add Action

Select Add Action to open the Select and Define Action panel.

Set Action Type to Apex.



Name the action using the Action Name field.

Set Apex Class to Premise Level Address Verification.

Set Country-field API name | Type to String.


Set Country-field API name | Value to the address block’s country field API name.

Set ID of record to validate | Type to Field Reference.

Select Find a field… to open the Select a Field modal.

Select the Object’s ID field.

Select Choose.

Select Save.

Activate and Test

Select Activate.

Select Confirm.


Insert a record into your object with a complete address block and the necessary criteria to meet to rules configured in the Add Criteria section. Once the record has been inserted, you may need to refresh the page to display the updated status,

Contact Us

If you are experiencing any issues with the setup, please reach out to: support@provenworks.com where a member of our team will be happy to assist.


Back to the AddressTools Premium installation walkthrough

Information: what data is sent to ProvenWorks servers when using AddressTools?

This article will cover:

  • AddressTools Free
  • AddressTools Premium

The org details which are public on the partner support interface are sent to us and we receive general org information which is used for licencing and credit verification.

If you use our premise level address verfication or batch verification then address blocks are sent to our servers for processing.

Contact Us

If you have any other questions relating to AddressTools Free or Premium then please do not hesitate to contact us at support@provenworks.com. We will be happy to answer any questions or help with any problems you may have.

Notice: AddressTools “query access to the ValidatedField__c object”

AddressTools Spring’20 Notice

In Spring’20, Salesforce is restricting access to custom settings which had previously been accessible by all users within your Org by default.

If you are experiencing the following error: The current user does not have query access to the ValidatedField__c object or one of its fields which access is required.

You will be required to manually assign the profile with access to the AddressTools custom settings. This can either be done by:

Profile Custom Setting Definitions.

Go to Setup | Profiles | [Profile in Question] | Custom Setting Definitions | Edit. Move CountryComplete Settings and available AddressTools Fields to Validate to the enabled lists. Select Save.

View All Custom Settings Profile Permission.

Go to Setup | Profiles | [Profile in Question]. Search for View All Custom Settings and check it. Save the changes.

Both of the above can either be applied via a Permission Set or directly on the affected profiles themselves.

To find out more about this change and how to configure permission sets, you can read the official Salesforce release notesreleasenotes.doc.salesforce

Contact Us

If you have any other questions then please do not hesitate to contact us at: support@provenworks.com. We will be happy to answer any questions or help with any problems you may have.

How to: deploy AddressTools to users in your organization

Overview

With AddressTools now installed in your Org, it is essential to provide your users with the correct permissions to use the solution.

This article will explain what permissions are required for users to be able to use AddressTools functionality.

It is recommended that a permission set is created for AddressTools so that it can be applied to multiple users/profiles but these settings can be directly applied to the profiles.

Object and Field Permissions

Setup each object and associated fields with the permissions noted in the table below.

ObjectObject PermissionField NameField Permission
UsersN/AQuickComplete CountryRead
CountriesView AllAll fieldsRead
StatesView AllAll fieldsRead
ZIP CodesView AllAll fieldsRead
Time ZonesView AllAll fieldsRead
Alternate Country NamesView AllAll fieldsRead
Alternate State NamesView AllAll fieldsRead

For versions after 7.53

ObjectObject PermissionField NameField Permission
ZIP Code CountiesView AllAll fieldsRead

Apex, Visualforce and Custom Settings

The user/profile will need access to all Apex Classes with the prefix:

  • pw_ccpro__

The user/profile will need access to the following Visualforce Pages:

  • pw_ccpro__CountriesJavaScript
  • pw_ccpro__SessionIdPage

The user/profile will need access to the following Custom Setting Definitions:

  • CountryComplete Settings
  • AddressTools Fields to Validate

License Allocation

After deployment to production, a licenses must be allocated to each users.

This can be managed in Setup | Installed Packages | Manage Licenses next to AddressTools.

API Enabled

Users wishing to leverage the interactive functionality available in the tool require the permission API Enabled.


Back to the AddressTools Premium installation walkthrough

Address verification in Salesforce Flow Screens for auto-completing addresses

Lightning Flows are fast becoming one of Salesforce’s favourite features with adoption of the technology rapidly growing, however some of the provided Flow Screen Components available in Lightning Flow Screens do not compete with modern day technologies that us users have become accustomed to.

Here at ProvenWorks we love addresses, so we’ve taken a look at the Flow Screen Input Component: Address to see what we can do to improve it. By following the ‘no-code’ luxuries of Salesforce Flows, we’ve created a new Lightning Web Component which provides your flow screens with type-ahead PowerSearch address entry which auto-completes entered addresses. It’s designed in a way to allow your Administrators to ‘hot-swap’ the vanilla Address component with the Address Verification by ProvenWorks component followed by a quick re-binding of any set flow variables within the component.

This component provides your end users with a single search field which reduces keystrokes and also verifies the address at the point-of-entry. Reduced keystrokes means a reduced time spent on data entry, and a verified address reduces the amount of failed deliveries. A double-win! (It also comes with additional features such as custom CSS support and an inline display mode).


Try out our Address Verification Flow Component

Want to get more out of your Salesforce Flows with an Address Verification Component? Our Address Verification Flow Component is available on the AppExchange.

Try it out with a 2 week free trial today!

New and improved address verification features for Salesforce!

If you already have a subscription to AddressTools Premium and address verification credits, then good news! You get all the following upgrades included in your current plan.

If you’re here and don’t use AddressTools Premium but see something you like, get in touch with us to find out more. Alternatively, take AddressTools for a spin on the AppExchange with a free trial!

Typeahead address verification for Salesforce

We have released typeahead PowerSearch for premise-level address verification.


As you start typing, a list of addresses will appear that will narrow down as you enter in more information. This will allow users to quickly look for available addresses and save time by allowing them to select the correct address as soon as they see it in the picklist.

To get this enabled, upgrade to package version 7.50 or later and email support@provenworks.com so that we can make the switch to PowerSearch.

Batch Address verification for Salesforce Reports

We’ve made it even easier to verify your existing Salesforce address data as you can now verify addresses defined in a report. Either verify the addresses in the report as a one off, or take advantage of the scheduling feature to run the job daily.


To get this enabled, simply upgrade to the latest version on the AppExchange and follow this guide to test it out!

How do I upgrade to the latest version?

Please see our release history for information on additions to the package. We recommend upgrading in Sandbox first before upgrading in Production.

Got questions? Chat to us!

Do you want to learn more about how AddressTools could be a great addition to your Salesforce org? We’d love to chat! Use the scheduler to book a free call with our team and start your journey to better address data.