In This Article

    Share

    6th Day of CRMmas – Send Thanks the Easy Way with Document Templates

    Every year I make sure to send out thanks for the gifts I receive during the holidays. With the new Document Template generation I think I could save some time. Luckily, I already have a “gifts” entity where I track the gifts I receive along with a charming adjective I use to describe them. Here’s what needs to happen:

    • Build my template – this will be a personal template in this case, but it’s the same process for a system template
    • Upload to CRM – because I don’t want to hassle with remembering how to do a Word-merge
    • Generate the thank-yous – and enjoy a cup of nog by the fire

    Build the Template

    I’ll start by going to an individual Contact or list of Contacts and choosing Word Template->New Template from under the ellipsis in the toolbar, then click Select Entity.

    CRMas2015day7-1

    Next I choose the relationships I want to bring with me. I can choose to have multiple relationships (N:1, 1:N, and N:N) available to include data in the same template.

    Note, only relationships directly with the chosen entity are available at this time, but that covers a big share of use cases.
    Note, only relationships directly with the chosen entity are available at this time, but that covers a big share of use cases.

    Now in Word, making sure I have the DEVELOPER tab enabled, I open the XML Mapping Pane and choose the microsoft-crm XML part from the dropdown. Now I have a full complement of fields available.

    CRMas2015day7-3

    Now I’m free to add in my formatting, basic text, as well as the CRM fields. I’ll add in the first name field as part of my opening “Dear ______”. I Right-Click on the firstname field then choose Plain Text.

    CRMas2015day7-4

    Boom! The special field is now in place so it will pull in the name when I use the template. This process is the same for adding other fields throughout the document.

    Multiple gifts anyone?

    Sometimes I get multiple gifts from the same person. Actually making the document show multiple lines had me a bit stumped when I first tried building one. While the process isn’t that intuitive, once you know what to do it’s pretty easy. Here’s the scoop.

    Insert a table into the word document (I did this then removed borders so they wouldn’t be visible, but left a little padding). Next highlight the entire row that will be repeated.

    CRMas2015day7-5

    In the XML mapping section, Right-Click on the Relationship Name and choose Repeat.

    CRMas2015day7-5b
    I know it worked because there’s a bigger box around the repeating field now.

    Ready, set, send!

    Now that the template is ready, I’ll upload by going to a list of Contacts and choosing Word Template->New Template from the toolbar, just like I did when downloading the blank template. I choose Word Document then click Upload and select the template I just created. Though I don’t have to, I’ll give it a more descriptive name so I know which document template this is later on.

    CRMas2015day7-6

    After a browser refresh, I choose the contact I want a thank-you note for, then choose Word Template->Thank-you. It’s so beautiful!

    CRMas2015day7-9

    Final Thoughts

    I have a couple of confessions to make: 1) I don’t actually track gift giving in CRM, and 2) I’ll probably get a little more personal with my thank-you notes. There’s something about departing from my 20 year practice of sending handwritten thank-you notes that just doesn’t quite work for me…but still, building this out was good practice for creating CRM Document Templates and it will definitely be part of my bag of CRM tricks. Also worth noting: I had to really restrain the solution architect inside of me that kept saying “hey, you should really approach this differently…” which was followed by thoughts of an Occasion entity, etc. to make it more universal and repeatable from year to year. Perhaps it’s time for me to take it easy on the egg nog. Happy holidays!