Texts in Interactive Communications texts-in-interactive-communications

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

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.

Overview overview

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.

Create text createtext

  1. Select Forms > Document Fragments.

  2. Select Create > Text.

  3. Specify the following information:

    • 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.
  4. Tap Next.

    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.

  5. Type in the text and use the following options for formatting, conditionalizing, and inserting form data model properties and variables in your text:

  6. Tap Save.

    The text is created. Now you can proceed to using the text as a building block while creating an Interactive Communication.

Edit text edittext

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.

  1. Select Forms > Document Fragments.
  2. Navigate to a text document fragment and select it.
  3. Tap Edit.
  4. Make the required changes. For more information on options in text, see Create text.
  5. Tap Save and then tap Close.

Personalizing a text document fragment using form data model properties formdatamodel

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.

insertfdmelementtext

  • 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.

Creating and using variables in a text document fragment variables

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.

Create variables create-variables

  1. In the left pane, tap Variables.

    The Variables pane appears.

    variablespane

  2. Tap Create.

    Create Variables pane appears.

  3. 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.
  4. Tap Create.

    The variable is created and listed in the Variables pane.

  5. To insert a variable in the text, place the cursor at the appropriate place, select the variable, and tap Add Selected.

    variableinserted

    Variables are highlighted in light blue background color, while form data model properties are highlighted in a brownish color.

  6. Tap Save.

Create rules in text rules

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:

  • Strings
  • Numbers
  • Mathematical expression
  • Dates
  • Associated form data model’s properties
  • Any variables that you may have created in the text

Create rules in text create-rules-in-text

  1. While creating or editing a text, select the text string, paragraph, or content that you want to conditionalize using the rule.

    selectcontentapplyrule

  2. 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:

    • Associated form data model’s properties
    • Any variables that you may have created

    Select the appropriate option to be evaluated.

    ruleeditor

    ruleeditorfdm

    note note
    NOTE
    Collection property is not supported for creating rules to conditionalize and display text.
  3. Select the appropriate operator to evaluate the rule, such as Is Equal To, Contains, and Starts With.

    ruleeditorfdm-1

  4. 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

    Rule to display the selected text if the location of the recipient is US according to the source data of FDM

    • While creating or editing a rule, you can also tap icon_resize (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.
  5. Tap Done.

    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.

    appliedruletext

    On clicking the left handle of the applied rule, you get the options to edit or remove the rule.

Formatting text formatting

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

Font editing toolbar

Alignment toolbar

Alignment toolbar

Listing toolbar

Listing toolbar

Highlight/Emphasize parts of text highlight

To highlight or emphasize parts of text in an editable document fragment, select the text and tap Highlight Color.

textbackgroundcolorapplied-1

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.

textbackgroundcolor-2

Paste formatted text paste

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:

pastetextmsword-2

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.

pastetexteditablemodule-1

NOTE
The formatting of pasted text, however, has some limitations.

Insert special characters in text special

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 ”

specialcharacters-2

Text editor has built in support for 210 special characters. The admin can add support for more/custom special characters by customization.

Searching and replacing text search-features

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.

  1. Open a text document fragment for editing.

  2. Tap Find & Replace.

  3. Enter the text to search in the Find text box and the new text (replacement text) in the Replace text box and tap Replace.

  4. 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.

    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.

recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da