Smarty provides address autocomplete and address verification for the United States and for more than 240 other countries. Address Validation for Dataverse uses your own Smarty account: you enter your Smarty keys in Dataverse, and Smarty bills your account directly. This article explains which Smarty keys you need and how to enter them.
Before you start
- A Smarty account (smarty.com) with a subscription for each Smarty product you plan to use. Smarty sells US and international services separately:
- US Address Autocomplete and/or International Address Autocomplete, for the autocomplete control on your forms.
- US Address Verification and/or International Address Verification, for workflows and Power Automate.
- Optionally, international geocoding if you want latitude and longitude for addresses outside the United States. US verification always includes coordinates.
- An Address Validation license that includes the Smarty add-on. Without it, the autocomplete control shows a license message.
You need two kinds of key
Smarty issues two kinds of key, and Address Validation uses both:
| Key | What it looks like | Used by | Why |
|---|---|---|---|
| Embedded key (website key) | A number, for example 123456789012345678 | The Smarty autocomplete control on your forms | The control runs in the user's browser, so it uses a key that Smarty only accepts from the host names you authorize. |
| Secret key | Two values: an Auth ID and an Auth Token | Workflows and Power Automate actions | Verification runs on the server. Smarty does not accept embedded keys from server environments, and the Auth Token must never be used in a browser. |
Each API Configuration record holds one key, so you create two API Configuration records if you use both autocomplete and verification.
Step 1: Get your keys from Smarty
- Sign in to your Smarty account and open the API Keys page.
- Under Embedded Keys, create a key or use an existing one, and add your Dataverse environment's host name to its authorized hosts, for example
contoso.crm.dynamics.com(withouthttps://).- Each environment has its own host name. Add every environment that uses the control, for example your development, test and production environments.
- A wildcard such as
*.crm.dynamics.comcovers every environment in that region, but not the bare domain. The region part of the host name varies, for examplecrm3for Canada andcrm4for Europe.
- Copy the embedded key.
- Under Secret Keys, copy the Auth ID and the Auth Token. Keep the Auth Token private: Smarty treats disclosing it as a breach of its terms.
[Screenshot placeholder: Smarty API Keys page showing an embedded key with its authorized hosts, and the Secret Keys section. Blur all key values.]
Step 2: Create the API Configuration records
- In the Address Validation for Power Apps app, go to Settings > API Configuration.
- Create a record for the autocomplete control:
- API Config Name: a unique name, for example
Smarty Autocomplete. - Validation Service Type: Smarty Api.
- API Key: your embedded key.
- API Config Name: a unique name, for example
- Create a second record for verification:
- API Config Name: for example
Smarty Verify. - Validation Service Type: Smarty Api.
- API Key: your Auth ID, a colon, then your Auth Token, with nothing else. For example:
8d497be5-e211-4949-a18f-0bfd1d9970d3:th4hargQiuyG7w7L7xfO(these are Smarty's documentation example values, not real keys). Do not type the words "AuthID" or "AuthToken".
- API Config Name: for example
- Save each record. To log each Smarty call, set Save Transaction Logs to Yes; the details appear in Logs, under the Resources area.
[Screenshot placeholder: the "Smarty Verify" API Configuration record with Validation Service Type = Smarty Api. Blur the API Key.]
Address Validation protects the secret key: the autocomplete control will not load from a record that holds a secret key, and the verification steps will not use an embedded key. In both cases you get a message that says which key the record should hold.
Costs and limits
- Smarty bills per lookup, and each Smarty product has its own allowance.
- US Address Autocomplete counts every search request, including opening the list of units in a building. To keep this low, the control waits until the user has typed 3 characters and paused briefly before it searches.
- International Address Autocomplete counts one lookup when the user selects an address. Searching is not counted.
- Each verification uses one lookup. US verification includes latitude and longitude. International coordinates are returned only when you request them and your Smarty subscription includes international geocoding.
- Smarty limits how many autocomplete requests one user can send in a short time. For a busy team, add your office's public IP address to the embedded key in Smarty; requests from that IP address are not limited in the same way.
- Smarty also refuses the same address sent many times in a short period, to prevent runaway charges from a loop.
Your Smarty data
- You are Smarty's customer, under Smarty's own subscription agreement. Your keys stay in your Dataverse environment and are used only for your own records.
- Verified address data can be kept after your Smarty subscription ends. Some precise (rooftop) coordinates are licensed only for the term of your Smarty subscription; when such coordinates are returned, the verification details say so.
- US Address Autocomplete may only be used by people typing in a form, not by automated processes. For automated validation, use the verification steps in workflows or Power Automate.
Troubleshooting
| Symptom | What to check |
|---|---|
| The autocomplete control says the host name is not authorized, or that it could not reach Smarty | Add the environment host name shown in the message to the embedded key's hosts in Smarty. Also check that the control's API Configuration holds the embedded key. If users connect through a VPN or virtual desktop, add its public IP address to the key. |
| The control says the record holds a Smarty secret key pair | The control is pointed at your verification record. Point it at the record that holds the embedded key. |
| A workflow or flow says the API configuration holds a Smarty embedded (website) key | Point the step at the record that holds the secret key (Auth ID and Auth Token). |
| A workflow or flow says the API Key starts with the word "AuthID", or that the part after the colon looks like an Auth ID | Re-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. Copy them again from the API Keys page. |
| No active subscription for a product, or lookups used up (HTTP 402) | Your Smarty account has no active subscription for that product, or its lookups are used up. US and international products are separate subscriptions. |
| The step needs an API configuration whose Validation Service Type is "Smarty Api" | The selected API Configuration record is for another provider. Select a Smarty record. |
| The control reports a license error | Your Address Validation license does not include the Smarty add-on. Update your license or contact support@sharpxrm.com. |