SOLVED

Re: Extracting Values from a Custom Object Field - Velocity Token

Go to solution
Jaap_Groen
Level 1

Extracting Values from a Custom Object Field - Velocity Token

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:

ean-oan.png

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

1 ACCEPTED SOLUTION

Accepted Solutions
Jaap_Groen
Level 1

Re: Extracting Values from a Custom Object Field - Velocity Token

Okay, managed to find the solution myself.

Following works as a custom token:

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

View solution in original post

1 REPLY 1
Jaap_Groen
Level 1

Re: Extracting Values from a Custom Object Field - Velocity Token

Okay, managed to find the solution myself.

Following works as a custom token:

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