Hello community,
An internal request from our support department asked if the Marketo email alert's subject line (they receive - triggered when someone requests support on our contact us form) can contain a unique identifier (of sorts) because the subject carries with the support ticket for the life of the ticket. Currently, I have the requester's full name token in the subject and tried using the comments token but it makes it ridiculously long. Marketo support verified there is not a way to limit the character amount returned in a token.
Suggestions for what could take its place?
Thanks,
--Tracy
Solved! Go to Solution.
You can use velocity script to display first x characters in the email. The below script displayes the first 20 characters in the "Comments" field.
#set( $first20chars = $display.truncate($lead.Comments,20,"") )
${first20chars}
Reference - https://nation.marketo.com/t5/product-discussions/trim-string-to-x-characters-in-velocity/m-p/297841...
You can use velocity script to display first x characters in the email. The below script displayes the first 20 characters in the "Comments" field.
#set( $first20chars = $display.truncate($lead.Comments,20,"") )
${first20chars}
Reference - https://nation.marketo.com/t5/product-discussions/trim-string-to-x-characters-in-velocity/m-p/297841...
Thank you! @Darshil_Shah1
I placed the script:
but it came in as:
Is this because the subject line exceeds the character limit?
@Tracy_Boesken, you 'd need to add the velocity script to an email script my token and the add that script token to the email like you'd add any other normal token. Here is the product documentation page on how to create an email script token for your reference, make sure you select the Comments field from the object tree in the right, only check-marked fields are available to velocity.
Email Script token -
Add this custom script token in the subject line in the email -
Let us know if you have any questions.
The token name has the "-" (dash) characters b/w words, whereas, the one you've in the email's subject line has space characters (" "). The token name should exactly match for Marketo to be able to refer to it. You should insert the token using the "Insert Token" option which appears next to the subject line in the email (it'll appear when you start editing the subject line).
Reference snapshot below -
Start typing the token name in the insert token dialog, and select it once you see your token in the drop-down. Lastly, click insert to add the token.
Let us know how it goes. 🙂