Email Template, related object tokens in Email Body are not resolved - Forum - Rollbase - Progress Community

Email Template, related object tokens in Email Body are not resolved

 Forum

Email Template, related object tokens in Email Body are not resolved

This question is not answered
Hi Guys,
 
I’m using Rollbase Private Cloud, version 4.3.0.0 …
 
I’m trying to send an email using an Email Template from an Object (called Campaign), which has a 1 to many relationship with another object which has contact as an attribute (namely Contacts)
/cfs-file/__key/communityserver-discussions-components-files/25/52611.image001.png
 

1.      Selected Campaign(s) for which email will be sent out.

2.      Email Address, uses the token that relates to the related object Contact’s email address (This gets resolved correctly and email is send to the Contact)

3.      Email Subject, uses the token that related to the Campaign’s name (This get resolved correctly and email subject will have the Campaign name as the subject)

4.      Email Body, any tokens that relates to the related object Contact (eg. Contact’s firstName) is not resolved correctly/at all, see below the email example.

Please advise if this is a bug? Or if this is the expected behaviour.
 
/cfs-file/__key/communityserver-discussions-components-files/25/0361.image002.png
 
Mail that is received
 
Regards,
http://www.aigs.co.za/templates/email_signatures/2016/stephen_van_rooyen.png
 
 
All Replies
  • Since you are performing the send to action from the campaign there is no one specific contact that is in scope which is why the token never gets resolved since you are using a M:1 contact to campaign relationship.

    You could either:

    - perform the action on selected contacts and create your template on the contact object instead

    - add a loop begin and end sequence in the campaign template's email body so your contact tokens are resolved (these will be sequentially displayed)

    - create formula fields in the campaign object to gather related contact data using query apis and use these in the template

    I believe that this is the intended behavior of the function although i am not part of progress, that is just my understanding

    Hope this helps

  • Hi
     
    I will more than likely have a similar problem if I were to send the email from the Contacts.
     
    I do not believe that this is the intended behaviour, but I might be wrong.
    What I’m trying to do is similar to the example in the Rollbase User Guide page 278,
    where the Email template body has tokens from a related object.
     
     
    Regards,
    http://www.aigs.co.za/templates/email_signatures/2016/stephen_van_rooyen.png
     
  • With the example that you noted, it doesn't seem to state the type of relationship the objects involved have with each other. I can only assume that the relationship is 1 Room : Many reservations and multiple reservations were selected and the Send To action performed (using the screenshots as reference).

    But, using your current setup as the case in point, in comparison to the example: you are performing the action on the Room object and not the Reservations object. You are coming from the One-side of the relationship (Campaigns) and I believe that you will never be able to target a specific contact since they will always be treated as many contacts - hence, no return/resolving of tokens when you use the tokens from the contact object

    - Unless you place the tokens within a LOOP begin & end sequence or use some other method to target your related contacts' data.

    Noting that : I will more than likely have a similar problem if I were to send the email from the Contacts.

    I think you might be mistaken. Since on the Contact side of things there is always just One Campaign (since you stated the relationship is 1 Campaign : Many Contacts) where I believe you should be able to pull in the related Campaign's data when you use its tokens from the Contact perspective.

    For the case in point, I think it is intended. If you try coming in from the Contact side I believe that you should always have values for your related campaign's tokens, if you don't get any, I would call that a bug, but again, from the Campaign side, I think you won't be able to get any values off of the Contact tokens since they would always be treated as a "many" entity and never a specific contact.

    Hope this helps.

  • I have tested the scenario you have mentioned, and it is working for me. Here are the steps given below. From my observation, the only difference is I have used the loop to retrieve all the related records.

    In Campaign create the email template as given below and save it.

    Dear {!R13053.firstName},

    These are all the related contacts listed below.

    {!#LOOP_BEGIN.R13053}

    This is from Contact object - {!R13053.phone}

    {!#LOOP_END.R13053}

    From Campaign select a record which ahs related objects in 'Contact' and select the 'Send To' option from the more actions drop down.

    The rest of the steps are the same as you have given.

    On clicking the send button, the email should contain the related name after Dear.

    If it still does not work, do let me know I shall share the app.

    Regards,

    Saras

  • Hi Saras,
     
    Thanks for the response, however this is not a viable solution.
     
    I have a many-to-many relationship between the 2 object Campaign and Contacts
    I would like to send out an email campaign, to the contacts liked to a particular campaign.
    1. camp_test” is the campaign that I’m using to send an email too.

     

    1. The email should be send to the email address of all the related contacts of this specified campaign.

    NB Here the Contact token {R28173.email} is resolved correctly, and the email is sent to all contacts linked to the campaign.

     

    1. The email subject inherts the campaign name {!name#text}

    NB Here the Campaign token {!name#text} is resolved correctly.

     

    1. In the email body, I would like to use both Contact and Campaign tokens.

    NB Here the Contact tokens {R28173.firstName} is NOT resolved, and the email received will show Dear <blank>

    I cannot use a loop here either, I do not want the email to contain details f.or all contacts,

    I only want the details of the specific contact the email is sent too

     
    Is there a way to achieve this?
     
    Regards,
    http://www.aigs.co.za/templates/email_signatures/2016/stephen_van_rooyen.png