Querying list of zip codes?

Options
Does anyone know if there's some way to create a query or group from a large group of zip codes without entering them in one-by-one?


We frequently get people requesting that we send to a huge list of zip codes, where even querying by a range isn't really an option. What I would love to have is a way to copy and paste a list of zip codes (space or comma separated) to create a group of people with those zip codes. 


We often create radius groups in Luminate Beta, but again, doing a large list would mean doing them one-by-one.
Tagged:

Comments

  • Reid, have you tried creating a new group in Luminate Online (which can be done from a .csv file) then using that custom group in Beta? We (for other reasons) are not using Beta yet, but I know that our custom groups (which we mostly use to segment/target email audiences) are showing up now there.


    I have an instruction doc (with screenshotes!) created by our Blackbaud CRM (our database of record) expert, on how to create and upload to a new group in LO; glad to share if you'd find it helpful.


    Gurukarm
  • Yea, I'd go with Gurukarm's suggestion.


    Export your constituents to a csv, and then use that with a Group Assignment Upload.

     
  • Thank you, Gurukarm! That document would be helpful, though I'm missing the part where the zip codes needed would be entered. How would we initially get a group of people that are only in that list of zip codes?
  • any way you can share that set of instructions w. me too?  we're in a similar situation of needing to use either RE Query or csv file to LO for an email
  • renee ritsi:

    any way you can share that set of instructions w. me too?  we're in a similar situation of needing to use either RE Query or csv file to LO for an email


    It's not really possible at the moment, as far as I know. I had to get around it internally by just limiting the number of zip codes that people can request. Note that you can also define ranges in queries by the numbers that they start with. It's not quite as accurate, and you have to find some external zip code sites that will show you what two or three digits cover what areas, but it could be a solution.
  • Easiest method we've found is to use county locations. It's a major pain in the rear to figure out who lives where, but it's quite a bit more efficient than the zip route, and usually results pretty closely to what you'd get with individual zips.
  • Alex Wong
    Alex Wong ✭✭✭✭✭
    Ninth Anniversary Facilitator 4 Name Dropper Photogenic

    Hi, I was searching for an answer and didn't find any, so I figure out a way to do it from a programming perspective (no coding experience needed though now that I figured it out).

    First of all, let me say why my org need it. We have 25 chapters nation wide and while most chapter is within state line, some chapters share the same state, few of which I am able to create query for using the built-in group of County. However, there are a few chapters that even county boundary isn't good enough, and we had to go into zip code boundary. Therefore I needed to be able to query on zip codes.

    2 NOTES:

    • since zip code can be entered with 5-digit or 5+4, the criteria uses "begins with" operator
    • there is a HARD limitation on total number of criteria at 113, so for those we need more than 113 criteria lines, we create 2 (or 3) "prep" queries, use them as group, and then finally have a query that criteria being one of the 2-3 "prep" queries.

    Ok, let's get started

    • Login to your LO admin using Google Chrome (It should work in firefox or Edge, but I just never test it)
    • Start with a New Query
    • (see image 1) In the Query Builder, right-click somewhere on the page and select Inspect, that should bring up a new window for DevTools and then click on the tab that say Console
      • if you didn't get a new window, but instead get the DevTool “open at the bottom half” of your browser, that's fine too, just cleaner to be in another window
    • (see image 1) Paste in the following code in the Console
      var zips = ['32003','32004','32006','32007','32008','32009','32011','32013','32024','32025','32026','32030','32033'];
      for(i = 0; i < zips.length; i++) {
      var xhttp = new XMLHttpRequest();
      xhttp.open("POST", "https://"+location.host+location.pathname,false);
      xhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
      xhttp.send("10.103.focus=addr_home&10.103.operator=op_bw&10.103.value=" + zips[i] + "&set.phrase=Save&type_id=10.103&phrase_id=0");
      }
      • (yellow highlight) Update the zips variable with the zip codes you want to criteria with each zip code in either double or single quote (basically need to make a string array of zip codes for those slightly more technical).
        • Message me if you need help in making a bunch of zip into the single quoted format.
      • Once you done with updating the code, hit enter to execute
    • (see image 2) Click to the Network tab, and you should see a lot of activities, 1 for each zip you entered. My test here have 13 zip codes, when you see no more “network activities” you know you are done, you can close the DevTools, and then just reload the Query Builder page now having all the zip codes criteria-ed (see image 3)
    • This takes matter of seconds to do (after you get familiar)
    • Also, if you are confident that your zip code data is only 5-digit zip, and want to use equals operator instead of begins with operator, just change out the code where you see operator=op_bw to operator=op_eq

    Image 1:

    01da57a04b42418fd44153baceaa7bc7-huge-im

    Image 2:

    dc0d0deb511aeb3ff449d8ed9c9f2f85-huge-im

    Image 3:

    6f972b237f3f9fdb650bb397d8318f6f-huge-im

Categories