Example Drawloop Setup
Example - Certificate of Completion for a Course
On completion of a workshop run by you, controlled by the Campaign Member object, you want to send a nice looking certificate to the client.Â
STOP
 Well, let's just say, this is rather disappointing. Drawloop can NOT send emails out from the Campaign Member object, using Salesforce email. This is because the Campaign Member object is not a full Salesforce object (see Campaign Member), and it doesn't have Activities. Workarounds are:
- Use another object - this is what I did - I had an enrollment object related to Campaign Member, so I could still relate back to Campaign and Contact from my enrollment object, which gave me the fields I needed.
- Use SMPT Email - if you have access to SMPT (ask your IT department), you can send via that.
The following guide will use the Enrollment object that is linked to the Campaign.Â
Prerequisite
- Have your basic word document created.
- Have your images created and your images set up in Salesforce - basically add a URL field to the Object you want the image to be on, and include in that field the URL to the publicly available image hosted in Salesforce documents. (Note, you do not have to do the convoluted method as described in the help document here http://support.drawloop.com/lds/document-help/word/images).
- Have your Email Template created.Â
Create the DDP - wizard
- DDP Tab > New
- Enter the details
- Name - Certificate of Completion
- Type - know that you can add more types by modifying the field, or choose Other and enter an Other value.Â
- Output filename -Â <<Campaign_Name>> Certificate of Completion - <<Contact_DisplayName>>
- Note Display Name in Contact is a custom field that joins the Salutation, First Name and Last Name, using the LocalName fields if they are filled in, otherwise the standard names. I always like doing a formula for scenarios like this, because you can then use it everywhere, and it's consistent, and you can change it only in one place.Â
- Object Name - Enrollment
- Contact Selection Required.
- Include Attachments - none
- Set the security level (eg some documents may only be able to be created by specific users).Â
- Next - add a delivery option
- Salesforce Email
- Document Storage - None.
- Yes, you want to store the document, but I like to use Chatter rather than attachments. Â
- Document Output Type - PDF
- Next - Relationships
- Related By - Enrollment
- Relationship - Contact
- Related By - Lookup
- All the rest as standard.Â
- We need a relationship to Campaign also, but we will leave it for now and do it after the wizard is created.Â
- Next - Edit
- Type - Chatter Post
- Subject - Certificate of Completion attached
- Include DDP Output in Post
- Type - Field Update
- Enrollment
- Certificate Sent Date
- <<Today>>
- This helps us when we send the document off automatically.Â
- Type - Chatter Post
- Next - Tag Documents
- This is where you go through your Word document, and put in the correct fields.Â
- Be sure that Word/Powerpoint is chosenÂ
- You can skip this screen for now, and come back to it later.Â
- Next - Upload Documents
- I like to skip this step for now, and go into the advanced settings.Â
- So just choose any file for now.Â
- Click Save.Â
Advanced Setup
- Filter - Complete
- This is a field on the Enrollment where we are only sending this document if the Status is Complete - we set this up on the Loop button.Â
- Limit Deployment - Web
- Delivery Options - Email
- Uncheck Wait for document to process
- Relationships
- Add a Relationship to Campaign
- Document
- Add the document to be sent by this DDP.Â
Now the DDP is all set up to send the document via PDF.Â
Don't set the italicised fields until after you have tested the DDP.Â
Finalise Document
- Insert all your fields using the Field Tagger http://support.drawloop.com/lds/document-help/field-tagger
- Insert dynamic images using the Field Tagger then choosing the Type of Insert as Image.Â
- Use advanced Word field tricks for conditional fields (or put the conditions in your formulas in Salesforce) http://word.mvps.org/faqs/mailmerge/mmergeiffields.htm and http://support.drawloop.com/lds/document-help/word/conditional-text
- Apply formatting to fields in word if needed http://www.gmayor.com/formatting_word_fields.htm (but try formatting them in the field tagger first, or even create a formula field in Salesforce).Â
- Know how to toggle fields on and off in Word http://mikefrobbins.com/2010/05/10/how-to-toggle-field-codes-off-or-on-in-word/
Test Document
To test the document, we will add it to a button.Â
Go back to the DDP Admin screen and use the Deployment Wizard button.Â
- Button Name = Certificate of Completion
- Starting Object = Enrollment
- Single Record Button
- Contact = Contact ID
- Hide Contact Selection
- Hide DDP Selection
- Auto Run
- Attach Back
- DDP IDs = the id of the DDP we created.Â
- Click Generate Button - it's magic! (well for standard objects it is - there are a few more steps for custom objects).Â
Don't set the italicised settings until after you have tested the DDP.Â
Add the button to the page layout
Now go to a Enrollment record, click the button and see what happens.Â
The email should send to the Contact, should add a Chatter Post, and update the field on the Enrollment.Â
Automate the Document
Drawloop buttons are great, but we don't want to have to do this manually each time. We want to send the certificate of completion automatically, when the enrollment is marked as complete. We will follow the steps on this page. http://support.drawloop.com/lds/getting-started/additional-deployments/automated-ddps
Firstly, go back to your button and test that everything is working well (add back in all the parameters you left off in testing) - if it runs OK in an automated fashion after you click the button, then it's time to add the Outbound Message and Workflow.Â
Outbound Message
Follow the steps here http://support.drawloop.com/lds/getting-started/additional-deployments/automated-ddps TO THE LETTER
- Note: use the exact API Name with SF in front of it - eg SFMyObject__cÂ
Workflow
Ensure the workflow is only run if the Certificate Sent Date is blank AND the Status is Complete AND the workflow is set to "Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria". Therefore the certificate will only be sent once, because when we send the Document we get Drawloop to update the Date Sent.Â
Â
Â