SendGrid: Export Users (Legacy)
Exporting a Lytics audience to SendGrid allows you to send a Marketing Campaign email to your users based on your own, relevant targeting criteria, such as: cross-channel behavior, content affinities, and more.
Note: This workflow uses the legacy marketing campaigns API. You should only use this workflow if you are still using the legacy marketing campaigns feature in SendGrid. For more information see how to Migrate from legacy marketing campaigns. If you are using the current Marketing feature in SendGrid please use the Export Users workflow.
- Implementation Type: Server-side.
- Implementation Technique: REST APIs with audience triggers.
- Frequency: Real-time, with a one-time backfill of the audience after setup.
- Resulting Data: Lytics users that are a member of the selected audience(s) are exported as SendGrid contacts. A new SendGrid segment is created for each corresponding Lytics audience on the "ALL CONTACTS" list, or the list selected during configuration.
This integration utilizes the SendGrid APIs to send user data. Once the user initiates an export the workflow will:
- Create a new custom field in SendGrid called
lytics_segmentsto record Lytics audience membership.
- Create new SendGrid segment(s) on the list selected or on the "ALL CONTACTS" list if no list was selected in configuration.
The SendGrid segment(s) created by the workflow will ultimately contain the users from the exported Lytics audience(s). For example, if a Lytics audience named "High Value Users" with the id
87fa039a5d6649a68026a94c0c6d3f5e is exported to SendGrid, you will see a new segment in SendGrid named "High Value Users". The definition of this segment will be
lytics_segments contains word
After a backfill, the workflow will receive real-time updates when a user enters or exits the audience. For each user to export, regardless if the user is being added as part of the backfill, or they're entering/exiting the audience in realtime, it will:
- Create the users as contacts in SendGrid.
- If a list was selected in configuration it will then add the recipients to the list.
lytics_segments field is automatically populated with the a comma separated list of Lytics audience IDs the user is currently a member of. That is, once a user leaves the audience in Lytics, this field will be updated in SendGrid, and they will be removed from the SendGrid segment. Users will not automatically be removed from the your SendGrid account, or the list your segment is on.
By default, Lytics exports the following fields to SendGrid. Note that you can customize the Lytics source fields as part of the workflow configuration:
|Lytics User Field||Description||SendGrid Field||Type|
You can also export any Lytics user field to a custom SendGrid field, so long as the field type is a
Follow these steps to set up and configure an export of a Lytics audience to a SendGrid Segment.
- Navigate to the Integrations page and select the SendGrid tile.
- Select Workflows from the menu on the left.
- Select Export Users (Legacy) from the list of workflows.
- Select the authorization you would like to use.
- Using the Audiences input, you may select Lytics audiences to export to SendGrid. Audiences in the right column will be exported.
- To use a non-default user field for email, select a field from the Email Field dropdown.
- (Optional) Toggle Show Advanced Options to reveal the following options.
- Select a field from the First Name Field dropdown to use a non-default user field for first name.
- Select a field from the Last Name Field dropdown to use a non-default user field for last name.
- Select a list from the Export to List dropdown if you would like to export your users to segment(s) on a list within SendGrid.
- Using the Custom Field Mappings you can map additional Lytics User fields to custom fields in SendGrid.
Click Start Export to begin the export workflow.