Are there any parameters available to prevent execution of transactional delivery node from within template JavaScript? | Community
Skip to main content
December 29, 2020
Solved

Are there any parameters available to prevent execution of transactional delivery node from within template JavaScript?

  • December 29, 2020
  • 1 reply
  • 889 views

I'm in a pinch and am looking for a way to prevent/cancel execution of a delivery node (transactional) using JavaScript/EJS in ACC, from within the template itself if a specific set of conditions are met.  Where can I find information on the methods and properties available for this from within a delivery node?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

The throw() and logError() functions are unavailable at the MTA for some reason.

Campaign allows you to modify the message object though, and will use the modifications. So just trash it 🙂

 

<% if (ctx.pleaseFail == '1') message = 1; %>

 

Sending <ctx><pleaseFail>1</pleaseFail></ctx> in payload will fail that message.

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
January 1, 2021

Hi,

 

The throw() and logError() functions are unavailable at the MTA for some reason.

Campaign allows you to modify the message object though, and will use the modifications. So just trash it 🙂

 

<% if (ctx.pleaseFail == '1') message = 1; %>

 

Sending <ctx><pleaseFail>1</pleaseFail></ctx> in payload will fail that message.

 

Thanks,

-Jon