{"id":1496,"date":"2022-04-11T21:24:45","date_gmt":"2022-04-11T21:24:45","guid":{"rendered":"https:\/\/logicbuilder.integroscrm.com\/help\/?page_id=1496"},"modified":"2022-04-13T13:25:49","modified_gmt":"2022-04-13T13:25:49","slug":"lb-templates-2","status":"publish","type":"page","link":"https:\/\/logicbuilder.integroscrm.com\/help\/lb-templates-2\/","title":{"rendered":"LB Templates"},"content":{"rendered":"\n<p>LB Templates is Logic Builder extension for generating HTML templates. HTML Templates can contain formatted text, images, links, data from Sugar, and more.<\/p>\n\n\n\n<p>Templates from LB Templates can be used:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>To compose a Body of an Email to be sent from Logic Builder<\/li><li>To compose PDF documents with Logic Builder<\/li><li>To populate the event message in the Timeline Viewer<\/li><li>To fill any HTML-type fields with HTML created from a Template<\/li><li>To prepare HTML text and then transfer it to the 3d party system<\/li><\/ul>\n\n\n\n<p>Below is an example of a Template and TimelineViewer message that is composed based on the Template:<\/p>\n\n\n\n<p><b>How to create a new Template?<\/b><\/p>\n\n\n\n<p>Once LB Templates extension is deployed into Sugar, the new module LB Templated is added. To create a new template, navigate to the LB Templates module and select Create LB Template:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"159\" height=\"147\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-5e116d74b7494b2e94847df51ba50b24-1.png\" alt=\"\" class=\"wp-image-1372\"\/><\/figure>\n\n\n\n<p>Then provide the following data:<\/p>\n\n\n\n<p><strong>Name<\/strong>&nbsp;&#8211; input the name of your template.<\/p>\n\n\n\n<p><strong>Template<\/strong>&nbsp;&#8211; input template content. Simply input template body, using variables (see Context below) and TinyMCE functions:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Button<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-16f69c995e6a41a49aa45fc3ab188021.png\"><\/td><td>Bypass the rich-text editor options and insert your own HTML code, or view the HTML code of an existing template to make advanced changes.<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-be9d38754d154274b3bd7a870115d947.png\"><\/td><td>Use these basic font formatting options to add common styles to text in the message body.<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-20bbb3eefe91442a889dbb060450946b.png\"><\/td><td>Set paragraph alignment.<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-91cbbe0b4aaa49bf991c5a836f7e8f0d.png\"><\/td><td>Choose a custom font color or highlight text with a background font color.<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-53eb2ad43b4147b5b83b6ff61748f04a.png\"><\/td><td>Make text larger or smaller.<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-f4d02c0ae48341b38d308d8b79d436a4.png\"><\/td><td>Remove any formatting<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-48c7387c587441ff98b5c357b0d4cd4a.png\"><\/td><td>Insert or edit an image<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-16f69c995e6a41a49aa45fc3ab188021.png\"><\/td><td>Insert, edit or remove a link.<\/td><\/tr><tr><td><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-edb79bacdfca4d4fae88998302da5d76.png\"><\/td><td>Insert a table<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Engine Type<\/strong>&nbsp;\u2013 select Base or Smarty:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Base is a simple template that allows you to use variables, pictures, links in the template.<\/li><li>Smarty has all the features of Base templates but also allows you to use conditional formatting in the template (for example, use if\/then constructs)<br>You can learn more about Smarty features here:&nbsp;<a href=\"http:\/\/www.smarty.net\/docsv2\/en\/\" rel=\"noreferrer noopener\" target=\"_blank\">http:\/\/www.smarty.net\/docsv2\/en\/<\/a><\/li><\/ul>\n\n\n\n<p><strong>Context<\/strong>&nbsp;&#8211; input variables that will be filled with values during template processing based on mapping &#8220;variable &#8211; value&#8221; in the flowchart. For example, contact first name, case number, opportunity amount, and so on.<\/p>\n\n\n\n<p>Enter the name of the variable in the field. The variables&#8217; names are depend on the selected Engine Type::<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>For Base there are no restrictions on variable naming.<\/li><li>For Smarty the variable name must contain only the characters [a-z], [A-Z], [0-9] and [_]<\/li><\/ul>\n\n\n\n<p>To add another variable, click the &#8220;+&#8221; button:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-fd59405c24924695bab0c8dd6b05e220.png\" alt=\"\" class=\"wp-image-1387\" width=\"484\" height=\"93\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-fd59405c24924695bab0c8dd6b05e220.png 596w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-fd59405c24924695bab0c8dd6b05e220-300x58.png 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/figure>\n\n\n\n<p>To remove a variable, click the &#8220;-&#8221; button.<\/p>\n\n\n\n<p>To add a variable to the editor text, click the &#8220;play&#8221; button:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-e8a945038713428e8f4a0f2f661021d3.png\" alt=\"\" class=\"wp-image-1384\" width=\"639\" height=\"144\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-e8a945038713428e8f4a0f2f661021d3.png 930w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-e8a945038713428e8f4a0f2f661021d3-300x68.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-e8a945038713428e8f4a0f2f661021d3-768x173.png 768w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/figure>\n\n\n\n<p>Variables in Base Templates are specified in double curly braces: {\u200b\u200b{\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200bvariable}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<\/p>\n\n\n\n<p>Variables in Smarty Templates are specified in curly braces and with the $ symbol: {\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b$variable}\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b\u200b<\/p>\n\n\n\n<p><em>Example of the Template that notifies Customer on Case Status change:<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-d1357052cb164911b423d73c23cfde64.png\" alt=\"\" class=\"wp-image-1383\" width=\"656\" height=\"398\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-d1357052cb164911b423d73c23cfde64.png 942w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-d1357052cb164911b423d73c23cfde64-300x182.png 300w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-d1357052cb164911b423d73c23cfde64-768x466.png 768w\" sizes=\"auto, (max-width: 656px) 100vw, 656px\" \/><\/figure>\n\n\n\n<p><em>Example of mapping \u201cvariable &#8211; value\u201d in the flowchart:<\/em><\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-bcbe0410190d45838bf1d046d33ecb75.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-bcbe0410190d45838bf1d046d33ecb75-1024x478.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><b>How to Use Templates?<\/b><\/p>\n\n\n\n<p>A template is used in Logic Builder to generate HTML text based on a template.<\/p>\n\n\n\n<p>To process templates use the operator&nbsp;<strong><span style=\"color:#ec8f45;\">Get HTML Text From Template<\/span><\/strong>.<\/p>\n\n\n\n<p>&nbsp;Created from a Template HTML can be used as:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>input to&nbsp;<strong><span style=\"color:#ec8f45;\">Set Entity Attributes<\/span><\/strong>&nbsp;for HTML-type fields<\/li><li>passed through REST API<\/li><li>input to text in&nbsp;<strong><span style=\"color:#ec8f45;\">Send Email<\/span><\/strong>&nbsp;operator<\/li><li>input in&nbsp;<em>html<\/em>&nbsp;in&nbsp;<strong><span style=\"color:#ec8f45;\">Get PDF File From HTML<\/span><\/strong><\/li><li>as&nbsp;<em>rich-text message<\/em>&nbsp;in&nbsp;<strong><span style=\"color:#ec8f45;\">Create TLV Record<\/span><\/strong><\/li><\/ul>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Please navigate to the description of each of the operators to find out how to use them.<\/p>\n<\/div>\n\n\n<p><em>Example of the flowchart where the Template is used for composing Email Body:<\/em><\/p>\n\n\n<p><a href=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-507bc30cee7b462fbb2dff819b97545f.png\" rel=\"prettyPhoto\"><img decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-507bc30cee7b462fbb2dff819b97545f-1024x522.png\" alt=\"\" class=\"wp-image-378\"><\/a><\/p>\n\n\n<p><em>Example of processed Template:<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-8af31d678b084fff80cc4e623e37e984-1.png\" alt=\"\" class=\"wp-image-1373\" width=\"683\" height=\"299\" srcset=\"https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-8af31d678b084fff80cc4e623e37e984-1.png 737w, https:\/\/logicbuilder.integroscrm.com\/help\/wp-content\/uploads\/2022\/03\/img-191-8af31d678b084fff80cc4e623e37e984-1-300x131.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p><b>How to Change Template?<\/b><\/p>\n\n\n\n<p>&nbsp;You can make changes to existing Templates &#8211; change the template text, add new variables, remove variables, etc.<\/p>\n\n\n<div style=\"background-color: #ddeaff; border-left: 6px solid #0072b3; padding: 12px;\">\n<p>Note: After adding a new variable to LB Template, you need to map this variable to data in Logic Builder.<\/p>\n<p>If some static text\/image etc was added to the template, there is no need to make any change to the flowchart that processes this template.<\/p>\n<\/div>\n\n\n<p><b>Can I Export and Import LB Templates Records?<\/b><\/p>\n\n\n\n<p>Yes, you can perform standard export and import procedures to move LB Templates from sandbox to production.<\/p>\n\n\n\n<p>The following fields must be imported:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ID &#8211; selected template in&nbsp;<strong><span style=\"color:#ec8f45;\">Get HTML Text From Template<\/span><\/strong>&nbsp;operator is mapped to the LB Templates Sugar record by record ID. Therefore, when transferring templates, it is necessary to transfer the record along with the ID<\/li><li>Name<\/li><li>Context<\/li><li>Template<\/li><\/ul>\n\n\n\n<p>Note: if there are any pictures in the template, make sure that these pictures are available from the new instance.<\/p>\n\n\n\n<p><b>Can I apply to LB Templates records Role restrictions?<\/b><\/p>\n\n\n\n<p>Yes, standard Roles Configuration can be applied to the module LB Templates.<\/p>\n<div style=\"text-align:left\" class=\"yasr-auto-insert-visitor\"><!--Yasr Visitor Votes Shortcode--><div id='yasr_visitor_votes_1496' class='yasr-visitor-votes'><div class=\"yasr-custom-text-vv-before yasr-custom-text-vv-before-1496\">Click to rate this post!<\/div><div id='yasr-vv-second-row-container-f9586b70eab04' \n                                        class='yasr-vv-second-row-container'><div id='yasr-visitor-votes-rater-f9586b70eab04'\n                                      class='yasr-rater-stars-vv'\n                                      data-rater-postid='1496' \n                                      data-rating='0'\n                                      data-rater-starsize='24'\n                                      data-rater-readonly='false'\n                                      data-rater-nonce='fa81b01ba5' \n                                      data-issingular='false'\n                                    ><\/div><div class=\"yasr-vv-stats-text-container\" id=\"yasr-vv-stats-text-container-f9586b70eab04\"><svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" \n                               class=\"yasr-dashicons-visitor-stats\"\n                               data-postid=\"1496\" \n                               id=\"yasr-stats-dashicon-f9586b70eab04\">\n                            <path d=\"M18 18v-16h-4v16h4zM12 18v-11h-4v11h4zM6 18v-8h-4v8h4z\"><\/path>\n                          <\/svg><span id=\"yasr-vv-text-container-f9586b70eab04\" class=\"yasr-vv-text-container\">[Total: <span id=\"yasr-vv-votes-number-container-f9586b70eab04\">0<\/span>  Average: <span id=\"yasr-vv-average-container-f9586b70eab04\">0<\/span>]<\/span><\/div><div id='yasr-vv-loader-f9586b70eab04' class='yasr-vv-container-loader'><\/div><\/div><div id='yasr-vv-bottom-container-f9586b70eab04' class='yasr-vv-bottom-container'><\/div><\/div><!--End Yasr Visitor Votes Shortcode--><\/div>","protected":false},"excerpt":{"rendered":"<p>LB Templates is Logic Builder extension for generating HTML templates. HTML Templates can contain formatted text, images, links, data from Sugar, and more. Templates from LB Templates can be used: To compose a Body of an Email to be sent from Logic Builder To compose PDF documents with Logic Builder To populate the event message &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/logicbuilder.integroscrm.com\/help\/lb-templates-2\/\"> <span class=\"screen-reader-text\">LB Templates<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"tags":[],"class_list":["post-1496","page","type-page","status-publish","hentry"],"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1496","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/comments?post=1496"}],"version-history":[{"count":4,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1496\/revisions"}],"predecessor-version":[{"id":1531,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/pages\/1496\/revisions\/1531"}],"wp:attachment":[{"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/media?parent=1496"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicbuilder.integroscrm.com\/help\/wp-json\/wp\/v2\/tags?post=1496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}