Typology rule for erroring deliveries with no-authorized brands assigned. | Community
Skip to main content
Level 2
January 4, 2022
Question

Typology rule for erroring deliveries with no-authorized brands assigned.

  • January 4, 2022
  • 1 reply
  • 1154 views

Hi all, 
as per object I'm trying to create a new typology rule that will raise an error in case of sending deliveries with not-authorized brands. 

Since the "Filtering" typology rule will filter only consumers, without raising errors, I need to create a new typology rule with Control type. 

Is it possible to write a JS code that will check for brands of deliveries? And in case, how should it be written?

Thanks in advance!

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

1 reply

Craig_Thonis
Adobe Employee
Adobe Employee
January 5, 2022

Hello Sasaprova,

 

In ACS control type rules cannot be created quickly, but they can be made. You will need to export an existing out-of-the-box control rule, then modify the XML and rename it. Once the rule has been changed, you can import it back into ACS, which will create the desired control rule typology.

 

Regards,

Craig

Level 2
January 5, 2022

Hi Craig, 
thank you so much for your answer! 
Yes, I know that part and that's exactly what I'm doing right now. The problem is that I don't have any idea of how to access the brand of the delivery via JavaScript, in order to evaluate some conditions on it (e.g: controlling that is not equal to specific brand names). 

Do you know how to do it?

I know that some OOB typology rules are using these pieces of code for accessing variables such as the subject of the delivery

var strSubject = emailContent.subject.source; (where emailContent = 
for (var i = 0; i < delivery.content.email.length; i++) {
var emailContent = delivery.content.email[i];
var strSubject = emailContent.subject.source;)

But I'm not able to write a code able to retrieve the brand of the delivery that is going to be sent. 

Sukrity_Wadhwa
Community Manager
Community Manager
February 24, 2022

Hi @craig_thonis,

Could you please help @simonc2294 further with their query?

Thanks!

Sukrity Wadhwa