after changing the name of a Script token it doesn't work anymore | Community
Skip to main content
New Participant
May 11, 2020
Question

after changing the name of a Script token it doesn't work anymore

  • May 11, 2020
  • 1 reply
  • 2766 views

Hello all, 

 

at this weekend I created that token for a tracking link. After creating it everything worked fine, but after changing the name of the token it doesn't work anymore.

 

The script of the script token was is this one:

 

 

#set($carFirstLACategory = "887") #set($consolidationFirstLACategory = "8992946") #set($freelanceFirstLACategory = "40895887") #set($livingFirstLACategory = "886") #set($freeusageFirstLACategory = "888") #if($lead.cma_latestLaCategory == "CAR") #set($lead.cma_latestLaCategory = $carFirstLACategory) #elseif($lead.cma_latestLaCategory == "HOME") #set($lead.cma_latestLaCategory = $livingFirstLACategory) #elseif($lead.cma_latestLaCategory == "TRADE") #set($lead.cma_latestLaCategory = $freelanceFirstLACategory) #elseif($lead.cma_latestLaCategory == "CONSOLIDATION") #set($lead.cma_latestLaCategory = $consolidationFirstLACategory) #else #set($lead.cma_latestLaCategory = $freeusageFirstLACategory) #end ${lead.cma_latestLaCategory}

 

 

 

With this script it showed me, depending on the category a customer has, the number I needed. 

 

Everything worked fine, till today morning when I changed to token name from "Tracking_link" to "category", everything was fine and the script worked. Now it always shows me the number "888" even though it should show me "887". 

 

Why does that happen?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
New Participant
May 11, 2020

Changing the name of the token doesn't change how it works. But make sure the fields didn't accidentally become unchecked in the tree. This can happen sometimes when editing tokens in the UI.

New Participant
May 12, 2020

I know that it should not change how it works and I checked if the necessary bos is checked.  It is checked. 

 

I don't know why, but sometimes the script works and sometimes not. I checked yesterday multiple times and it didn't worked. Today in the morning it worked, and now it doesn't work anymore. 

 

I check the mail with preview from Customer perspective, the mail recognizes the regementation but the token does not.