We intend to automate the generation of emails. No buttons for users to click. Once the data meets the correct criteria, the email is to be sent. Using Outbound Messages and workflow. To do this, I need to auto-populate the To and Subject fields of the email. How can I do this? Is this included in the formula field used in the Outbound Message?
Hey Jeff Sawin,
When using an SMTP Email delivery option you can set the "Additional To" ( and CC and/or BCC) and "Subject" fields on the Delivery Option you will be using. These can be set to either a static value or for a dynamic value you can use the Field Tagger to grab values from fields related to the record that the package will be running on.
When using a Salesforce email template you still set the "Additional To" (and CC and/or BCC) on the Delivery Option but the subject is set on the Salesforce Template side and can be static or dynamic using the regular Salesforce email template tags.
I believe that it is possible to add ContactId as a parameter to the formula as well that would automatically send to that contact as well, and you'd be able to use logic in the formula to determine which Id you wanted, but I have not actually used that option in any of the DocGen Packages that I have set up.
Thanks for the feedback.
We’ll be using Salesforce Email.
I see I can add Additional To on the Delivery Option with a Salesforce Email Template I can set the Subject, but where does the To value get set? The main record is actually a custom object which is subordinate to Contact (Application for Admission). The controlling fields are in this CO.
BTW, does an HTML Salesforce Template work? I couldn’t get that to work.
Jeff Sawin
jeff.sawin@apexit.com
847-856-8520(O) | 847-477-2091(M) | jeff.sawin(Skype)
As far as I know, the 'Additional To' is the only 'To' used unless a contact is specified for Automated packages, in the Drawloop Next formula or manually selected when running the package on demand, in which case both values would be placed into the To field.
From what you've described it would seem that you could go either way, either:
1. Add &";contactId:"&Contact__r.Email to the formula before the DDPId parameter (I think that is the syntax), or
2. Create a 'lookup from what you have' relationship on the DocGen Package, and relate the contact to your AFA object. You can then select the field tag for the email (which should be something like) <<Contact_Email>> and put it into the 'Additional To' field on the Delivery Option.
Also, just a reminder- when setting up automated emails you'll need to add ;deploytype:autoemail after specifying the email delivery option in the Drawloop next field.
In our org we have HTML emails with SMTP delivery options that are sent using DocGen, and also use HTML Emails for other use cases withou DocGen. I don't currenly have any DocGen packages sending using Salesforce Emails, but have set them up successfully with HTML in the past.
Option 1 worked. I included the Contact ID in the Drawloop_Next field.
Thanks for the assist.
Jeff Sawin
jeff.sawin@apexit.com
847-856-8520(O) | 847-477-2091(M) | jeff.sawin(Skype)
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.