I want to create a email which has a link depending on a certain value.
In the data extension
candidate_discipline__c_Salesforce, the primary key is
candidate__c and the column where I want to look in is
This data extension is a related list in Salesforce.
So depending on which discipline a candidate has i want to show a different URL.
If he is a "Drilling engineer" then show URL in mail
If he is a
Rigger then show URL in mail
I'm quite new to AMPscript, this is what i tried doing but it's not working:
%%[ var @discipline set @discipline = Lookup("Candidate_Discipline__c_Salesforce", "Candidate__c", "Name", "Surveyor") ]%% %%[IF @discipline == "Surveyor" THEN]%% <a href="https://www.surveygizmo.com/surveyor">Surveyor</a> %%[ELSEIF @discipline == "Rigger" THEN]%% <a href="https://www.surveygizmo.com/rigger">Rigger</a> %%[ELSEIF @discipline == "Trainer" THEN]%% <a href="https://www.surveygizmo.com/trainer">Trainer</a> %%[ELSEIF @discipline == "Outlander" THEN]%% <a href="https://www.surveygizmo.com/engineer">Engineer</a> %%[ ENDIF ]%%
Can someone help me with this code?
Please find below a sample of de Data Extension:
Name Candidate__c BusinessLine__c Job_Title__c
Chief Engineer 003200000142TJAAA2 a1Sw00000033FFYEA2 a0cw0000008yEaEAAU
Able Seaman 003w0000018fYM3AAM a1Sw00000014jMbEAI a0cw0000006qk50AAA
Skipper 003w000001LBxFMAA1 a1Sw00000014jMbEAI a0cw0000006YD7SAAW
Desired output: I am going to run a journey for all Chief Engineers, Able Seamans and Skippers. Those will receive a email with a link which is specific for THAT discipline. Skippers will get a link to a self-assessment form for Skippers and Chief Engineers will receive a link to a self-assessment form for Chief Engineers.
The journey will be on the
Contact_Salesforce Data Extension. The
Candidate_Discipline__c_Salesforce will be AMPscripted in the email as i tried to do.