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
- In ONE, choose Analyze.
- Select Dynamic Audiences.
- On the Dynamic Audiences page, click +Create.
- Provide a unique name for your query. Query names can contain alphanumeric and special characters, including spaces.
- Provide a description for your query. This should include a full and accurate definition of the objective of your query.
- Begin your new query by selecting your query type.
- Use the helpful drop-down menus provided on screen to construct your query.
- When you are happy with your query, click Save.
- Click Process to process your query and create an audience.
Example Query (with syntax)
In our example, the objective is to:
Find customers who reach the Enrollment stage without passing through the Assisted channel.
- Begin the query by typing a space directly after the DISCOVER statement and selecting journeys.
- 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.
- Select interaction( from the context drop-down.
- Select stage= from the entity drop-down.
- Select Enrollment from the attribute drop-down.
- Position your cursor between the two closing parentheses after Enrollment, (stage="Enrollment")|)
- Enter a space and select and.
- Enter a space and select not.
- Enter a space and select an opening parenthesis.
- Select interaction( from the context drop-down.
- Select channel= from the entity drop-down.
- Select Assisted from the attribute drop-down.
- Click Save.
The final query (with name and description) looks like this:
Edit a Query
- In ONE, choose Analyze.
- Select Dynamic Audiences.
- Click the Edit icon next to the query you want to edit.
- 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.
- In ONE, choose Analyze.
- Select Dynamic Audiences.
- Click the Copy icon next to the query you want to clone.
- Rename the new query and make any other required changes.
- Click Save.
Delete a Query
- In ONE, choose Analyze.
- Select Dynamic Audiences.
- Click the Delete icon next to the query you want to delete.
- Click OK to confirm deletion.