You are here:
Map Rich Text Tokens in the Omnistudio Data Mappers
Using rich text tokens in the Microsoft Word document templates, you can insert rich text content in the generated .docx and .pdf files. The rich text token format is {{RTB_<richtexttokenname>}}, for example, {{RTB_Header}}.
- Create a Microsoft Word document with rich text tokens.
For more information, see Tokens in Microsoft Word or Microsoft PowerPoint Documents.
You can place rich text tokens anywhere within the document template, such as in a paragraph, table, text box, header, or footer. The rich text field allows you to format text using different fonts, colors, ordered and unordered lists, and hyperlinks. Rich text tokens must be placed in a new line in the document template. Here's an example of a .docx document with rich text tokens.
- Create a Microsoft Word template.
For more information, see Creating a Microsoft Word or Microsoft PowerPoint Template.
- From the 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 that identifies the image to be used in tokens.
- Click
icon next to the Data Extract Data Mapper Bundle Name field to open the Data Mapper Extract in a new browser tab. - Create a Data Mapper Extract. For more information, see Data Mapper Extract Overview.
- Define the Initial Extraction. For more information, see Define the Initial Extraction.
- Define Data Mapper Extract Output. For more information, see Data Mapper Extract Output.
- In the Extract JSON Path field, select the source field for extraction.
- In the Output JSON Path field, specify the desired output path.
- Repeat the steps d and e to add all the rich text tokens source fields.
- In the Preview tab, enter the Salesforce object Id and execute to verify that the response pane displays a JSON structure containing the desired output.
- Go to the Output tab, copy the Current JSON Output, and save to use it later in your Data Mapper Transform. The Current JSON Output pane displays the structure that your output mappings specify.
- Click
icon next to the Mapping Data Mapper Bundle Name field to open the Data Mapper Transform in a new tab. NoteYou can map data on the Transforms tab in one of two ways: If the input and output names match, Use Quick Match to Map Data, else specify each mapping individually. For more information see Data Mapper Transform Data Mappings.
- Create a Data Mapper Transform. For more information, see Data Mapper Transform Overview.
- In the Transform tab, paste the Current JSON Output code that you copied from the Data Mapper Extract into the Input JSON panel.
- 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 fields don’t match automatically, drag fields from the Input column to the Output column.
- Click Save.
- Verify that the Data Mappers pull the information from the sObject and populate the document template.
- In the Document Template Designer, click Test Template.
- In the Object ID box, enter the object ID from where you want to pull the information and then click Next. The document is generated and the tokens are replaced with the rich text content.
You can download the generated document either in .docx, or .pdf format by using the Download Word, or Download PDF button, respectively.








