Formatting Email With Text Merge Steps
  • 02 Sep 2021
  • 3 Minutes to read
  • Dark
    Light
  This documentation version is deprecated, please click here for the latest version.

Formatting Email With Text Merge Steps

  • Dark
    Light

Article summary

Overview

Text Merges allow users the ability to combine preexisting Designer Elements, Text input, and HTML to create dynamic blocks of information. Text Merges can be created both via a Designer (such as Forms, Flows, etc...) or within their own separate Designer via the Decisions Studio

By utilizing a combination of stored Text Merges as well as the abilities of the Flow Designer, Text Merges can be used for various desired applications. One such application involves the use of a Text Merge as a Template for an Email's Body content. The following document discusses and demonstrates how to create a Text Merge from the Decisions Studio, as well as how to create two Flows; one that allows the user to edit the Text Merge, and one that applies the Text Merge to an Email.


Example A: Create Text Merge 

To Create a Text Merge from the Decisions Studio:

  1. From the Decisions Studio, navigate to a Designer Project
  2. From the Global Action bar, navigate to All > Other > Create Text; provide a Name, then click CREATE. 
  3. From the TextMerge Designer, under PROPERTIES > INPUT > Input Data, click ADD. Provide a Name for the Data, leave the Type set to String [Text], then click OK. 
    Additional Information on Input Data
    The Input Data for this example will be used to populate a Name (first name) value for a loan applicant, as well as the approval Status of said loan. Create Input Data for each respective value. 


  4. Using a combination of Text Input and the Data Folder Tree on the left, define the Text Merge. Then, Save and close the Designer via X



Example B:  Send Email Flow 

  1. From a Designer Project, select CREATE FLOW, then CREATE a new Flow
  2. From the Flow Designer, in the Toolbox tab, navigate to DATA > TEXT > TEXT MERGES, and attach a [Pick or Create TextMerge] step to the Start step. 
  3. From the Properties of the TextMerge step, select PICK OR CREATE TEXTMERGE, then PICK the previously created TextMerge
  4. From the Properties of the TextMerge step, map the desired values to Inputs > Name and Inputs > Status. Under SETTINGS, select the desired Merge Text Type
    Additional Information on Merge Text Type
    The Merge Text Type Property allows users to define how their MergeText is presented. The options are as follows:
    PlainPresents the MergeText in Plain Text format.
    HTML Presents the MergeText in HTML format. 
    PDF Displays the MergeText in PDF format. 
    DOCDisplays the MergeText in .doc file format. 

  5. From Toolbox > FAVORITE STEPS, attach a Send Email step to the TextMerge step as well as the End step. From the Properties of the Send Email step under EMAIL, Constant map a value for the From and To address, and the Subject line.

  6. Still in the EMAIL section, Select From Flow map Result to Body

  7. Save the Flow, then if desired,  close via X


Example C: Update TextMerge Via Flow

  1. Navigate to the Designer Project that contains the previously created TextMerge.
  2. Locate the TextMerge, right-click it and select Manage > Get Text Merge ID.
  3. From the ID window, select Copy Text, then DONE to copy the ID of the TextMerge.
  4. From a Designer Project, select CREATE FLOW and CREATE a new Flow
  5. From the Flow Designer, navigate to Toolbox > INTEGRATION > INTERNAL SERVICES > TEXTMERGEEDITSERVICE, and attach an OpenTextMergeForEditing step step to the Start step. 
  6. From the Properties tab of the Open TextMerge step, Constant map the copied ID into text Id.
  7. From the same Toolbox category, connect a GetTextFromTextMerge step to the Done path of the Open Text Merge For Editing step. Then under Properties > INPUTS, Select From Flow map OpenTextMergeForEditing1_Output to session Id
  8. From Toolbox > FAVORITE STEPS, attach a Show Form step to the Get Text From Text Merge step; the Show Form step's Properties, select PICK OR CREATE FORM, then CREATE a new Form
  9. From the Form Designer, search for and add a Compact Merge Editor and a Button component (Labeled "Save") to the Form. Then, select the Compact Merge Editor to navigate to its Properties tab. 
  10. Under COMMON PROPERTIES, define the Data Name. Then, uncheck the Output Merge Text box. 
  11. Click the SETUP INPUT DATA button, then under Define Input Data, click DEFINE. 
  12. From the Input Data window define two separate String [Text] TYPE, Data Definitions to correspond to the previously created Input Data for the TextMerge. Then, Save and close the window. 
  13. Save the Form, then close the Form Designer. 
  14. From the Properties tab of the Update TextMerge Form, under Properties > INPUTS, set Name and Status to Ignore. Then map GetTextFromTextMerge1_Output to Text.
  15. From Toolbox > INTEGRATION > INTERNAL SERVICES > TEXTMERGEEDITSERVICE, attach a SaveTextMerge step to the Outcome path of the Update Text Form and the End step. 
  16. From the Properties of the Save Text Merge step, map Text to its respective INPUT (text), and OpenTextMergeForEditing1_Output to session Id. 
  17. Save the Flow, then if desired, close via X

Debug 

  1. Open the Send Email Flow in the Flow Designer; from the top Action bar, select Debug, then click START DEBUGGING. 
  2. After the Flow runs, login into the To Email's Account and verify that the Email was configured as expected. 
  3. Navigate back to Decisions Studio, and open/Debug the Update Flow. 
  4. Upon reaching the Update Form, select the Edit (pencil) icon and apply any desired edits in the Merge Text Editor window. Then SAVE the TextMerge, and click the Save button. 
  5. After the Flow runs, rerun the Send Email Flow; verify that the received Email contains the new edits that were established in the Merge Text Editor. 



Was this article helpful?