Hi all,
I have a script token {{my.getdomain}} that splits an email address and retrieves the domain name in a variable:
#set( $em = ${lead.Email} )
#set( $dom = $em.split("@") )
$!{dom[1]}
However, with the 'add data value' flow step it adds into the field (string) webdomain:
{"codeBlock":"#set( $em = ${lead.Email} )\n#set( $dom = $em.split(\"@\") )\n$!{dom[1]}","scriptingObjects":{"standard":{"2":{"label":"Person","fields":{"31":{"label":"Email Address"}}}}}}
in stead of the domain name from the email address (I did check the field 'email address' on the right hand pane).
If I add the same token in an email, it renders correctly.
Any ideas why the domain name is not entered into the field?
Solved! Go to Solution.
ok, thanks for your reply.
That is a pity as I would rather not use a webhook service when such a powerful tool as Velocity is available.
Velocity is super powerful, but it only exists in the context of emails. However, Velocity can't write values back to the database.. something you typically want to do.
If you need a webhook service, I recommend FlowBoost. It's ideal for using in Marketo as it was built for it from the ground up.
Cheers
Jo
Indeed, and FlowBoost has a proper parsing function built in (you can also use a regex of course):
emailParts = FBUtil.string.partsFromEmail({{lead.Email Address}});
emailDomain = emailParts.domain;
Thanks Jo, I use indeed Flowboost for exact this issue (and more).