Introduction to Writing Queries

Overview

When you create Engagement Queries in MXO, you are asking business questions about your customer behavior in relation to your products and services. You manage the workflow for creating and processing those queries, and for sharing the resulting audiences from the Dynamic Audiences page.

How many Engagement Queries can I create?

By default, you can create a maximum of ten Engagement Queries. If you think you will need more queries, contact your Medallia representative to discuss your requirements.

Is my Engagement Query quota applied at the Tenant or Space level?

Your Engagement Query quota is applied at the Space level. This provides you with the ability to create a maximum number of ten queries, per Space, by default.

Can I edit or delete queries to stay within my quota?

You can, but we do not recommend this course of action. Editing or deleting an existing query means that you lose all data, including Audience statistics and Journey Visualizations, relating to the original version.

If you think you will need more queries, we recommend contacting your Medallia representative to discuss your requirements.

Workflow for defining queries

You express your business questions using a series of filters about customer and their journeys to isolate the precise audience you're seeking. The general workflow is as follows:

  1. Define your Business Use Case as precisely as you can. You might want to use a cut down version of this as the Name for your query.
  2. Express a description that encapsulates exactly what audience you are seeking to reach.
  3. Write an Engagement Query that specifies exactly the interactions you want to focus on in the target customer journey.
  4. Execute the query and analyze the results_. Repeat this process until you're confident you have the right audience of the right size.
  5. Optionally, Export the results to a target server for use by another, external, system, for example Salesforce Marketing Cloud.

A query defines an audience by filtering customer journeys looking for specified interactions with your brand. The resulting cohort of customers form an audience that may be receptive to marketing focused on those interactions.

Example

StepDefinitionExample
1Business Use CaseI want to know how many customers move from awareness of our products/services to using them. I can name my query "Awareness to Use".
2DescriptionHow many customers are starting their journey with the Awareness stage and finishing their journey at the Use stage?
3Engagement Query

A FROM statement asks about the first event of interest and a TO statement asks about the last event of interest.

discover journeys from interaction(stage="Awareness") to interaction(stage="Use") 
4View the resultsView the resulting audience. Dive into the statistics in more detail and view the journey visualization for that audience. Are the results what you were expecting?
5Export the resultsWhen you are happy with the results of your query, export the resulting audience data to another system for further analysis.