1

I'm getting the error message

"An unrecognized expression appears in a script block. Script Expression: Contact:Title MemberID: XXXXXXXXX JobID: 0"

What does the memberID refer to?

Here's the AMPscript I used. Thanks for any help!

<!-- LANGUAGE PARAMETERS

%%[
VAR @language

SET @language = 'DE'

IF EMPTY(@language) THEN
IF Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "Austria" OR Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "Germany" OR Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "Switzerland" THEN
SET @language = "de"
ENDIF
IF Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "France" THEN
SET @language = "fr"
ENDIF 
IF Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "Netherlands" THEN
SET @language = "nl"
ENDIF
IF Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "Poland" THEN
SET @language = "pl"
ENDIF
IF Lookup("Contact_Salesforce","MailingCountry","_ContactKey",_subscriberkey) == "United Kingdom" OR EMPTY(@language) THEN
SET @language = "en"
ENDIF 
ENDIF

SET @WAWP = Lookup("Template_Text","Header_WAWP","Language",@language)
SET @LogoLink = Lookup("Template_Text","Logo_Link","Language",@language)

SET @Closing_Form = Lookup("Template_Text","Closing_Form","Language",@language)
SET @Closing_Form_TeamName = Lookup("Template_Text","Closing_Form_TeamName","Language",@language)

SET @Xing = Lookup("Template_Text","Xing_Link","Language",@language)
SET @LinkedIn = Lookup("Template_Text"," LinkedIn_Link","Language",@language)
SET @Twitter = Lookup("Template_Text","Twitter_Link","Language",@language)
SET @Facebook = Lookup("Template_Text","Facebook_Link","Language",@language)
SET @YouTube = Lookup("Template_Text","YouTube_Link","Language",@language)

SET @Copyright = Lookup("Template_Text","Footer_Copyright","Language",@language)

SET @Label_TSID = Lookup("Template_Text","Label_TSID","Language",@language)
SET @TSID = shop__c:company_id__r:Id

SET @Contact_LabelContact = Lookup("Template_Text","Contact_LabelContact","Language",@language)
SET @Contact_LabelEmail = Lookup("Template_Text","Contact_LabelEmail","Language",@language)
SET @Contact_Email = Lookup("Template_Text","Contact_Email","Language",@language)
SET @Contact_LabelURL = Lookup("Template_Text","Contact_LabelURL","Language",@language)
SET @Contact_URL = Lookup("Template_Text","Contact_URL","Language",@language)
SET @Contact_LabelPhone = Lookup("Template_Text","Contact_LabelPhone","Language",@language)
SET @Contact_Phone = Lookup("Template_Text","Contact_Phone","Language",@language)
SET @Contact_LabelFax = Lookup("Template_Text","Contact_LabelFax","Language",@language)
SET @Contact_Fax = Lookup("Template_Text","Contact_Fax","Language",@language)

SET @Contact_LabelServiceHours = Lookup("Template_Text","Contact_LabelServiceHours","Language",@language)
SET @Contact_ServiceHours = Lookup("Template_Text","Contact_ServiceHours","Language",@language)

SET @Label_From = Lookup("Template_Text","Label_From","Language",@language)
SET @Company_Name = Lookup("Template_Text","Company_Name","Language",@language)
SET @Company_Street = Lookup("Template_Text","Company_Street","Language",@language)
SET @Company_PostalcodeCity = Lookup("Template_Text","Company_PostalcodeCity","Language",@language)
SET @Label_ManagingDirectors = Lookup("Template_Text","Label_ManagingDirectors","Language",@language)
SET @ManagingDirector_1 = Lookup("Template_GlobalText","ManagingDirector_1","Language",@language)
SET @ManagingDirector_2 = Lookup("Template_GlobalText","ManagingDirector_2","Language",@language)
SET @ManagingDirector_3 = Lookup("Template_GlobalText","ManagingDirector_3","Language",@language)

SET @Unsub_Producthelp = Lookup("Template_Text","Unsubscribe_Producthelp","Language",@language)

]%% -->



<!-- SALUTATION

%%[
VAR @title, @lastname, @salutation

SET @title = Contact:Title
SET @lastname = Contact:LastName


IF @language == "de" THEN
IF @title == "Herr" THEN
SET @salutation = CONCAT("Lieber Herr ",@lastname)
ELSE 
IF @title == "Frau" THEN
SET @salutation = CONCAT("Liebe Frau ",@lastname)
ELSE
SET @salutation = "Liebes Trusted Shops Mitglied"
ENDIF
ENDIF
ENDIF

IF @language == "en" THEN
IF @title == "Mrs" THEN
SET @salutation = CONCAT("Dear Ms ",@lastname)
ELSE 
IF @title == "Mr" THEN
SET @salutation = CONCAT("Dear Mr ",@lastname)
ELSE
SET @salutation = "Dear valued customer"
ENDIF
ENDIF
ENDIF

IF @language == "fr" THEN
IF @title == "Madame" THEN
SET @salutation = CONCAT("Madame ",@lastname)
ELSE 
IF @title == "Monsieur" THEN
SET @salutation = CONCAT("Monsieur ",@lastname)
ELSE
SET @salutation = "Bonjour"
ENDIF
ENDIF
ENDIF

IF @language == "es" THEN
IF @title == "Sra." THEN
SET @salutation = CONCAT("Estimada Sra. ",@lastname) 
ELSE 
IF @title == "Sr." THEN
SET @salutation = CONCAT("Estimado Sr. ",@lastname)
ELSE
SET @salutation = "Estimado adherido de Trusted Shops"
ENDIF
ENDIF
ENDIF


IF @language == "it" THEN
IF @title == "Signora" THEN
SET @salutation = CONCAT("Gentile Signora ",@lastname)
ELSE 
IF @title == "Signor" THEN
SET @salutation = CONCAT("Gentile Signor ",@lastname)
ELSE
SET @salutation = "Gentile membro di Trusted Shops"
ENDIF
ENDIF
ENDIF

IF @language == "nl" THEN
IF NOT EMPTY(@firstname) THEN
SET @salutation = CONCAT("Beste ",@firstname)
ELSE
SET @salutation = "Beste klant"
ENDIF
ENDIF


]%% -->
  • Instead of using "Contact:Title", would you use SET @Contact_Title = Lookup("Template_Text","Contact_Title","Language",@language) or Lookup("Contact_Salesforce","Title","_ContactKey",_subscriberkey) – Selim Sevim Jan 11 at 9:02
  • 2
    MemberID looks like your Business Unit unique Identifier. Please check if that is the case. If that is true, you normally don't share this value because of several reasons ;) – Johannes Schapdick Jan 11 at 9:54
  • Where were you trying to use this? – Tom Callahan Jan 11 at 17:42
  • Selim Sevim, Thank you, I changed the code but got a different error message! Johannes, Thank you, I removed the member ID... Tom, this is the script in the email template for our onboarding journey – MariaColonia Jan 14 at 10:10

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.