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 Folder
  2. From the Global Action bar, navigate to All > Other > Merge Text > Create Text; provide a Name, then click CREATE. 
  3. From the TextMerge Designer, under PROPERTIES > Input > Input Data, click Add New. 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. 



Example B:  Send Email Flow 

  1. From a Designer Folder, select CREATE FLOW, then CREATE a new Flow
  2. From the Flow Designer, in the Steps tab, navigate to Text Merges, and attach a [Pick or Create TextMerge] step to the Start step. 
  3. From the Properties of the TextMerge step, under Advanced > Target, 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 Steps > 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 Folder 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 Folder, select CREATE FLOW and CREATE a new Flow
  5. From the Flow Designer, navigate to Steps > 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 Steps 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 Steps > 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. Navigate to the Data tab, then click Edit Form Data.
  12. From the Data Definitions window define two separate String [Text] TYPE, Data Definitions to correspond to the previously created Input Data for the TextMerge. Then, 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 Steps > 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 the Flow Designer.  

Debug 

  1. Open the Send Email Flow in the Flow Designer; from the top Action bar, select Debug, then click FULL. 
  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?