I have a workflow that is triggered by a custom objects date property. There are multiple objects that per contact and it sends an email for each object. So the contact gets multiple emails. I’d like to send the contact only one email and display details from each matching object record in a list.
Update - Example:
I’ve set up a custom object called “Policies”
Each contacts can have 1 or multiple policies associated with them.
I want to send a renewal email to customers 30 days prior to the policy expiry date.
My workflow enrolls people based on the expiry dates on their associated policies.
Single contacts can (and usually do) have multiple policies with the same expiry date. In cases like this the workflow enrolls them one for each policy resulting in them receiving multiple emails back to back.
==Resulting Email==
Dear Contact Name,
You have the following policies renewing on September 1st:
Policy #123456789
Policy #223456789
=================
Ideally, I’d like to get contacts based on the Expiry Date property in the Policies object table. Then loop through those contacts creating a single email for each, and selecting all the policies that match that contact and the date so I can list a couple of properies from each Policy record in the email.
As I’m typing this, I’m wondering if this can be done with 2 separate workflows. One Policies based workflow to create the list of contacts and one Contacts based workflow to send the email and grab the poicy info. I’m going to do some experimenting with that, but if anyone has ideas or has done this before, please let me know.
Hey @robbieboy there’s two ways to do what I believe you’re trying to do.
The first would be to use branching logic in your workflow to check for each associated object type. So you could for example have 3 object types Contact, Shipments, Assignments. You could have a branch for each object or branches for each combincation of objects if you need. Each branch could then have an action to send an automated email that goes out to the contact with the information on they need.
The alternative would be to have a single automed email with personalization tokens in it. You could add in every potential personalization token here and just set the default value to be blank. This would populate the information if the value for that object property is known, and then just show nothing if it isn’t known. It might take a little bit of playing around to get the layout right so there’s no a lot of whitespace but it should achieve what you’re looking to do!
Thanks for the response Tom! I think my initial post could have been a little vague. I can see how this would work for different objects, but what I’m trying to do is list multiple records from a single associated object. I have a custom object called Policies.
So for instance if my contact has 3 policies associated with them I want to list properties from each of those in a single email. I’ve clarified my initial post with a few more details about what I’m trying to do.