Personalization block which populates the value in anchor tag

Avatar

Avatar

Ramaswami

Avatar

Ramaswami

Ramaswami

22-07-2020

Hi Team, 

 

i am just loading a file and sending emails to the emails which are there in the file loaded and the people which are there in file i am not importing them to recipient schema i am just using the target mapping as external and sending emails. 

 

But while sending the emails i will have to pass a link to each profile based on the values loaded from excel. 

Sample file which i loaded: 

Ramaswami_0-1595444080706.png

 

So in the email there will be a unique link and we need to pass the first letter of the job category in that link. In the above case i need to pass 'C' to the link. 

 

I am writing two personalization blocks : 

 

Block1 internal name : prdVIEW10011

 

<%

if(dataSource.Job_Category=='Corporate') {

%>https://XXXXXXXX/en-US?type=1&jobCat=<%@ include view='prdVIEW10015' %> <%

} else if(dataSource.Job_Category=='Call Center'){

%> https://XXXXXXX/en-US?type=2&jobCat=<%@ include view='prdVIEW10015' %> <%

} else if(dataSource.Job_Category=='test'){

%> https://XXXXXX/en-US?type=3&jobCat=<%@ include view='prdVIEW10015' %> <%

} else {

%> https://XXXXX/en-US?type=0&jobCat=<%@ include view='prdVIEW10015' %> <%

}

Block 2 (prdVIEW10015which i am using in block 1 : 

 

<% if ( dataSource.Job_Category != '' ) { %>
<%=dataSource.Job_Category[0]%>
<% } %>

i am using block 1 in email delivery : 

 

Ramaswami_0-1595444494177.png

 

 

The link should be like : https://XXXXX/en-US?type=0&jobCat=C

and i am getting link this : https://XXXXX/en-US?type=0

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

anupk2111

Avatar

anupk2111

anupk2111

23-07-2020

If this is not a reusable logic, why don't you use a targetData field to personalize the URL instead of creating a personalization block?

You could just define the same logic you have in the personalization block, in an enrichment activity in the workflow. 

 

Let me know if that works for you.