1

We recently linked our CiviCRM database to the USPS address verification system, which saves me time verifying addresses and looking up the Zip+4 codes. However, Civi now makes the addresses all caps, which is a real pain when printing PDF letters which include the name and address of the contact in the letter. I find myself copying the address out to a text editor, converting it to initial caps, then pasting it into my Civi letter. Do you know of a way to automate this in Civi?

2

The problem is that the standard is to have addresses all-caps, without punctuation, and with various standard abbreviations. Some clients have asked us if we could "fix" them in bulk to be mixed case, but I point out that the standardization will simply restore the all-caps the next time someone saves the address.

Two options:

  1. You can use Smarty to modify your addresses. You'll first need to enable Smarty processing of mail templates. Then you'll need to assign your token(s) to a variable and then output the variable with proper capitalization:

    {capture assign=address}{contact.street_address}{/capture}{capture assign=city}{contact.city}{/capture}
    {$address|capitalize:true:true}
    {$city|capitalize:true:true}, {contact.state_province} {contact.postal_code}
    

    This will work, though have fun training your coworkers on how to use Smarty. Also, words with internal capital letters ("MacArthur Blvd") will come out wrong ("Macarthur Blvd").

    You still will be missing periods on your abbreviations no matter what, however.

  2. You can use a different address standardization tool. Most are paid, though at least one client has had luck with SmartyStreets giving them a free account because they're a charitable nonprofit.

    With SmartyStreets, you can use the extension that my coworker Tyrell built to auto-suggest standard addresses as you type. We haven't confirmed it works perfectly for 4.6 yet (it definitely supports 4.4 and 4.5, though), but I don't know of any problem spots. If you encounter problems, please let us know.

1

You might consider investing in commercial software that performs the address standardization and move update tasks. Those products should return the original data unchanged. Appended to the records is the standardized address. Print the letter with the original data fields and print the delivery address with the USPS fields.

If the address on the letter shows through an envelope window, you’ll have to print the delivery address according to USPS standards to qualify for postage discounts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.