This tutorial covers using Campaign-Genius with SendGrid transactional templates. Transactional templates are called typically programmatically via something like an Api call, and you may send data to fill in the template rather than pulling it from an existing list. So this tutorial may be a bit more technical, but if you're using SendGrid transactional templates, it's probably not going to be that new to you.
SendGrid provides a familiar looking building blocks email editor. So I'm going to add an image block here. The nice thing about the way they've done that is they actually provide the fields to fill in. So I'm gonna jump over to this demo template. Grab just the source tag, just the link within that source field in the overall tag structure. And I'm going to fill that in here because I've got day information and sale information saved as scheduled data for this template.
Note two things about this. I've got a double handlebars field called First Lowercase F and a double handlebars field for email, capital e. those are the data fields that I'll have to supply to make this transactional template fill incorrectly and populate the image with values.
We do recommend alt text. If you can't think of what else to say, view image recommended is not a bad idea. If you're going to deliver information via image, then you might want to tell people to take a look at that.
So here's where it gets a little bit technical in SendGrid. You can actually take a look at the data. You can go out, send test data through this screen. So I filled in first named Benji email Benji@mail.com and you'll notice that it shows the demo image correctly new. See that first named Benji down there as well. So one field value getting picked up both in the image tag and in the body copy for this email, sending that my email parameter in the image tag is used. If you're doing recipient by recipient image updates, we recommend making it a habit anyway.
We'll try and add additional logging in business intelligence to that as we go along. So that's really all there is to it.
To use an Campaign Genius template in a SendGrid transactional email, I'll recap. I'm just going to grab the source tag from here. I'm going to add an image block and I'll populate under image details, that image source url with the url to the Campaign-Genius template, and you want to make note of the field names within the double curly braces. Those are called handlebars in handled in SendGrid's documentation.
Make note of the field names within the curly braces on. Slight technical point here, the name of the field that Campaign-Genius is expecting doesn't have to match the name of the field within the curly braces. You could change these around to match existing transactional data that you're already sending. If instead of first you use first name in double curly braces, that's fine. Campaign-Genius will receive that string first equal something like Benji and act on that data so that for the first half, the field name for Campaign-Genius is there. The second half, that transactional data name is within the double curly braces.
I hope you found that helpful. We will be very interested to see what else you'd like in terms of using Campaign-Genius with SendGrid transactional stuff. We actually use SendGrid ourselves!