Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 6th edition is out.
SOLVED

How we can add client name in proper case in email body or SMS

Avatar

Level 2

Can you help us the fix the client's name in proper case. which function we need to use. 

1 Accepted Solution

Avatar

Correct answer by
Level 2

I could be wrong - but that looks like syntax for Personalization & Dynamic Content. I am working on a field within the Advanced Editor in an AJO Action.

 

Since there is no Title Case method, we ended up using the following expresssion:

concat(
	upper(
     	substr(#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}, 0, 1)
     ),
	lower(
    	substr(#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}, 1, length(#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}))
     )     
)

 

 

View solution in original post

8 Replies

Avatar

Level 2

it is not allowing to pass in action box parameters. giving me error. 

"The expression is invalid : Unexpected word 'camelcase' . Please, check that it is a valid token and that you are using it at the right place."

Avatar

Community Advisor

By looking at the error function should be camelCase

 

I tested this and it's working: {%= camelCase(profile.person.name.firstName) %}

Thanks, Sathees

Avatar

Level 2

SumanTiwari_0-1682076931301.png

SumanTiwari_1-1682076942299.png

 

I also tried both the ways but it is not working. attached the screenshot,  I am looking for SMS and passing this code in SMS action fields

 

Avatar

Level 2

I am running into a similar issue - Not for use with personalization, but within the AJO Advanced editor. For example trying to manipulate a string for use in an AJO Action.

Avatar

Level 2

Hi, I had to use titleCase to get name in propper case. I could not get Camle Case working. Just same error as described. 

 

Try using this

' {%= titleCase(profile.person.name.firstName) %} '

 

Hope this helps 

Cheers

 

Avatar

Correct answer by
Level 2

I could be wrong - but that looks like syntax for Personalization & Dynamic Content. I am working on a field within the Advanced Editor in an AJO Action.

 

Since there is no Title Case method, we ended up using the following expresssion:

concat(
	upper(
     	substr(#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}, 0, 1)
     ),
	lower(
    	substr(#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}, 1, length(#{ExperiencePlatform.ProfileFieldGroup.profile.person.name.firstName}))
     )     
)

 

 

Avatar

Community Advisor

You're correct @MichaelBailey.  The example which I have provided is used for personalization and thanks for sharing how you have achieved this in the action.

Thanks, Sathees