- What tools can be used for Segmentation?
- What is the Query?
- How does the Query work?
- How do you create a Query Activity?
Segmenting your data is important because it allows you to send the right message to the right person at the right time.
There are two tools within Marketing Cloud which allows you to Segment your data:
- Drag & drop
- Allows you to segment your data that’s in a list or data extension, also known as a data view
- Allows you to segment or retrieve data that in a single data extension or located in multiple data extensions
- You use SQL (Structured Query Language) to define your criteria
- Results are placed in a data extension
- The data extension that the results are placed in will need to be created before defining the query activity
- Eg: Select * from Subscribers where Age > 40 or Salary > 60000
Data View Tables
- Data view tables are tables that contain behaviour related information
- There are 17 different data views
- Contain 6 months of data
- Must be enabled on your account
- SQL is a programming language which allows you to manipulate and retrieve data
- The SQL support for the Query Activity is based on SQL Server 2005 capabilities
- Only SELECT statements to data extensions or data views in an account or int he parent account
- Nested Queries
- GROUP BY
- Conditional Statements
- IF Constructs
- CASE Statements
Create a Query
- The query activity is located in the Email Application under Interactions –> Query
- Click on Create
- Type in a Name
- External Key and Description are optional
- External Key is used when executing the query through the API
- In the query workspace, type or copy and paste in your select statement
- Select * from NTOSubscribers where Sport = ‘running’
- Click check syntax
- Once the query has been validated, select the data extension on where you want the query activity to place the results
- After selecting the data extension, the final parameter is to select the Update Type