Creating and editing text document fragments to be used in Interactive Communications - text is one of the four types of document fragments used to build Interactive Communications. The other three are conditions, lists, and layout fragments.
A text document fragment consists of one or more paragraphs of text. A paragraph can be static or dynamic. A dynamic paragraph may contain form data model properties and variables. You can also apply rules and repeat within a text document fragment. For example, the customer name in a salutation could be a Form Data Model (FDM) property with its value made available at runtime. By changing these values, the same Interactive Communication can be used to prepare Interactive Communication for different customers using the Agent UI.
The text document fragment in Interactive Communication supports the following type of dynamic data:
Forms > Document Fragments.
Create > Text.
Specify the following information:
Create Text page appears. If you have chosen to create a form data model-based text, the form data model properties appear in the left pane.
Type in the text and use the following options for formatting, conditionalizing, and inserting form data model properties and variables in your text:
The text is created. Now you can proceed to using the text as a building block while creating an Interactive Communication.
You can edit an existing text document fragment using the following steps. You can also choose to edit a text document fragment from within an Interactive Communication editor.
Forms> Document Fragments.
You can personalize text document fragments by inserting the form data model properties. By inserting form data model properties in text, you can fetch and populate recipient-specific data from the associated data source while previewing an Interactive Communication. For more information on form data model, see AEM Forms Data Integration.
If you have specified a form data model while creating a text, the properties in the form data model appear in the left pane of the text editor. The specified form data model should be same for the text document fragment as well as the Interactive Communication that includes it.
To insert an FDM property into text, place the cursor where you want to insert the property, then select the
[A] property in the left pane by tapping on it, and tap
[B] Add Selected. You can also just double-tap the property to insert it at the
[C] cursor position. Form data model properties are highlighted in a brownish background color.
To allow the agents to edit an FDM property’s value in the agent UI while Prepare and send Interactive Communication using the Agent UI, tap the
[D] lock icon for that property and ensure it is in an unlocked state. The default state of the property is locked and an agent cannot edit the property in the Agent UI.
You can also use form data model properties to construct rules for displaying or hiding parts of content. For more information, see Create rules in text.
Variables are placeholders that can be bound while creating an Interactive Communication. Variables can be bound to a form data model property or text fragment. Variables can also be left for the agent to fill.
You can use variables instead of form data model properties when:
While creating or editing a text document fragment, you can create and insert variables. The variables you create appear in the Data tab of the Agent UI. The agent specifies the values for the variables while Prepare and send Interactive Communication using the Agent UI.
In the left pane, tap Variables.
The Variables pane appears.
Create Variables pane appears.
Enter the following information and tap Create:
The variable is created and listed in the Variables pane.
To insert a variable in the text, place the cursor at the appropriate place, select the variable, and tap Add Selected.
Variables are highlighted in light blue background color, while form data model properties are highlighted in a brownish color.
Using rule editor in a text, you can create rules to display or hide strings of text or pieces of content based on preset conditions. These conditions can be constructed based on:
While creating or editing a text, select the text string, paragraph, or content that you want to conditionalize using the rule.
Tap Create Rule.
The Create Rule dialog appears. In addition to string, number, mathematical expression, and date, the following are also available in the Rule Editor for creating statements of the rules:
Select the appropriate option to be evaluated.
Collection property is not supported for creating rules to conditionalize and display text.
Select the appropriate operator to evaluate the rule, such as Is Equal To, Contains, and Starts With.
Insert the evaluating expression, value, data model property, or variable.
Rule to display the selected text if the location of the recipient is US according to the source data of FDM
The rule gets applied. The text or content to which the rule is applied is highlighted in green. When you hover over the left handle of the highlight, the applied rule appears.
On clicking the left handle of the applied rule, you get the options to edit or remove the rule.
While creating or editing text, the toolbar changes depending on the type of edits you choose to make: Paragraph, Alignment, or Listing:
Select type of toolbar: Paragraph, Alignment, or Listing
Font editing toolbar
To highlight or emphasize parts of text in an editable document fragment, select the text and tap Highlight Color.
You can either directly tap a basic color
[A] present in the Basic Colors palette or tap Select after using the slider
[B] to choose the appropriate shade of the color.
Optionally, you can also go to the Advanced tab to select the appropriate Hue, Lightness, and Saturation
[C] to create the precise color and then tap Select
[D] to apply the color to highlight the text.
To reuse one of more paragraphs of text that exist in another application, such as from Microsoft® Word or HTML pages, copy and paste the text into the text editor. The formatting of the copied text is retained in the text editor.
You can copy and paste one or more paragraphs of text in an editable text document fragment. For example, you may have an Microsoft® Word document with a bulleted list of acceptable proofs of residence such a following:
You can directly copy and paste the text from the Microsoft® Word document to an editable text document fragment. The formatting such as bulleted list, font, and text color is retained in the text document fragment.
The formatting of pasted text, however, has some limitations.
If required, insert special characters in the document fragment. For example, you can use the Special Characters palette to insert:
Text editor has built in support for 210 special characters. The admin can add support for more/custom special characters by customization.
When working with text document fragments containing a large amount of text, you need to search for a specific text string. You may also need to replace a specific string of text with an alternative string.
The Find and Replace feature allows you to search for (and replace) any string of text in a text document fragment. The feature also includes a powerful regular expression search.
Open a text document fragment for editing.
Tap Find & Replace.
Enter the text to search in the Find text box and the new text (replacement text) in the Replace text box and tap Replace.
If the searched text is found, the text is replaced by the replacement text.
You can also tap Replace all to replace all the matches in a one go.
Find & Replace also includes a powerful regular expression search. To use regex in your search, select Reg ex and then tap Find or Replace.