Validate Addresses with Power Automate: Smarty (Unbound Action)

Smarty - Configuration

Overview

Address Validation for Dataverse exposes Smarty address verification as two Dataverse unbound actions. Power Automate can call them with the standard Microsoft Dataverse connector and its Perform an unbound action step:

ActionSmarty productUse for
sharpxrm_VerifyWithSmarty (Verify With Smarty)US Address VerificationAddresses in the United States, including Puerto Rico and the other US territories
sharpxrm_VerifyWithSmartyInternational (Verify With Smarty International)International Address VerificationAddresses in every other country

Smarty sells these as two separate products with their own results and subscriptions. They are therefore two actions, not one action with a country switch, so a flow never silently changes which product it uses. The example flow in this article routes each contact to the right action based on its country.

Both actions return a standardized address, a precise verification status and a list of missing components. They do not update any record. Your flow decides whether the result is good enough to write back.

Address autocomplete is not available as a Power Automate action: Smarty's terms allow US Address Autocomplete only for people typing in a form. Use the verification actions for automated validation.

[Screenshot placeholder: overview of the example flow.]

Before you start

  • Address Validation for Dataverse is installed in a version that includes the Smarty actions (sharpxrm_VerifyWithSmarty appears in the Action Name list).
  • A valid Address Validation license that includes the Smarty add-on. Without a valid license, the actions return ResultFound = Failed with the message There is a problem with the product licence. Please contact the administrator.
  • A Smarty subscription for US Address Verification, International Address Verification, or both.
  • An active API Configuration row with Validation Service Type = Smarty Api that holds your Smarty secret key, entered as your Auth ID, a colon, then your Auth Token. The actions run on the server, where an embedded key is refused. If you also use the Smarty autocomplete control, create two API Configuration rows: one with the embedded key for the control (for example Smarty Autocomplete), and one with the secret key for verification (for example Smarty Verify). See Set up your Smarty API Keys.
  • A Microsoft Dataverse connection in Power Automate.

Cost: Smarty bills per lookup. Each verification uses one lookup from the US or the international subscription.

How the example flow works

  1. When a row is selected (Contacts): users run the flow from the Flow menu on a contact.
  2. Get contact (Get a row by ID): reads the Address 1 columns.
  3. Get Smarty configuration (List rows) and Configuration found (Condition with a Terminate in the False branch).
  4. Is US address (Condition): sends US addresses to sharpxrm_VerifyWithSmarty and everything else to sharpxrm_VerifyWithSmartyInternational.
  5. Smarty result (Compose): merges the output of whichever action ran, so later steps have a single place to read from.
  6. Is deliverable match (Condition): overwrites Address 1 only when Smarty confirms the address is deliverable.

Find the API Configuration

Use List rows on APIs Configuration to find the secret-key record by name:

FieldValue
Table nameAPIs Configuration
Select columnssharpxrm_sharpxrmconfigurationid,sharpxrm_name
Filter rowssharpxrm_name eq 'Smarty Verify' and statecode eq 0. Use the API Config Name of your secret-key record.
Row count1

[Screenshot placeholder: List rows action that finds the Smarty Verify API Configuration.]

Route by country

The Is US address condition compares this expression with true:

contains(createArray('', 'US', 'USA', 'UNITED STATES', 'UNITED STATES OF AMERICA'), toUpper(trim(coalesce(outputs('Get_contact')?['body/address1_country'], ''))))

Add any other spellings your data uses. In this example, contacts with no country go to the US action, because the international action requires a country. If most of your addresses are outside the United States, remove '' from the list and handle missing countries separately.

[Screenshot placeholder: the Is US address condition.]

Call the unbound actions

In each branch, add Microsoft Dataverse > Perform an unbound action. Choose sharpxrm_VerifyWithSmarty in the True branch and sharpxrm_VerifyWithSmartyInternational in the False branch. Both actions take the same inputs, except that only the international action has IncludeGeocoding. The API Configuration input lists every column of that table; only the ID field needs a value.

[Screenshot placeholder: Perform an unbound action configured for sharpxrm_VerifyWithSmarty.]

[Screenshot placeholder: Perform an unbound action configured for sharpxrm_VerifyWithSmartyInternational.]

Input fields

Designer fieldRequiredWhat to enterValue used in the example
Sharpxrm_sharpxrmconfiguration
item/APIConfiguration/sharpxrm_sharpxrmconfigurationid
YesThe ID of the API Configuration row that holds the Smarty secret key.first(outputs('Get_Smarty_configuration')?['body/value'])?['sharpxrm_sharpxrmconfigurationid']
item/InputStreetAddressYesHouse number and street.Address 1: Street 1
item/InputUnitNumberRecommendedApartment, suite or unit. Buildings with several units are only deliverable when the unit is supplied (see MissingSecondary below).Address 1: Street 2
item/InputCityRecommendedCity. For US addresses, supply at least the city and state, or the ZIP code.Address 1: City
item/InputStateRecommendedState, province or region.Address 1: State/Province
item/InputZipPostalCodeOptionalZIP or postal code.Address 1: ZIP/Postal Code
item/InputCountyOptionalCounty.Address 1: County
item/InputCountryRequired for internationalCountry name or ISO code (for example US, CA, GB). The US action accepts it empty, and refuses any country other than the United States without using a lookup.Address 1: Country/Region
item/IncludeGeocodingOptional (international only)No by default. Yes returns latitude and longitude when your Smarty subscription includes international geocoding. If it does not, the address is still verified and VerificationDetails explains why there are no coordinates.No
item/RecordLogicalNameOptionalLogical name of the row being validated. Used only to stamp the transaction log.contact
item/RecordIdOptionalID of the row being validated, for the transaction log only.Contact ID

