Blog

How to automate Address Verification via a Record-Triggered Flow

Introduction

Salesforce Flows give admins a chance to implement advanced processes into their org with clicks, not code. Here at ProvenWorks, we want to empower admins to do more, so building on the capabilities of Salesforce Flows, AddressTools Premium allows you to configure an automated address verification process with no coding knowledge.

This article covers configuring a Salesforce Record-Triggered Flow to queue an address verification process on a record that invoked the flow. This produces a verified address within moments of the flow being triggered. It is dependant on Salesforce Future Methods so be aware that there is expected to be a slight lag between the record being inserted/updated and the address being verified.

Pre-requisites

The component used in the flow comes as part of the AddressTools Premium package. An additional purchase of address verification credits will be required.

If you’re new to AddressTools Premium, please contact info@provenworks.com with your Org ID to have the team enable your org for batch address verification. Without doing this your org will be unable to verify addresses.

With AddressTools Premium installed, the following configurations will require:

  • An address block to be configured in the AddressTools Administration page,
  • An address status field for the address block,
  • Verification enabled for the org and specifically the address block.

If you need assistance on any of the pre-requisites, please refer to the AddressTools Premium Installation Walkthrough before getting started.

Create a Record-Triggered Flow to verify addresses in Accounts

The following example is going to follow verifying the billing address block on accounts using a Record-Trigger Flow on insert and update. This process can be adapted to any object and address block of your choice assuming it’s configured with AddressTools.

  • Go to Salesforce Setup | Flow.
  • Select New Flow.
  • Choose Record-Triggered Flow.
  • Search and select the object that you are configuring the process for.
  • Set Trigger the Flow When to A record is created or updated.
  • Select Done.

Configure Start

  • Object Account
  • Set entry conditions.
  • Configure Trigger A record is created or updated.
  • Condition requirements All Conditions Are Met (AND).
  • We’ll choose the address status field configured with the address block. For this scenario: pw_ccpro__BillingAddressStatus__c Equals Not checked.
  • When to Run the Flow for Updated Records Every time a record is updated and meets the condition requirements.
  • Optimize the Flow For Actions and Related Records.
  • Done.

Configuring an Apex Action

  • Click the plus sign to add an element
  • Add Action| Filter By Type | Apex Action
  • Action: Premise-Level Address Verification
  • Label Verification of addresses
  • API Name Verification of addresses
  • Set Input Values
  • Country-Field API Name: BillingCountry (This value is the API name of the country field configured in the address block. For example, the Mailing Country on Contact would be MailingCountry).
  • ID of record to validate: {!$Record.Id} (This takes the record ID from the record that invoked the flow).
  • Done.

Save the Flow

  • Select Save in the top right.
  • Provide a Flow Label to help you identify the flow in the future.
  • The Flow API Name will autofill.
  • Click Save.
  • Activate the flow.

Testing the Flow

With the flow created and activated, we can now test it in the org.

Note: before testing the flow, we recommend ensuring you have the Batch Verification Alerts Email field populated in AddressTools Administration with your email address.

  • Go to a test account in the Org.
  • Edit the billing address.
  • Save the record.

This will invoke the flow and it may take a few seconds to return the status. If the address status field has not updated by the time the page refreshed, give it a moment and refresh the page.

Book a free demo

We love talking about all things address related! See AddressTools, our address data solution for Salesforce, on a free demo.

Leave a Reply