Navigation

SQL Queries on Relational Tables

A query (SQL) on a relational table in a Dialog Insight project allows you to extract, filter, or combine data stored in the relational tables associated with the project. It is used to query this data to obtain only the relevant information based on specific criteria.

Specifically, the queries allow, among other things, to:

  • Extract relational data and insert it into an email to personalize the content.
  • Target contacts based on behaviors, history, or attributes stored in custom tables.
  • Meet more advanced and customized needs not covered by Dialog Insight's native features.

The queries are built by the Dialog Insight team on demand, then made available in certain modules according to your needs.


Use Cases

Case 1 - Content personalization based on the contact's favorite store

Context: The project contains a store table. Each contact has a favorite_store field in their profile, which corresponds to the store where they make the most purchases.

Use: When sending a message, the query allows retrieving the information of the store associated with the contact in order to personalize the content of the email (e.g., name or city of the store).

Each contact is associated with a single store, which corresponds to a 1:1 relationship.

Case 2 - Targeting based on transactions over a specific period

Context: The project contains a transaction table (this table can be generated automatically). A contact may have made one or more transactions, or no transactions at all.  

Use: A query is used in a group to target contacts who made a purchase during a specific period, for example, Black Friday.

Only contacts matching the criteria of the query will be included in the group and receive the communication.


Supported Modules

Here is a non-exhaustive list of the modules that support the use of queries:


Alternative for E-commerce

Some e-commerce queries are already available with native tools like groups and certain email blocks. This is the case for purchasing preference indicators. You can simply select them in the interface without needing our team to create a query. The list of available indicators contains many use cases that could meet simple needs.

→ See the Purchasing Preferences Indicators  

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.