A transaction log is written only when Save Transaction Logs is enabled on the API Configuration row.

Output values

OutputDescription
ResultFoundSuccess whenever Smarty returned a usable standardized address, including addresses that are correct but not yet deliverable (for example, missing an apartment number). Failed when nothing usable came back.
VerificationStatusThe exact verdict, for branching: Verified, Corrected, MissingSecondary, Unverified, Insufficient or Unknown (see the table below).
MissingComponentsExactly what is missing, so a flow can ask the user for it.
VerificationDetailsA readable explanation, including Smarty's corrections, postal service notes, vacancy and any notes about coordinates.
ConfidenceVERY HIGH (with a space), HIGH, MEDIUM or LOW.
StreetAddress, UnitNumber, City, State, ZipPostalCode, CountyThe standardized components. The street and the unit are always returned separately.
CountryThe two-letter ISO country code (for example US, GB), not the country name.
ExtendedZipPostalCodeThe ZIP+4 extension for US addresses (sharpxrm_VerifyWithSmarty only).
FullAddressThe complete formatted address on one line.
Latitude, LongitudeAlways for US addresses that Smarty could place. For international addresses, only when IncludeGeocoding is Yes and your subscription includes international geocoding. Otherwise 0.
EntityTypeRESIDENTIAL or BUSINESS for US addresses, when Smarty reports it.
VerificationStatusResultFoundConfidenceMeaning
VerifiedSuccessVERY HIGHDeliverable as supplied. Internationally, this also covers a match to the most precise level Smarty's data offers for that country.
CorrectedSuccessHIGHDeliverable after Smarty corrected it, for example the ZIP code or a spelling.
MissingSecondarySuccessHIGH or MEDIUMThe address is right but needs an apartment or suite, or the unit supplied is not recognized. Internationally, the street was confirmed but not the building number.
UnverifiedFailedLOWCould not be matched, matched several addresses, or matched only to the city.
InsufficientFailedLOWNot enough input to identify an address.

Example result

Verifying 780 Greenwich St, New York, NY with sharpxrm_VerifyWithSmarty returns (abridged):

{ "ResultFound": "Success", "VerificationStatus": "MissingSecondary", "MissingComponents": "Secondary number (apartment, suite, etc.)", "Confidence": "HIGH", "StreetAddress": "780 Greenwich St", "City": "New York", "State": "NY", "ZipPostalCode": "10014", "ExtendedZipPostalCode": "5919", "County": "New York", "Country": "US", "EntityType": "RESIDENTIAL" }

Merge the result and decide whether to update

Add a Compose action named Smarty result after the condition, set to run after both branches, with this expression:

coalesce(outputs('Verify_with_Smarty')?['body'], outputs('Verify_with_Smarty_International')?['body'])

Then add an Is deliverable match condition that checks whether outputs('Smarty_result')?['VerificationStatus'] is Verified or Corrected, and update the contact's Address 1 columns only in its True branch. A MissingSecondary result is a good trigger to ask for the missing unit, because the rest of the address is already correct.

[Screenshot placeholder: Compose action that merges the two Smarty outputs, and the Is deliverable match condition.]

Troubleshooting

SymptomWhat to check
sharpxrm_VerifyWithSmarty is not in the Action Name listThe installed Address Validation version does not include the Smarty actions.
There is a problem with the product licence. Please contact the administrator.The Address Validation license has expired.
The API configuration holds a Smarty embedded (website) keyUse the ID of the row that holds the secret key (Auth ID and Auth Token).
The API Key starts with the word "AuthID", or the part after the colon looks like an Auth IDRe-enter the API Key as your real Auth ID, a colon, then your real Auth Token.
Smarty rejected the credentials (HTTP 401)The Auth ID and Auth Token do not match an active secret key in your Smarty account.
No active subscription, or lookups used up (HTTP 402)Your Smarty account has no subscription for that product (US or international), or its lookups are used up.
Smarty throttled the request (HTTP 429)Too many requests, or the same address sent repeatedly. Wait and retry, and check the flow is not looping.
The Smarty US API only verifies United States addressesCheck the country condition: the address belongs in the international branch.
The action needs an API configuration whose Validation Service Type is "Smarty Api"The configuration ID points at another provider's row.

Was this article helpful?