Creating dynamic content rule in delivery with first name > 2 characters | Adobe Higher Education
Skip to main content
November 18, 2020
質問

Creating dynamic content rule in delivery with first name > 2 characters

  • November 18, 2020
  • 3 の返信
  • 3413 ビュー

Hi all,

 

I'm looking to create a dynamic content rule targeting those who have a first name that is more than characters long.

 

I have done this in JavaScript in a segmentation node to give them a separate delivery, but I want to do it within the same delivery.

 

JavaScript used in segmentation node: Length(@firstName)>2

 

Does anyone know how to apply this rule within delivery dynamic content?

 

Thanks,

George

このトピックへの返信は締め切られました。

3 の返信

Level 3
November 21, 2020

Hello @george-ct5,

 

There are two ways to do this depending on your end goal :

 

  • If the difference in content is just a greeting sentence you may want to use a content block and do your JS conditions in it directly.

 

  • If the content difference is significant you should go with dynamic content directly in your delivery by leveraging the segment codes in your split activity :

 

 

 

Hope this is clear enough.

 

shelly-goel
Adobe Employee
Adobe Employee
November 21, 2020

@george-ct5

There's also a possibility to use advanced mode in dynamic condition where you can enter the length condition (as not available in basic mode) like context.profile.firstName.length > 2. If you have simple content display condition based on length you might also want to try out with "Visibility Condition". Refer this for detailed steps.

 

George-CT5作成者
November 24, 2020

Hi Shelly, the rule seems to have worked, but it also displays a lot of code above the fragment that has the dynamic rule. Image attached. Do you know how this can be deleted?

Sukrity_Wadhwa
Community Manager
Community Manager
December 7, 2020

Hi @george-ct5,

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

Thanks!

Sukrity Wadhwa
George-CT5作成者
December 7, 2020
The answers provided haven't helped me resolve the issue, but I'm happy to leave this question and continue using the way we used before as we know this works. Thanks.