Document Generation

Template Creation

creating a template is the first step in generating documents using cloudfiles doc gen here’s a step by step guide on how to create, preview, and publish templates using microsoft word and the cloudfiles word add in guideline for creating effective templates a well crafted template determines how a merged document will appear and what information it will contain to create a functional template in microsoft word, familiarity with document creation in word is essential the more proficient you are with word, the easier it will be to style the final output effectively using existing documents as sources most likely, you'll have source documents to work from, either electronic or printed, that you need to reproduce as templates these source documents can quickly give you a list of data fields to collect if you don't have an existing document, you can mock up a template and list the fields, their object, and any special formatting required identifying repeating data & conditional content your template may include content common across all generated documents for example, in a quote, you might want to insert your company logo, which should be present in every generated quote identify such content and build templates accordingly you may also want to set up conditions for including specific content in the generated document based on certain criteria for example, different agreement points might be included in a contract based on an account's acv gathering information identify and gather all the information you want to display on the merged documents for instance, if your final document is an invoice, you'll need data about the account, order number, inventory levels, shipping information, price, and the sales representative data contained in the salesforce master object where the cloudfiles doc gen is placed will be automatically available to the builder all other data must be gathered by creating resources by following these guidelines, you can create effective templates that ensure consistent and accurate document generation stages of setting up cloudfiles doc gen templates you can build as many templates as you need for any salesforce object, preview them once built, and then publish them to make them available in your salesforce org for document generation note ‘stage progress bar’ at the top in the add in will help you track and navigate between different stages below are the stages involved in setting up templates using cloudfiles doc gen 1 building template in the build stage, you select the salesforce object you want to create a template for using various actions, you can insert object fields, related data, and custom resources besides field insertions, you can add pictures, tables, and set conditions for content insertion you can also specify the title of the generated documents through the building stage, you will be able to utilize template resources docid\ sx1 c9ittouclsjwhf4zw to retrieve data from connected salesforce org and design the template with these resources using template actions docid\ rp3a9x00pmu5 h3vdo5i once the cloudfiles word add in is installed and the salesforce org is connected, follow the walkthrough instructions given below to start building your own template select cloudfiles add in > login to your salesforce account select platform as salesforce and pick the record based on relevancy (here we will be using account as the record) platform > salesforce and record > account once you click on submit, you will be directed to the next stage of selecting template actions docid\ rp3a9x00pmu5 h3vdo5i and utilizing various template resources docid\ sx1 c9ittouclsjwhf4zw you can use specific resources and appropriate actions according to your use case refer to the gif below to have a visual understanding of these steps we will create the template by inserting placeholders using actions these placeholders will automatically be populated with the selected resources once the document is generated later in the process 2 preview the template once we have finished building the template, you can preview it for a particular record to ensure it produces the desired output before publishing follow the steps below click on 'preview' in the stage progress bar enter the record id click on 'generate preview' a " preview is generated successfully " message will prompt once the preview is generated you can download and see the document by clicking 'open' against the message prompt refer to the gif below to have a visual understanding of these steps 3 publish the template after building a template in the 'build' stage and reviewing it in the 'preview' stage, the final step is to publish the template publishing makes the template available in your salesforce org for document generation on the specified object here’s how you can publish the template go to 'publish' from the stage navigation bar select the appropriate publish option click 'publish' to publish the template note to publish as a new template for the object, check the 'publish as a new template' checkbox to publish as an update to an existing template for the object, check 'select an existing template' and choose an existing template from the drop down once the template is published, you can check the newly created or updated template from the 'cloudfiles doc gen' widget on the object's page or from the 'document generation' tab of the cloudfiles app