6 Replies Latest reply on May 3, 2017 9:04 AM by JErste

    Pull dynamic data for *other users* in email templates?

    jrundle@washingtonenergy.com Rookie

      Hi there. We have an appointment confirmation email template that auto-populates the customer's appointment date, time, and the name of the sales rep on that appointment, based on the currently selected Cal event. I want to pull Cal event userid's phone number too. I know you use <<&user_var.Phone>> when you want it to pull the information of the user who is actively sending the email. But because our call center sends the email on behalf of the sales rep, the email needs to pull the phone number of the Cal event userid.


      Here is the email:


      Our sales representative <<strtran(substr(user2full(cal->userid), at(" ",user2full(cal->userid))+2,255),")"," ")>> is scheduled to meet with you on: <<cal->ondate>> at <<iif(left(Cal->OnTime, 2)>"12", alltrim(str(val(left(Cal->OnTime, 2))-12))+right(alltrim(Cal->OnTime), 3)+"pm", IIF(padl(alltrim(str(val(left(Cal->OnTime, 2))-0)), 2, [0])=[12], padl(alltrim(str(val(left(Cal->OnTime, 2))-0)), 2, [0])+right(alltrim(Cal->OnTime), 3)+"pm", padl(alltrim(str(val(left(Cal->OnTime, 2))-0)), 2, [0])+right(alltrim(Cal->OnTime), 3)+"am"))>>.



      If you have any questions, feel free to contact <<strtran(substr(user2full(cal->userid), at(" ",user2full(cal->userid))+2,255),")"," ")>> at <<__________________>>


      I have tried <<&User_Var.Phone.(cal->userid)>> and <<&(cal->userid).Phone>> but neither worked. If anyone can help with that it would save us many many hours of creating static templates.


      Thank you!