• Anusha Kasaragadda
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
In s7 we have test mail like email address ending with @bh.exacttarget.com for some of the subscribers .But in s50 we don't have any mail to perform bulk send for performance testing.
Does anybody knows any test subscriber in s50.
Thanks in advance 

I have to raise an error with custom message when i got exception in my ampscript code.I used SSJS try catch but I am unable to raise an error .When I did preview in exact target it's showing exact target exception message not my custom message like 

There is an error in your email. Please contact your customer service representative. Error 1: Script SET Statement Invalid<br>An error occurred when attempting to resolve a script expression. See inner exception for detail. Script Expression: [Product_Test] MemberID: 510003494 JobID: 0 An unrecognized expression appears in a script block. Script Expression: [Product_Test] MemberID: 510003494 JobID: 0 <br>Invalid Content: <br>set @email = [Product_Test]

here is my code ,Prdouct_Test is not existed in my DE, it should execute catch block.

<script runat="server">
Platform.Load("Core","1.1.1");
try{
</script>

 %%[
 set @error=""
 set @email = [Product_Test]
 ]%%

<script runat="server">
  }catch (e) {          
    Variable.SetValue("@error", "Error Occured");
  }
</script>
%%[
if not empty(@error) then
%%[RaiseError(@error, true);]%%
endif
]%%

 
Please suggest how to catch exception in ampscript. Thanks in advance.

Hi All,

I have to raise an error with my custom message and block the send if the attribute does not exist in DE.

I tried using AttributeValue() function. but it does not work for my use case

AttributeValue() function returns empty in both cases
1.Attribute doesn't exist in DE
2.Attribute value is empty in DE   
 My case is I have to raise an error with my custom message adn block the mail send  if the attribute does not exist in DE only. please suggest how to validate my usecase

Context:
We use data extension to store email content and we have an Amp script that runs for each email trigger.
Amp script contains couple of placeholder replacement logic and link tracking SSJS script.

Problem Statement:
SSJS code block in our script is to place redirectTo function around each link to track the links in an mail.
This is particularly giving problem, due to this SSJS code block , large sends are taking time to finish.

Sollutions Tried:
we tried optimizing the SSJS link tracking script, but it is not getting better.
Instead of SSJS script, we wraped our content around TreatAsContentArea(), but this has limitation for 300 unique links , and it is not working.
Sample script we have:
%%[
SET @Full_Email_Html = /*Here is the code that gets content from DE and run some replacements*/
SET @Full_Email_Html = TreatAsContent(@Full_Email_Html);
]%%
<script runat=server>
Platform.Load('core','1');
function TrackLinksHTML(f){
if(f.indexOf('@')==0){
f=Variable.GetValue(f)
}
var g=f.match(/<a.*?href=["'].*?["'].*?>/i);
var h=f.split(/<a.*?href=["'].*?["'].*?>/i);
for(var i=0;i<g.length;i++){
Variable.SetValue('@a',g[i].match(/href=["'].*?["']/i)[0].replace(/href=["'](.*?)["']/i,'$1'));
Variable.SetValue('@b',g[i].match(/<a.*?href/i)[0].replace(/<a(.*?)href/i,'$1'));
Variable.SetValue('@c',g[i].match(/href=["'].*?["'].*?>/i)[0].replace(/href=["'].*?["'](.*?)>/i,'$1'));
Variable.SetValue('@d',h[i]);
</script>
%%=v(@d)=%%
<a %%=v(@b)=%% href="%%=RedirectTo(@a)=%%" %%=v(@c)=%%>
<script runat=server>}Variable.SetValue('@e',h[i]);</script>
%%=v(@e)=%%
<script runat=server>}</script>
<script runat="server"> TrackLinksHTML("@Full_Email_Html"); </script>

Questions:
"optimizing SSJS" or "TreatAsContentArea" are out of scope for us.
Are there any other alternatives for link tracking?

We tried with content builder , but it could not be used for tigger send and user intiated emails(like through api).It's only useful for manual send
 
In s7 we have test mail like email address ending with @bh.exacttarget.com for some of the subscribers .But in s50 we don't have any mail to perform bulk send for performance testing.
Does anybody knows any test subscriber in s50.
Thanks in advance 
Context:
We use data extension to store email content and we have an Amp script that runs for each email trigger.
Amp script contains couple of placeholder replacement logic and link tracking SSJS script.

Problem Statement:
SSJS code block in our script is to place redirectTo function around each link to track the links in an mail.
This is particularly giving problem, due to this SSJS code block , large sends are taking time to finish.

Sollutions Tried:
we tried optimizing the SSJS link tracking script, but it is not getting better.
Instead of SSJS script, we wraped our content around TreatAsContentArea(), but this has limitation for 300 unique links , and it is not working.
Sample script we have:
%%[
SET @Full_Email_Html = /*Here is the code that gets content from DE and run some replacements*/
SET @Full_Email_Html = TreatAsContent(@Full_Email_Html);
]%%
<script runat=server>
Platform.Load('core','1');
function TrackLinksHTML(f){
if(f.indexOf('@')==0){
f=Variable.GetValue(f)
}
var g=f.match(/<a.*?href=["'].*?["'].*?>/i);
var h=f.split(/<a.*?href=["'].*?["'].*?>/i);
for(var i=0;i<g.length;i++){
Variable.SetValue('@a',g[i].match(/href=["'].*?["']/i)[0].replace(/href=["'](.*?)["']/i,'$1'));
Variable.SetValue('@b',g[i].match(/<a.*?href/i)[0].replace(/<a(.*?)href/i,'$1'));
Variable.SetValue('@c',g[i].match(/href=["'].*?["'].*?>/i)[0].replace(/href=["'].*?["'](.*?)>/i,'$1'));
Variable.SetValue('@d',h[i]);
</script>
%%=v(@d)=%%
<a %%=v(@b)=%% href="%%=RedirectTo(@a)=%%" %%=v(@c)=%%>
<script runat=server>}Variable.SetValue('@e',h[i]);</script>
%%=v(@e)=%%
<script runat=server>}</script>
<script runat="server"> TrackLinksHTML("@Full_Email_Html"); </script>

Questions:
"optimizing SSJS" or "TreatAsContentArea" are out of scope for us.
Are there any other alternatives for link tracking?

We tried with content builder , but it could not be used for tigger send and user intiated emails(like through api).It's only useful for manual send