You are here:
Map Rich Text Tokens in Omnistudio Data Mapper for Omnistudio Document Generation
Use rich text tokens in Microsoft Word document templates, to insert rich text content in the generated DOCXand PDF files. The rich text token format is {{RTB_<richtexttokenname>}}, for example, {{RTB_Header}}.
- Create a Microsoft Word document with rich text tokens.
Place rich text tokens anywhere in the document template, such as in a paragraph, table, text box, header, or footer. In the rich text field, you can format text by using different fonts, colors, ordered and unordered lists, and hyperlinks. Place the rich text tokens on a new line in the document template. Here's an example of a DOCX document with rich text tokens.
- Create a Microsoft Word template.
- In Token Mapping Method, select Data Mapper.
- Enter a mapping Data Mapper bundle name.
The Data Mapper Transform maps the field with the ID to the token in the document template. The Data Mapper Transform then transforms the tokens with actual data in the document.
- Enter a data extract Data Mapper bundle name.
The Data Mapper Extract retrieves the field with the ID of the image to be used in tokens.
-
To open the Data Mapper Extract on a new browser tab, click the
icon next to the Data Extract Data Mapper Bundle Name field.
- Create a Data Mapper Extract.
- Define the Initial Extraction.
- Define Data Mapper Extract Output.
- In EXTRACT JSON PATH, select the source field for extraction.
- In OUTPUT JSON PATH, specify the output path.
- Add all rich text tokens source fields.
- On the PREVIEW tab, enter the Salesforce object ID and click Execute to verify that the response pane shows a JSON structure containing the desired output.
-
On the OUTPUT tab, copy the Current JSON Output, and save it to use it
later in your Data Mapper Transform.
The Current JSON Output pane shows the structure that your output mappings specify.
-
Click the
icon next to the Mapping Data Mapper Bundle Name field to open the Data
Mapper Transform on a new tab.
NoteMap data on the Transforms tab in one of these ways: If the input and output names match, Use Quick Match to Map Data. See Use Quick Match to Map Data. Else, specify each mapping individually. See, Data Mapper Transform Data Mappings.
- Create a Data Mapper Transform.
- On the Transform tab, in the Input JSON panel, paste the Current JSON Output code that you copied from the Data Mapper Extract.
-
Click Quick Match.
The fields in the Input Mappings column come from the JSON code (Current JSON Output of the extractor). The fields in the Output Mappings column come from the tokens in the document template.
-
Click Auto Match to match the input and output
fields.
If the fields don't match automatically, drag fields from the Input column to the Output column.
- Save your changes.

