Merging Documents with Drawloop
In it's most simplified use, Drawloop is the merge processing application that takes your data from Salesforce and merges it in to document templates. However, DrawLoop can do much more to automate document creation, update salesforce records and perform complex transformations and automation.
This article will NOT recreate the documentation found on the DrawLoop support site: http://support.drawloop.com/lds, instead we will break down the construction of a merge process built by KELL so that you can learn how to modify or recreate as needed.
Diagram of a DDP
The DDP is where the instructions are stored for the merge. It's where you'd find the specific document templates referenced, the specific object records and the outputs and actions. Think of the merged records as the product, the DDP as the factory and the templates and the object records as the supplies.
SFZC's DDP's
At the time of this documentation there are three DDP's configured for SFZC. There is no limit to the number of DDP's to be created. Here's an important consideration: create a new DDP when you need a different TYPE of merge output, and NOT when you need a different variation of an existing merge.
For example, the Membership Letter DDP can be used to merge records and template content for all types of Membership. It's not specific to Dharma Light or Dharma Rain, etc. Each level has its own template or pieces of a template, but all of the process is handled within this single DDP; therefore, if SFZC creates a new Level in the future, simply modify this existing DDP and do not create a new one.
On the other hand, as an example, if you wanted to begin merging an annual summary of gifts for donors with a single click that would require a new template and a new DDP to pull together the correct records.
Breaking down the DDP
Let's dissect this Membership Letter DDP so you can understand how it works. The screenshot below and the following screenshot are from the same DDP, just broken into two halves for this documentation.
- The Field Tagger will become an incredible tool for you to grab the merge tags needed when creating documents or inserting merge values elsewhere.
- The output file name is flexible, allowing you to determine what the file name should be, even merging values into the name and concatenating merged values when appropriate.
- The object is where you're getting your primary data from. Think of this as the main object; however, using data relationships you can also merge values from records related to this main object.
- The documents listed here are the templates you're merging in to or together.
An easy merge, like the one below, has a single document template to be merged. However, there are conditional statements within each template which determine whether it should be used or not.
DDP: Membership Letter ~ Conditional Merge
When you click the gear icon next to a document you'll see options like below. In this example we see the Dharma Light Membership.docx file is merged when the membership summary level = Dharma Light.
Advanced Merge Options
Another way to think about your merge file output is to break it up into sections. These could be pages, paragraphs, even individual sentences within a paragraph. For example, insert a specific paragraph when acknowledging a gift that is greater than $X, insert a different paragraph when it's less than $X and so forth. This conditional approach allows you to reuse some components of a document so that you're not maintaining multiple files that are very similar except for a specific section.
DDP Options
Once you've assembled the document templates with a merge, you may also determine several options.
- Delivery Options: think of these as the output choices. Do you want to restrict the output to a PDF only? Or make available a merged .doc file? Or push the merge into an email? There are several options.
- Relationships. This is where you can define the data relationships so that you can use values from records related to the primary object. In this example our primary object is the Membership Summary. Yet because the membership summary is related to the Opportunity and Contact, this means we can also merge any opportunity or contacts fields into our documents along with Membership Summary fields.
- Insert-Updates. As a post-merge process you can have the DDP modify your data. A classic example is to check a box on a donation as having been acknowledged when you've run the merge.
Modifying Documents
Your template files are all stored as Documents in Salesforce. For the existing DDP's you can easily find these by accessing the DDP, then clicking the arrow icon next to the associated file. Clicking this will then open the Document record.
Document Record
Here you'll find the reference record to the specific document. You can click "View" to download the source file, .docx in this example. Then you can modify the source file and click Replace Document to change it. When making simple text or formatting or merge changes, that's all you need to do.
Modifying a Source Document
Opening the source document you'll see the merge fields, as denoted by << >> brackets. NOTE: DrawLoop does not require you to use the Word merge fields. These references below are simply text values with the << on either side. This makes it super easy.
Using the Field Tagger
From the DDP is a link to the Field Tagger. This is where you can find the appropriate reference tag to use in your source document.
- Choose the object where the field you want resides
- Then choose the field. Note: some fields, like date and number fields may have additional formatting options that appear.
- Copy the field tag value (highlighted below) and paste it into your document source file.
Rinse and repeat for each field you wish to include in your document template for merge.
Conclusion
DrawLoop is a powerful utility. It can be used to quickly merge documents, create complex reports, powerpoint files, excel spreadsheets and much more. For SFZC we have used it to create a few document merge processes, but it can be used for much more. The support team for DrawLoop is very helpful and their documentation is quite robust, so we are confident you will find this to be a very useful utility going forward.






0 Comments
Add your comment