2

We currently have a Triggered Send Definition that is encountering errors occasionally and preventing further emails from sending. Marketing Cloud support has been able to provide some error messages, but identifying the record that generated the error and specifying the 'fix' has been very difficult. MC Developer support has provided the following links and advised to implement RaiseError and InsertDE functions in order to better identify errors.

RaiseError https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/raiseerror.htm

InsertDE https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/insertde.htm?search_text=insertde

RaiseError Function (Stack Exchange post) RaiseError Function

I'm still new to AMPscript, and I'm having a hard time making sense of a practical usage. I've asked for help from a developer, and he says that based on the example, the specific conditions of the error must be defined in order for this to work. Are we missing something?

Is there a way we can use the functions to write ANY error that is encountered to a separate DE?

We'd also like to make sure the errored record is skipped/logged, but the TSD continues to function. Any suggestions?

1
0

You can put the two together you in an if statement. I assume you have some logic that needs to be true and provided that is not true then the RaiseError is what you'd need to run after.

You can setup the if statement like below:

set @var1
set @var2
set @var3
set @colvar1 = attributeValue("column_name1")
set @colvar2 = attributeValue("column_name2")

if @var1 == "YOURVALUE" then
   set @var3 = "BLAH"
elseif @var2 == "YOURVALUE" then
   set @var3 = "BLAH"
else 
   InsertDE("your_de_name",
     "column_name1",@colvar1,
     "column_name2",@colvar2)
   RaiseError('your error message you want', TRUE)
 endif

This would be how I would write something like this. Happy to chat through the logic above if you have other questions.

The below posts give you the syntax: RaiseError - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/raiseerror.htm

InsertDE - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/insertde.htm?search_text=insertde

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.