2022.2

Table Of Contents
Note: TheESPmightalsohaveatestfunctionyoucanuse.ChecktheoptionsofyourESP.
AddingcustomESPhandlinginstructions
MostESPsallowyoutoprovidecustomhandlinginstructionsaspartoftheemailmessage,viacustom
headers.Typicallytheseincludeinstructionstoenableopenratetracking,clickthroughratetracking
andassigntags/categoriestomessages.Assigningatag/categoryallowsyoutoviewstatisticsper
emailtypeinthedashboardoftheESP.NotethateachESPhasitsownnotationandinstructions.
InaConnecttemplate,customheadersmaybeaddedthroughaControlScript(see"ControlScripts"
onpage838,"ControlScriptAPI"onpage1271and"section"onpage1305).
CustomhandlinginstructionsforemailthatisgoingtobesentbytheOLConnectMailjetorOLConnect
SendGridWorkflowpluginmustbespecifiedintheplugin'ssettings.
ThefollowingsamplesshowhowtoassignatagorcategorytoamessageforvariousESPs.
SendGrid
Dashboard:https://app.sendgrid.com/
Documentation:https://sendgrid.com/docs/API_Reference/SMTP_API/using_the_smtp_api.html.
WriteaControlScriptthataddsaheaderwiththenameX-SMTPAPIandsetsitscontenttotherequired
JSONstring(forexample:"' category': ['invoices']").
Forexample:
var headerObj = {
"category": ["invoices"]
};
merge.context.sections["Content"].addHeader("X-SMTPAPI", JSON.stringify(headerObj));
IftheemailisgoingtobesentbytheOLConnectSendGridplugin,theX-SMTPAPIheaderwillnotbe
used.Enterthecategoryorcategoriesintheplugin'ssettingsinstead.
Note: Sendgridstripsouttheirownmailheaders.TheresultsneedtobeverifiedviatheirDash-
boards(e.g.theStatssectionletsyouverifythestatsforspecificcategories).Alternativelyone
canusetheirWebAPItoretrievestatsinJSONformat.Toviewthecategorystats,logintoSend-
Page 1345