Extracting Values from a Custom Object Field - Velocity Token | Community
Skip to main content
New Participant
January 31, 2019
Solved

Extracting Values from a Custom Object Field - Velocity Token

  • January 31, 2019
  • 1 reply
  • 1472 views

Hi guys,

I want to add in a customer number into a customer onboarding email, that is part of a synced SF field in Pardot.

The number looks as following:

Only the part behind the '/' should be displayed in the email. Unfortunately the length of the customer numbers differs, so there is not a fixed position in the field to extract from. I think this can done using Velocity scripting ('extract after /'), but I would not know how. Any ideas on how to do this?

The token for this field is {{company.EAN/OAN}}.

Thank you,

Jaap

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 Jaap_Groen

Okay, managed to find the solution myself.

Following works as a custom token:

$lead.EAN_OAN__c.split("/ ")[0]

1 reply

Jaap_GroenAuthorAccepted solution
New Participant
January 31, 2019

Okay, managed to find the solution myself.

Following works as a custom token:

$lead.EAN_OAN__c.split("/ ")[0]