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.
|
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
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
NB Here the Contact token {R28173.email} is resolved correctly, and the email is sent to all contacts linked to the campaign.
NB Here the Campaign token {!name#text} is resolved correctly.
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