Skip to content

Configure Automated Verification via a Record-Triggered Flow

Overview

This guide covers building a record-triggered flow: one that fires whenever a record is created or updated and meets the conditions you set. The flow watches for records whose address has not yet been checked and calls the AddressTools verification action on each one, so an address is verified at the point it is saved rather than waiting for a scheduled batch.

That makes it the right choice when addresses need to be correct immediately, for example on a lead captured from a web form or an account created by an integration.

Automated verification relies on address verification being enabled in your org, so turn that on first. See Verification, which covers the settings involved both org-wide and on each address block.

Before You Start

  • The address block you want to verify must be configured, with an address status field mapped. See Binding an Address Block and Create an Address Status Field.
  • Verification must be enabled for your org and for that address block. See Verification.
  • Verification consumes one verification lookup per address. A flow verifies every record that meets its conditions, so consider the volume before you activate it, including records created by integrations.
  • Any user whose save triggers the flow needs an AddressTools license, integration users included. See Assign User Licenses.

Note: In a sandbox org, automated verification has to be enabled for you. Contact support@provenworks.com with your Org ID.

Step 1: Create the Flow

  1. Navigate to Setup > Flows and click New Flow.
  2. Select Record-Triggered Flow, then click Create.
  3. Choose the Object holding the address, for example Account.
  4. Under Configure Trigger, select A record is created or updated.

Step 2: Set the Entry Conditions

The entry conditions are what stop the flow running in a loop, so set them before anything else.

  1. Set Condition Requirements to Any Condition Is Met (OR).
  2. Add two conditions, both on the address status field for the block. The example below uses the Account billing address status field:

    Field Operator Value
    pw_ccpro__BillingAddressStatus__c Equals Not checked
    pw_ccpro__BillingAddressStatus__c Equals Blank Value (Empty String)
  3. Set When to Run the Flow for Updated Records to Every time a record is updated and meets the condition requirements.

  4. Set Optimize the Flow for to Actions and Related Records.
  5. Click Done.

Note: These conditions matter. Verification updates the address status field, which updates the record, which would re-trigger the flow. Running only while the status is unchecked means each address is verified once.

Step 3: Add the Verification Action

  1. On the canvas, add an Action element using the + symbol.
  2. Search for and select the Premise-Level Address Verification apex action.
  3. Give the action a Label, for example Verify address. The API Name fills in for you.
  4. Set the inputs:

    Input Value
    ID of record to verify {!$Record.Id}
    Country-field API name The API name of the country field for the block you want verified, for example BillingCountry
  5. Click Done.

Note: Leave Country-field API name empty to verify every address block configured on the record. Set it when the object has more than one address and you only want one of them verified, for example BillingCountry on Account or MailingCountry on Contact.

Step 4: Save and Activate

  1. Click Save.
  2. Enter a Flow Label, confirm the API Name, and click Save.
  3. Click Activate.

Step 5: Test it

  1. In AddressTools Administration > Settings, set Batch Verification Alert Email Address to an address you can check, so any errors reach you.
  2. Open a test record on the object.
  3. Edit the address fields and save.
  4. Check at the address status field. You may need to refresh the record page if it still reads Not checked.

Note: The same flow works for any object and address block configured in AddressTools. Repeat these steps per object, pointing each flow at that object's address status field.

How the Verification Runs

The action verifies the address asynchronously, using a Salesforce future method, so expect a short lag between the record being saved and the address status changing. The record itself saves immediately, so your users are never kept waiting for verification.

Because the work happens after the flow has finished, the verified values are not available to the rest of the flow. If you need to branch on the outcome, read the address status from a later trigger rather than expecting the action to return it.

Monitoring and Errors

Set Batch Verification Alert Email Address in AddressTools Administration > Settings to an address that is monitored. Errors raised while verifying are emailed there, each ending with a trace ID (see Trace IDs). Unless you subscribe to the Automated Address Verification Error platform event, this email is the only notification you get: a flow that fails to verify does not stop the record saving, so nothing surfaces to your users.

After Verification Runs

Verified records carry their result in the address status field, and any address AddressTools was able to clean has its street, city, state, country and postal code updated, along with any optional fields mapped on the block. Records it could not match keep their original values and take a status explaining why. See Create an Address Status Field for what each status means.

To work through addresses already in your org instead of verifying them as they change, see Configure Batch Address Verification.