- 02 Sep 2021
- 3 Minutes to read
- Print
- DarkLight
Formatting Email With Text Merge Steps
- Updated on 02 Sep 2021
- 3 Minutes to read
- Print
- DarkLight
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:
- From the Decisions Studio, navigate to a Designer Folder.
- From the Global Action bar, navigate to All > Other > Merge Text > Create Text; provide a Name, then click CREATE.
- 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 DataThe 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.
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
- From a Designer Folder, select CREATE FLOW, then CREATE a new Flow.
- From the Flow Designer, in the Steps tab, navigate to Text Merges, and attach a [Pick or Create TextMerge] step to the Start step.
- From the Properties of the TextMerge step, under Advanced > Target, then Pick the previously created TextMerge.
- 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 TypeThe Merge Text Type Property allows users to define how their MergeText is presented. The options are as follows:
Plain Presents the MergeText in Plain Text format. HTML Presents the MergeText in HTML format. PDF Displays the MergeText in PDF format. DOC Displays the MergeText in .doc file format. 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.
Still in the Email section, Select From Flow map Result to Body.
Save the Flow, then if desired, close via X.
Example C: Update TextMerge Via Flow
- Navigate to the Designer Folder that contains the previously created TextMerge.
- Locate the TextMerge, right-click it and select Manage > Get Text Merge ID.
- From the ID window, select Copy Text, then Done to copy the ID of the TextMerge.
- From a Designer Folder, select CREATE FLOW and CREATE a new Flow.
- From the Flow Designer, navigate to Steps > Integration > Internal Services > TextMergeEditService, and attach an OpenTextMergeForEditing step step to the Start step.
- From the Properties tab of the Open TextMerge step, Constant map the copied ID into text Id.
- 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.
- 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.
- 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.
- Under Common Properties, define the Data Name. Then, uncheck the Output Merge Text box.
- Navigate to the Data tab, then click Edit Form Data.
- 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.
- Save the Form, then Close the Form Designer.
- From the Properties tab of the Update TextMerge Form, under Properties > Inputs, set Name and Status to Ignore. Then map GetTextFromTextMerge1_Output to Text.
- From Steps > Integration > Internal Services > TextMergeEditService, attach a SaveTextMerge step to the Outcome path of the Update Text Form and the End step.
- From the Properties of the Save Text Merge step, map Text to its respective Input (text), and OpenTextMergeForEditing1_Output to session Id.
- Save the Flow, then if desired, Close the Flow Designer.
Debug
- Open the Send Email Flow in the Flow Designer; from the top Action bar, select Debug, then click FULL.
- After the Flow runs, login into the To Email's Account and verify that the Email was configured as expected.
- Navigate back to Decisions Studio, and open/Debug the Update Flow.
- 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.
- 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.