Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

Prevent entire campaign from sending if personalized subject line is empty

$
0
0

I have an ampscript that personalizes subject lines based on email name. Is there a way to prevent an email from sending if the email name doesn't match any of the criteria? I know I can use RaiseError but that will still count as a send in salesforce and I want to abort all sends for that particular email. I also don't want to use a fallback in this scenario, I just want to prevent the send.

if @EmailName == “Coastal_send_01” then    set @subjectLine = “Your reward is here”    set @preheader = "Take $10 off your next order”elseif  @EmailName == “Coastal_send_02” then    set @subjectLine = "Only a few days left to save"    set @preheader = "Use your $10 off coupon before it expires"elseendif

So if an email is accidentally named "Coastal_send" how do I prevent it from sending completely? Right now it will send with an empty subject line.


Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>