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:
- Data model objects: The data properties use a back end data source.
- Rule based content: Parts of content in a text that appear or get hidden based on a rule. A rule could also be based on form data model properties and variables.
- Variables: In text document fragment, variables are not bound to a backend data source. The agent fills in/selects values in variables or binds the variables to data sources while preparing the Interactive Communication for submitting it to a post process.
- Repeat: You may have dynamic information in your Interactive Communication, such as transactions in a credit card statement, the number of occurrences of which may keep changing with each generated Interactive Communication. Using repeat, you can format and structure such dynamic information. For more information, see Inline condition and repeat.
- Title: (Optional) Enter the title for the text document fragment. Titles need not be unique and can have special characters and non-English characters. Texts are referred by their titles (when available) such as in thumbnails and properties.
- Name: The unique name for the text, within a folder. No two document fragments (text, condition, or list) in any state can exist with the same name in a folder. In the Name field, you can enter only English language characters, numbers, and hyphens. The Name field is automatically populated based on the Title field. The special characters, spaces, numbers, and non-English characters entered in the Title field are replaced with hyphens in the Name field. Although the value in the Title field is automatically copied to the Name, you can edit the value.
- Description: Type a description of the text.
- Form Data Model: Optionally, select the Form Data Model radio button to create the text based on a form data model. When you select Form Data Model radio button, Form Data Model* field appears. Browse and select a form data model. While creating text and condition for an Interactive Communication, ensure that you use the same data model that you intend to use in the Interactive Communication. For more information on Form Data Model, see Data Integration.
- Tags: Optionally, to create custom tag enter value in text field and press Enter. When you save this text, the newly added tags get created.
Type in the text and use the following options for formatting, conditionalizing, and inserting form data model properties and variables in your text:
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.
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:
- A text document fragment is to be used in multiple Interactive Communications where the binding needs to be different for different Interactive Communications.
- Text document fragment does not have a form data model at the time of its creation. You can insert variables and later bind them to the form data model properties at the time of creation of the Interactive Communication.
- You need to bind and retrieve text from a text document fragment. Only those text document fragments can be bound to variables should not have that have no variables within.
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.
Enter the following information and tap Create:
- Name*: Name of the variable.
- Description: Optionally enter a description about the variable.
- Type*: Select a type of the variable: String, Number, Boolean, or Date.
- Allow Specific Values Only: For String and Number variables, you can ensure that the agent chooses from a specific set of values for a placeholder in the Agent UI. To specify the set of values, select this option and then specify comma-separated values that are allowed in the Values* field.
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:
- Mathematical expression
- Associated form data model's properties
- Any variables that you may have created in the text
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:
- Associated form data model's properties
- Any variables that you may have created
Collection property is not supported for creating rules to conditionalize and display text.
- While creating or editing a rule, you can also tap (Resize) to expand the Create Rule/Edit Rule dialog. The expanded, full-window dialog allows you to drag-and-drop form data model properties and variables to construct rules. Tap Resize again to go back to the Create Rule dialog.
- You can also create multiple conditions in a rule.
- You can also create overlapping rules, in which a rule is applied to a part of a content that already has a rule applied.
While creating or editing text, the toolbar changes depending on the type of edits you choose to make: Paragraph, Alignment, or Listing:
To highlight\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:
- Currency symbols such as €,￥, and £
- Mathematical symbols such as ∑, √, ∂, and ^
- Punctuation symbols such as ‟ and ”
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.
If the searched text is found, the text is replaced by the replacement text.
- If another instance of the search text is found, that instance is highlighted in the text document fragment. If you tap Replace again, the highlighted instance is replaced and the cursor moves forward, if a third instance is found.
- If another instance is not found, the Find & Replace dialog displays a message: Reached end of module.