Create and Manage Queries

Use the Query Editor to create and manage your engagement queries.

When you create engagement queries, you are asking business questions about your customer behavior in relation to your products and services. To ensure that queries can easily be distinguished and used by others on your team, ensure that you:

  • Give each query a unique, easily identifiable name.
  • Provide a clear description for each query.

Using the Engagement Query Language

The Engagement Query Language (EQL) provides you with the capability to define the customer cohorts and journey paths that you wish to understand and analyze.

EQL comprises a set of precision filters you can use as the building blocks for your engagement queries, Those queries produce statistics about customers and their journeys, allowing you to analyze and gain insight into their behavior and the success of your customer engagement strategy.

For an in-depth look at EQL, see the Engagement Query Reference.

Create a Query

  1. In ONE, choose Analyze.
  2. Select Dynamic Audiences.
  3. On the Dynamic Audiences page, click +Create.
  4. Provide a unique name for your query. Query names can contain alphanumeric and special characters, including spaces.
  5. Provide a description for your query. This should include a full and accurate definition of the objective of your query.
  6. Begin your new query by selecting your query type. TB - query editor create 1
  7. Use the helpful drop-down menus provided on screen to construct your query. TB - query editor create 2
  8. When you are happy with your query, click Save. TB - query editor create 3
  9. Click Process to process your query and create an audience. TB query editor create 4

Example Query (with syntax)

In our example, the objective is to:

Find customers who reach the Enrollment stage without passing through the Assisted channel.

  1. Begin the query by typing a space directly after the DISCOVER statement and selecting journeys.
  2. Enter a space and select through( from the filter drop-down.In our example, we're not interested where the customers are coming from or their final destination, only whether or not they went through the enrollment stage.
  3. Select interaction( from the context drop-down.
  4. Select stage= from the entity drop-down.
  5. Select Enrollment from the attribute drop-down.
  6. Position your cursor between the two closing parentheses after Enrollment, (stage="Enrollment")|)
  7. Enter a space and select and.
  8. Enter a space and select not.
  9. Enter a space and select an opening parenthesis.
  10. Select interaction( from the context drop-down.
  11. Select channel= from the entity drop-down.
  12. Select Assisted from the attribute drop-down.
  13. Click Save.

The final query (with name and description) looks like this: TB - query editor create example

Edit a Query

  1. In ONE, choose Analyze.
  2. Select Dynamic Audiences.
  3. Click the Edit icon next to the query you want to edit.
  4. Make your required changes and then click Save.

Copy a Query

From time to time you may want to clone an existing query, rather than creating a new one from scratch.

  1. In ONE, choose Analyze.
  2. Select Dynamic Audiences.
  3. Click the Copy icon next to the query you want to clone.
  4. Rename the new query and make any other required changes.
  5. Click Save.

Delete a Query

  1. In ONE, choose Analyze.
  2. Select Dynamic Audiences.
  3. Click the Delete icon next to the query you want to delete.
  4. Click OK to confirm deletion.