Sendwithus Connect is exclusive to Sendwithus Premium accounts. Contact firstname.lastname@example.org for more information.
Sendwithus Connect allows you to power your templates using real-time data from your connected Redshift database. This connection will provide the recipients for your campaign and the data to power your templates — which means… no more stale data!
Creating your Segment
- Go to the Segments page located under Campaigns in the Sendwithus dashboard.
- Select Create Segment and name your segment.
- You can optionally add a description to provide extra context for other team members.
- Fill in the SQL query to retrieve data from your database.
The column headers of your campaign can be used as variables for your template. Using the Segment example above
last_name will populate with the corresponding variables in your template.
In order to use these column headers as variables they must follow the same standards as Jinja variables:
Column names cannot:
- contain spaces
- start with a number
- have symbols
Column names can:
- have underscores
- include numbers, but not the first character
Attaching an SQL Segment
- Go over to your Campaigns List section and create a campaign.
- Under the Load Recipients section select Import Segment.
- Choose one of your created Segments and click Load Recipients.
- Optionally, you can check the “Update recipient list before sending”.
- If this box is checked, we will re-query your database at the time of the campaign send to ensure up-to-date information.
We recommend using the Campaign Preview feature set before sending your campaign. This preview will select a subset of users from your database and render a preview of the HTML using the data from your database. You can also send an actual preview of the email to yourself with the user’s data. For more information, visit our Campaign Preview KB Article.