Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Email Templte 'To' recipe logic

Raghu
All-Star
All-Star

Hi Team,

I Have requirement based on customer value need to send mail , as of now secondarymanager email id saving in cp7 value. i need include exiting logic. could help on this issue please?

secondarymanager=cp7

vendormanager=cp59

Current working synatax: <% if (null!=user.customproperty59 && user.customproperty59!='') print"${user.customproperty59}" else print "${user.vendorManager.email}"%>

i need include based on customer = 15 need to secondary manager (cp7 we have value mail id)

tried :

working alone 1 :

<% if (null!=user.customproperty7 && user.customproperty7!='') print"${user.customproperty7}" else print "${user.secondaryManager.email}"%>

Have 2 cases :

1. Secondarymanager,VendorManager combination also it sholud trigger both

2..only vendorManager will pass

3. only Secondarymanager will pass

tried below not working used user.customer=15 and without comma print stement , above 2 and 3 separately tried but not working

<%
if(null!=user.customproperty59 && user.customproperty59!='' && user.customer.customerkey!='' && user.customer.customerkey==15) print"${user.customproperty59}" "${user.customproperty7} else print "${user.vendorManager.email},"${user.secondaryManager.email}" || (user.customer.customerkey!='' && user.customer.customerkey==15) print "${user.customproperty7} || (null!=user.customproperty59 && user.customproperty59!='') print"${user.customproperty59}" else print "${user.vendorManager.email} || (null!=user.customer.customerkey && user.customer.customerkey==15) print "${user.customproperty7}" else print "${user.secondaryManager.email}"
%>

 

 

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.
4 REPLIES 4

rushikeshvartak
All-Star
All-Star

<%
if (null != user.customproperty59 && user.customproperty59 != '') {
if (user.customer == 15) {
print "${user.customproperty7}" 
} else {
print "${user.customproperty59}" 
}
} else {
print "${user.vendorManager.email}"
}
%>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

thanks @rushikeshvartak

Not working , mail not going to cp7 and it printing empty.

CR_0-1709185224279.png

 

and we tried same type of scenario when customer object passing email not getting cp7 person

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

share variable list


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Raghu
All-Star
All-Star

Hi ,

When we use multiple condition it throwing error un-support values  , i was changed the requirement and different way achieved.

<%
if(null!=user.customproperty59 && user.customproperty59!='' && user.customer.customerkey!='' && user.customer.customerkey==15) print"${user.customproperty59}" "${user.customproperty7} else print "${user.vendorManager.email},"${user.secondaryManager.email}" || (user.customer.customerkey!='' && user.customer.customerkey==15) print "${user.customproperty7} || (null!=user.customproperty59 && user.customproperty59!='') print"${user.customproperty59}" else print "${user.vendorManager.email} || (null!=user.customer.customerkey && user.customer.customerkey==15) print "${user.customproperty7}" else print "${user.secondaryManager.email}"
%>

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.