Saleslogix: The Query Builder
What is it?
The Query Builder is a very powerful tool used within Saleslogix – in fact, probably one of its most effective selling points. It allows you to build groups of records showing the columns (layout) you want, in the order (sort) you want, based on almost whatever criteria (queries) you want. So how do you use it?
How to use it:
For more information on adhoc and dynamic groups see my other blog article.
To Open the query builder, you can either create a new group for any entity (Contact, Account, Opportunity etc):
Or edit an existing group:
Once you have done either of the above, you will be presented with the Query Builder window:
As I mentioned in my other blog article, you can only define conditions when configuring a dynamic group.
So let’s say your organisation is having a big push on email campaigns and wants to ensure a firm relationship with all of its clients. Your manager has asked you to compile a list of all contacts in London who have NOT been sent any campaigns yet. Trouble is, you don’t necessarily have a city listed for your contacts as it’s not something you tend to fill out.
So our key points here are:
- We want to see a list of Contacts
- The Contacts must be based in London
- The Contacts must not have been sent any Campaigns yet
- The Contacts may not have a City against them
So if we were to put this into a set of conditions in verbal English, we would end up with something like:
“Show me all Contacts where the City is London or they have a postcode in London, and have not been sent any campaigns yet.”
So what do these conditions look like in the query builder? In order to understand this, we need to break our criteria down into individual conditions, which must resolve “true” for the contacts to appear in the group:
Condition 1: City = “London” OR postcode starts with “SE” OR postcode starts with “SW” etc…
Condition 2: Contact is not a target for any sent campaigns.
This can be quite difficult to understand since you would normally think “I want to see all contacts in London and I want to see all contacts with a postcode in London.” However, if you do this, there will be no contacts returned as the system is looking for each of those statements to be true (i.e. Contact has a city of London AND a postcode of SE AND a postcode of SW, which of course nobody will have).
Here is what your conditions should look like:
So effectively, every time your condition ends in an “AND”, a new logical condition is started. HOWEVER this does not take into account brackets. Brackets will override this rule.
Your manager has decided that he wants to ensure good quality addresses for a mail-out and wants to identify contacts missing either the city or postcode so that they can be tidied up prior to the mail-out. So how do we identify these contacts? Simple – just create your conditions table:
Condition 1: City is London and postcode is blank
Condition 2: City is blank and postcode is “SE” OR “SW”
Condition 3: Contact has not been sent any campaigns yet
Then use this to create your conditions in the Query Builder:
Notice that for the blue set of conditions, I have a bracket to combine the two postcodes. This is technically a sub-condition and is important since if I didn’t have them, they would be recognised as:
Condition 2: City is blank and postcode is “SE”
Condition 2.5: OR postcode is “SW”
So for condition 2.5 we would not necessarily be listing contacts with a blank city.
I hope this has given you a useful insight into the way the Query Builder works! If you would like to arrange some group training or one-to-one coaching, please contact us on +44 (0)1959 560 410.
Supported customers requiring help and/or advice with their CRM system please contact our support team directly on +44 (0)1959 560 415 or email firstname.lastname@example.org