Sendwithus Connect is exclusive to Sendwithus Premium accounts. Contact 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

  1. Go to the Segments page located under Campaigns in the Sendwithus dashboard.
  2. Select Create Segment and name your segment.
  3. You can optionally add a description to provide extra context for other team members.
  4. Fill in the SQL query to retrieve data from your database.

Sample SQL Segment

Column Headers

The column headers of your campaign can be used as variables for your template. Using the Segment example above first_name and 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

You can modify the column names from your database to use in Sendwithus by adding the AS keyword. This will create a label for your column and will not modify any values from your database.

    SELECT customer_first_name AS first_name,
           customer_last_name AS last_name,
           customer_email_address AS email
      FROM users;

Attaching an SQL Segment

  1. Go over to your Campaigns List section and create a campaign.
  2. Under the Load Recipients section select Import Segment.
  3. Choose one of your created Segments and click Load Recipients.
  4. 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.

Load Recipients

Preview Campaign

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.