Using the Query Builder/Common Queries in Enquire MAP
Query Builder is a flexible tool that is used to query class objects that are defined in the PeopleSoft HCM metadata repository. Query Builder enables the User to:
- Create queries of unlimited length and complexity without the need to know the underlying database model.
- Function as a powerful feature to use to build Workflow Editor Basics, contact lists, and dynamic blocks in Enquire MAP.
- Enable the User to segment prospects and any related data/ history quickly, accurately, and efficiently in order to get the most out of marketing automation!
- The query builder is very powerful as the UI is designed to simplify the process of creating complex logic.
- The builder allows for 3 sets of nested braces. ((()))
- All logic within a group must have the same boolean operator so the User gets a choice, AND or OR for a group, no combination of such (Group(Filter 1 and Filter 2 and Filter 3). This same rule applies within a block. Group 1 and Group 2 and Group 3. As you can imagine this is also true for blocks. Block 1 or Block 2 or Block 3. Thus it is not possible to do Filter 1 and Filter 2 or Filter 3 as combining and/or within a logic grouping is not possible.
The query builder is probably the most powerful and hence most complex aspect of Enquire MAP
A query is structured into 3 levels; Blocks, Groups, and Filters. The query structure being used is very important to the result of the query itself. Selecting appropriate filters by means of the drop-down menu(s) inside the group.
Blocks work exactly the same as Groups where each block is executed as a separate independent query, and the result sets are joined together using the operator the User specifies. When creating a query that says Block A AND NOT Block B, the final result set will be all results from Block A hat are not part of Block B.
All filters within a specific group are executed together as a single query. This means for the query to return results, each result must match all filters as a group. Ensure that all filters are placed within a single block in order for them to be checked together yet remain dependent on each other.
The above query looks for contacts that have both submitted the form Contact Us and have submitted a field in that form that is United States.
Each group is run as a separate query, and the results of those queries are combined together with the operator specified. Use different groups or blocks when the User wants the filters to be checked independently.
Above, the first group will look for a contact that Equals (or has participated in) the Campaign 'est Campaign while at the same time Equals (or exists in) the Contact List Test List. Also, the second group asks for a form submit to Exist in general when displaying the results.
The result would be a list of contacts that have participated in campaign Test Campaign, that exist in list Test List, and that have submitted any form in the database.
If the SubmittedForm query in Group 2 was inside Group 1 the form submission would have had to happen inside the campaign and the contact would have to be in the contact list specified.
Blocks work exactly the same as groups. Each block is executed as a separate independent query and the result sets are joined together using the operator specified. If the User creates a query that says Block A AND NOT Block B, the final result set will be all results from Block A that are not part of Block B.
Query Building in Different Contexts
Query builder can be used in different areas of Enquire MAP, including the workflow area. Inside workflows, the User will find the decisions section that offers decision blocks that can be based on global query context, campaign query context, or current campaign step context.
Global Query Context
The global query context will look for all records ever created in the database. The only limits to the result set will be defined by the query itself. The global query may look at contacts, or at contact history items.
Contact Lists and Dynamic Lead Scores always run in the global query context. Workflow Decisions have the option of running in this query context as well as other query contexts.
Campaign Query Context
Campaign Query Context will only look at contact history items and results that occurred within the specific campaign.
Workflow Decisions have an option of running in the campaign query context, provided the workflow is part of a campaign. This is the only place this query context is used.
Current Campaign Step
See the image below to select the current campaign step within the workflow decision section.
The Query Builder in Enquire MAP allows the User to personalize and create powerful user journeys for the Company's marketing initiatives. Below are some examples of some common queries using the term eloqua and can be replaced with any other term that would prove useful to Company marketing strategy.
Variations of queries include creating Workflow Editor Basics, contact lists, and dynamic blocks in Enquire MAP:
Page Visit Query
If the contact has visited a page that contains eloqua in its URL, I.E: www.thelandingpage.com/eloqua:
Phone Calls Query
A User can create and track a different telephone number for each of the campaigns (called call tracking number) that via software, records the number of calls received provides a genuine view on how the campaigns are working. These call tracking numbers are purchased in the account:, and Enquire MAP Support and/ or Enquire Account Manager can assist the team with obtaining these.
Live Chat Query
If a contact used the word eloqua during a Chat conversation, the block would be denoted as:
Referral Traffic Query
If the referral source contains eloqua anywhere in the URL:
Custom Field Query
If the organization in the account has a Custom Field Set, I.E.: from a CRM or a manually set field:
If the contact has an IP address from Ohio:
If the contact has an organization that is from Ohio:
Accessing History Dates
Every contact history (form submit, webinar registration, email link click, etc) creates a Contact History object (which shows up on the Contact's timeline). When trying to query for a specific history that occurred at a specific time range, use at least two qualifiers: history type and created at.
More Common Queries
AND & OR Operations
The first thing to become familiar with is the basic logic operations available and how they work. There are two logical evaluations used and their respective counter parts. AND, AND NOT, OR, OR NOT:
On the surface it may seem straight forward, and usually it is - for basic queries. However if you're building more complex queries, then it might help to know how these logical operations will evaluate. Skip the "Truth Tables" section below if it is too detailed for Company needs at the moment.
Truth Tables (Advanced)
To dive a little deeper into the digital logic evaluations, below are some basic Truth Tables on how a query shown above would be evaluated depending on whether the operation is an AND, AND NOT, OR, OR NOT.Please Note: Notice that "NOT Group 2" is simply the opposite value of "Group 2". "True" = Include the contact for this query"False" = Don't include the contact for this query
There are a number of smaller operations that can be used to build a query. The first field (not in red square below) is the data to look at. The second field (in the red square) has quite a few options to choose from on how to evaluate that piece of data.
Below are all the possible options and what they mean:
Accessing History Dates
Every contact history (form submit, webinar registration, email link click, etc) creates a Contact History object (which shows up on the Contact's timeline). If trying to query for a specific history that occurred at a specific time range, the User will need to use at least two qualifiers:
- history type
- created at
Please reach out to the dedicated Enquire Account Manager or Enquire MAP Support team for further assistance.