Mar 12, 2020

Search like a pro

Customer search in Dialfire
Customer search in Dialfire

As a Dialfire superuser, you have probably worked with the customer search function before. It works so intuitively that you hardly need to think about it, because in the simplest case, you would search as if you were using a search engine.

However, Dialfire still has some great tricks up its sleeve, which I'm happy to reveal here.

The customer search works for the agent in exactly the same way as in the contact view, so a few tricks can't hurt to find the customer quickly with as little information as possible, especially when it comes to inbound calls.

The pleasant part

Where there is light, there is also shadow, and so there are limitations in the search function that you will stumble upon sooner or later. But let's start with the pleasant part.

Search with Joker

In contrast to Google or Bing, Dialfire allows you to abbreviate terms using the wildcard character *. If you search for M*ller, you will find both Miller and Muller. You can also use the wildcard character to find fields with a specific beginning, e.g. New* matches New York as well as Newark. Of course, you will also find both cities if you search for the end of a word - i.e. *rk.

Search for telephone numbers

Dialfire checks each search term to see if it could be a telephone number, and if so, it automatically converts the number to international format. So you can easily use your country-specific spelling. The spelling just needs to match the country that is set in your account or campaign.

Search for several words

If you want to search for several words at the same time, you only have to separate them with a space (e.g. Martin Muller), but if your search word itself already contains a space, just put it in quotation marks, e.g. "New York".

The search words that you separate by spaces must always be all present in the record, otherwise they will not be found. However, if you want to search for records that contain either one or the other term, simply separate these with a comma instead of the space. This also works in combination with several words, so if you search for Peter,Mary Miller, you will find both Peter Miller and Mary Miller.

Even if you enter several values separated by commas, you can use wildcards, so the search Pe*,Ma* will find all records containing Peter or Mary.

Search in specific fields

To search only in certain fields, simply write the field name and an equal sign in front of the search word, e.g. firstname=Peter. Of course, to the right of the equal sign can also be a list or contain wildcards.

If you only want to filter records whose field revoked is empty, simply type revoked=.

Search for fields with multiple values

In Dialfire, data fields can also contain several values at the same time; these are then separated by commas. This is useful when you use a checkbox list to select several options that are stored in a common field, saving you the trouble of creating a new field for each option.

You can search for the individual values within the field as usual. If the field order_items has the value product1,product3, then you will find this record as soon as you search for order_items=product3. And if you search for order_items=product2,product3, then you will of course get all records in which this field contains product2 or product3.

But what do you do when you search for records where product1 and also product3 was sold? Can you guess?

Correct! You search for both values separated by a space, so order_items=product1 order_items=product3. Intuitively, the query seems to contradict each other. But stringing together search terms separated by a space means exactly that all these conditions must be met.

The challenges

Customer search is a technically very complex process, as we still want to achieve perfect performance even for extremely large campaigns with many millions of records, which forces us to make some optimizations that have certain limitations.

The resigned search function

Have you also ever made a search query in Dialfire and received the message Giving up. Please refine your query.? I bet you were about to give up, too.

But what exactly does this message mean and what can be done about it? As customer records have to be found in fractions of a second, especially for inbound calls, Dialfire does not allow long queries with runtimes of several minutes. Every search is fast - or is aborted with this message.

If you receive this message, you should try to specify more precise search criteria that will reduce the result set.

To avoid seeing this message in the first place, you should set fields that you need to search for frequently to searchable in the form, this will then speed up the search enormously.

But beware, you can only turbocharge 10 fields in total, so if you have to make a decision, choose as searchable fields those that contain many different values, so that the search in this field alone will greatly limit the result set.

Search for larger or smaller values

Dialfire knows besides the equal sign, the usual comparison operators > >= < <= !=. However, Dialfire never compares these values as a number but always as text. This is also valid if you have marked the field as numeric on the form. So if you want to search fields by numeric comparison, you have to fill the values with a suitable number of leading zeros, so that all numbers are always the same length (e.g. for the order total 00023 instead of 23). Then you can also search for order total>00020 to find orders from a certain size on. For this necessary conversion you can use a global onUpdate function in the script area.

Since date fields are saved in ISO8601 UTC format by default, you can easily search for earlier or later dates in these fields, but if you have dates in a format that does not follow the year, month, or day order, you can also convert them in advance using a global onUpdate function.

Sorted result list

The search always takes place using a specific index. An index is an alphabetical sorting of a field - similar to a dictionary - in which you can find content very quickly. All fields that you have marked as searchable have such an index. In addition, many built-in fields are indexed by default. However, if you search across several fields, Dialfire very carefully selects the best index for this query.

The results always appear in the order of the index' used for this query, so you have only limited influence on them.

However, if you search for one field only and the field is searchable, the result is always sorted alphabetically by this field.

Happy searching!