The Import Emails from Any Tables feature provides advanced flexibility for importing email addresses directly from your OpenCart database. By leveraging this tool, admins can extract and import email addresses based on specific criteria, ensuring precision and efficiency in building email groups.
Fields in the Import Tool
- From Table:
- Displays a list of all tables available in your database.
- Select the table containing the email addresses you want to import (e.g.,
customer
,order
, etc.).
- Column Name:
- Lists all column names available in the selected table.
- Automatically selects the column named
email
if it exists. - If your column has a different name, you can manually select it. Ensure the column contains valid email addresses. Selecting a non-email column will result in invalid imports.
- Filter Query:(Optional)
- Allows the use of a simple SQL
WHERE
clause (without joins) to filter records before importing. - Use the Calculate button to check the number of records matching your filter query.
- Example filter queries:
- To fetch emails from a specific date range:
WHERE date_added BETWEEN '2023-01-01 00:00:00' AND '2024-12-31 23:59:59' AND status = 1
- To fetch customers based on a year range:
WHERE (YEAR(date_added) BETWEEN 2023 AND 2024) AND status = 1
- To fetch emails from a specific date range:
- Allows the use of a simple SQL
- To Group:
- Select the target email group where the fetched email addresses will be imported.
How to Use
- Navigate to the Import Emails from Any Tables section.
- Select the appropriate table from the From Table dropdown.
- Choose the column containing email addresses from the Column Name dropdown.
- Ensure the column has valid email data.
- (Optional) Use the Filter Query field to refine your selection.
- Click Calculate to view the total records matching the query.
- Select the desired group from the To Group dropdown.
- Click Import to fetch and import the email addresses into the selected group.
Examples
Example 1: Import emails from the customer
table between the years 2023 and 2024.
- From Table:
customer
- Column Name:
email
- Filter Query:
WHERE (YEAR(date_added) BETWEEN 2023 AND 2024) AND status = 1
- To Group: [Select your target group]
Example 2: Import emails from the customer
table for a specific date range.
- From Table:
customer
- Column Name:
email
- Filter Query:
WHERE date_added BETWEEN '2023-01-01 00:00:00' AND '2024-12-31 23:59:59' AND status = 1
- To Group: [Select your target group]
Benefits of This Feature
- Precision: Enables admins to extract emails based on detailed filters.
- Efficiency: Automates the process of importing emails directly from database tables.
- Customization: Offers SQL-based filtering for advanced targeting.
- Flexibility: Supports any table or column in your database containing valid email addresses.
This feature is ideal for businesses that want to leverage their existing database for email marketing and communication purposes, ensuring that emails are imported with precision and aligned with business goals.