Skip to main content
Level 2
January 31, 2019
Respondido

Extracting Values from a Custom Object Field - Velocity Token

  • January 31, 2019
  • 1 comentário
  • 1484 Visualizações

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

Este tópico foi fechado para respostas.
Melhor resposta por Jaap_Groen

Okay, managed to find the solution myself.

Following works as a custom token:

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

1 comentário

Jaap_GroenAutorResposta
Level 2
January 31, 2019

Okay, managed to find the solution myself.

Following works as a custom token:

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