Typology to check sender name | Community
Skip to main content
Level 3
November 24, 2020
Solved

Typology to check sender name

  • November 24, 2020
  • 3 replies
  • 4007 views

Hi all,

How do I check if the email is using a default sender name (content block) in the typology?

I have tried checking if strSender == 'ABC' and change the Phase to After the end of the analysis but it doesnt seem to work.

 

Any help is appreciated 

 

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 shelly-goel

@michelle_lowThe entire string may or may not match as is because of the quote inside the quote, class applied could be different or character escaping. I had earlier tried below code and it was working. Match operation would be much more flexible and would also cater to scenario if 'DefaultSenderName' is typed in the Sender Name field.

if (senderName.match(/DefaultSenderName/) || senderName.match(/ABC/)) {logError("Error in" + sg.inFromName());return false;}

3 replies

shelly-goel
Adobe Employee
Adobe Employee
November 24, 2020

@michellelowsl  I would suggest to do that filtering in the 'Target' section of the delivery itself using General > Profile (attributes). Same can be achieved in the Query activity if using a workflow.

 

 

Level 3
November 24, 2020
Hi Shelly, Thanks for your response but I wanted to check the sender name not the recipient name.
Sukrity_Wadhwa
Community Manager
Community Manager
December 1, 2020

Hi @michellelowsl,

Were you able to resolve this query or do you need more help? Do let us know.

Thanks!

Sukrity Wadhwa
Level 3
December 15, 2020
Hi Sukrity, I have updated my question. can you and your team help?
shelly-goel
Adobe Employee
Adobe Employee
December 16, 2020

@michellelowsl  The content/text inside the content block is not available for validation during delivery preparation (typology rule), however if something is added before and after the content block, that could be validated. "emailContent.senderName.source" would be something like below, so you can check if additional "ABC" appears at the start or generate a warning if sender name has "DefaultSenderName" so to manually validate the branding information provided.

emailContent.senderName.source=ABC<span class="nl-dce-fragment nl-dce-done" data-nl-name="DefaultSenderName" contenteditable="false">Default sender name</span>

You may handle the validation in the content block itself and provide an appropriate default value.

 

December 21, 2020
Thanks again @shelly-goel. Will it work with just emailContent.senderName.source=<span class="nl-dce-fragment nl-dce-done" data-nl-name="DefaultSenderName" contenteditable="false">Default sender name</span> ?