Tables, or Relational Tables, are used to store data held in a structured format within a Database. There are different aspects to tables which can be used for enhancing your contact data.
A table has a specified number of columns but can have 'N' number of rows. Each row is identified by one or more values appearing in a particular column subset. The column subset, which uniquely identifies a row, is called the primary key. In Maropost, tables are a very useful aspect for storing data and different queries can be written to fetch details.
If you want to send a campaign only through a relational table then you would need to utilize your own unsubscribe mechanism and sync the unsubscribes within a relational table. Relational tables give you flexibility with writing your own SQL queries to modify the contact data within tables, but you cannot utilize Maropost’s unsubscribe mechanism directly.
To utilize our unsubscribe mechanism within relational tables, you would need to import the same contact emails (from the relational table) into a Maropost contact list and then create this segment:
In List: List A
Table: Table A
Always send to this segment (and similar segments based on different lists & tables). By doing this, contacts can unsubscribe from List A, and segments only fetch ‘subscribers’, so the unsubscribes will not be included in campaigns.
To gain access to relational table information for your Maropost account, please follow these steps:
- Hover your cursor over your user name, and click ‘Connections’. Then, click the ‘Relational Tables’ tab along the top.
- You will see all of the information needed to access your relational tables from Maropost.
To create a new table, please follow these steps:
- Hover your cursor over the Maropost logo and click on ‘Email’. When the Email module’s menu bar appears, select Contacts > Tables.
- This will open the tables index page. Click the 'New Table' button, or select 'New Table' from the Add Items icon displayed in the top-right hand corner of the menu bar.
NOTE: You must only use lowercase letters, numbers, and underscores in the table name. If you include ANY capital letters, spaces, or special characters in the name, you will receive a SQL error. You’ll notice that if you use a capital letter in the table name, you will still be able to create the table, but will receive an error when attempting to load data into it.
My Table << is not allowed
My_Table << is not allowed
my_table << is allowed
- The first empty space is to name the column (eg. email, ID, gender). Then select the type of data this column will hold. The data types are explained below:
- String: This is a sequence of up to 255 characters.
- Text: Also a String data type up to 65535 characters.
- Integer: This is for a whole number, which can be positive, negative, or zero up to 11 digits.
- Bigint: An integer data type up to 20 digits.
- Boolean: This is also known as true or false. The values stored in the relational table should be either 1 or 0 respectively.
- DateTime: This is for data in the date/time format.
- Email: This data type can only store the email address of the contact. It is only one of two data types that can be set as 'Sendable' for tables.
- UID: If you have specified a custom field to be the unique identifier of your contact records, then this data type will appear in this list. This is the other of the two data types that can be set as 'Sendable' for tables.
- After selecting the data type for the column, you have the option to give it a default value. The default value depends upon the data type selected. The column can also be kept blank.
- The next step is to enter the ‘Field Length’. Set the maximum value for the column, keeping in mind that there is already a maximum value set for every data type at the backend which cannot be exceeded.
- You can set additional options for the column created in this table. The options are listed in detail below:
- Auto-Increment– Automated process to increase the value for the column.
- Primary Key – Uniquely identifying constraints for each record in the database. It should contain unique values. The primary key cannot contain a null value. A table can only have one primary key.
- Allow Null – If no value needs to be provided. Empty data can be imported if the column has been set as ‘allow null’.
- Sendable – How you set the relationship between the contact in a table and the contact that is in the contact database. By default, the email address stored in the field with data type 'Email' and the 'Sendable' option selected will be used to define the relationship. If you wish to send an email to a contact that is stored within a relational table, then that contact’s email address must also exist in your contact database. If you have defined a unique identifier (e.g. member ID, customer ID, etc.) for your contacts, you can set the field with data type 'UID' and the 'Sendable' option selected instead. When you do this, then the contact stored in the relational table will receive an email if there is a record in the contact database with the same unique identifier.
There are two options for deleting with regards to tables; ‘Delete’, which will delete the whole table, including the data, and ‘Truncate’ will delete just the data within the table, but keep all other information.
Other options for using tables:
Campaigns: Maropost has the option to send the campaign to a particular table. It can be selected from the first page of campaign creation.
To establish a relationship between multiple relational tables, please follow these steps:
1. Click on a table name on the ‘Tables’ index page. Along the right side you will see an option for ‘Relationships’.
**The ‘Relationships’ option will only appear when there is no email data-type column or no sendable column in your relational table. If your table doesn’t have either of those columns, you must manually specify the link.**
2. By clicking ‘New’, you will be shown a pop-up box. In this pop-up box, the 1st drop-down is the column from your current table, the 2nd drop-down is the other relational table you want to establish a connection with, and the 3rd drop-down is the column from the other relational table.
**Only tables with sendable columns will appear in the 2nd drop-down.**
3. You can add as many relationships as you wish between multiple relational tables. E.g. If you have 3 separate tables (contact’s info, purchase info, and product details), you can establish relationships to connect all 3 tables to be able to pull and utilize the data within.
4. By choosing which columns that will bridge the relational tables together, you now have a link between two or more tables.
Note: When creating a segment and selecting the ‘In Table’ filter, only tables with a sendable column, as well as tables LINKED to tables with sendable columns will appear.
Segments: Active contacts can be fetched from segments using the ‘Tables’ filter. In segments, columns for the corresponding table can be selected to add the specification for the contacts.