---
schema_version: "1"
id: b47bc7b62dfe37a415f18fa56aaa22f4a9bf81779b2711150b3c049d05fe851c
title: Map Hyperlink Tokens in Omnistudio Data Mapper for Omnistudio Document Generation
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/doc_gen_map_hyperlink_tokens_in_the_dataraptors.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.doc_gen_map_hyperlink_tokens_in_the_dataraptors.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 71c9d618f408ea5f6aa4ba5b26d81945c9d10180c30902eed0d5c25dce68a270
description: Use hyperlink tokens in Microsoft Word or Microsoft PowerPoint document templates to insert dynamic URLs in the generated DOCX and PDF files. The hyperlink token must start with HYP_. The token format is {{HYP_<hyperlinktokenname>}}, for example, {{HYP_Salesforce Website}}.
products:
  - Omnistudio Doc Gen
release: "264"
---
# Map Hyperlink Tokens in Omnistudio Data Mapper for Omnistudio Document Generation

Use hyperlink tokens in Microsoft Word or Microsoft PowerPoint document templates to insert dynamic URLs in the generated DOCX and PDF files. The hyperlink token must start with HYP\_. The token format is {{HYP\_<hyperlinktokenname>}}, for example, {{HYP\_Salesforce Website}}.

You can define a text for the URL in the Data Mapper, for example, [Salesforce](https://www.salesforce.com). If you don't provide a text for the hyperlink, the URL appears in blue and is underlined in the generated document, for example, [https://www.salesforce.com](https://www.salesforce.com). The font and the style of the hyperlink token in the document override the default hyperlink font and style in the generated document. Hyperlink tokens support URL formats such as https and http.

1. Create a Microsoft Word document with hyperlink tokens.
    
    Place link tokens anywhere in the document template, such as in paragraphs, tables, and text boxes. Use a token in a header or a footer or within a repeating content section to pass an array of hyperlinks. Here's an example of a DOCX document with hyperlink tokens.
    
    ![The document template has the hyperlink tokens.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_2.png)
2. Create a Microsoft Word template.
    1. In Token Mapping Method, select **Data Mapper**.
    2. 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.
    3. 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.
3. To open the Data Mapper Extract on a new browser tab,click the![Link icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/dataraptor_icon.png) icon next to the Data Extract Data Mapper Bundle Name field.
    1. Create a Data Mapper Extract.
        
        See [Data Mapper Extract Overview](https://help.salesforce.com/s/articleview?id=xcloud.os_dataraptor_extract_overview.htm&type=5).
    2. Define the Initial Extraction.
        
        See [Define the Initial Extraction](https://help.salesforce.com/s/articleview?id=xcloud.os_define_the_initial_extraction.htm&type=5).
        
        ![Extract tab of the Data Mapper Extract where we specified contract as the object to be queried and Id as the filter.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_3.png)
    3. Define Data Mapper Extract Output.
        
        See [Data Mapper Extract Output](https://help.salesforce.com/s/articleview?id=xcloud.os_dataraptor_extract_output.htm&type=5).
        
        The Current JSON Output pane shows the structure that your output mappings specify.
    4. In Extract JSON Path, select the source field for extraction.
    5. In Output JSON Path, specify the output path.
        
        ![Data mapping from the extraction step JSON to the output JSON on the Output tab](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_4.png)
    6. Add all hyperlink token source fields.
    7. On the PREVIEW tab, enter the Salesforce object ID and click Execute to confirm that the response pane shows a JSON structure containing the desired output.
        
        ![JSON structure containing the desired output. It shows the two hyperlinks https://weather.com and https://en.wikipedia.org/wiki/ we added.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_5.png)
    8. On the OUTPUT tab, copy the Current JSON Output, and save it to use it later in your Data Mapper Transform.
4. To open the Data Mapper Transform on a new tab, click the ![Link icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/dataraptor_icon.png) icon next to the Mapping Data Mapper Bundle Name field.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/images/icon_note.png)
    
    Note
    
    Map 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](https://help.salesforce.com/s/articleview?id=xcloud.os_use_quick_match_to_map_data.htm&type=5). Else, specify each mapping individually. See [Data Mapper Transform Data Mappings](https://help.salesforce.com/s/articleview?id=xcloud.os_dataraptor_transform_data_mappings.htm&type=5).
    
    1. Create a Data Mapper Transform.
        
        See [Data Mapper Transform Overview](https://help.salesforce.com/s/articleview?id=xcloud.os_dataraptor_transform_overview.htm&type=5).
    2. On the Transform tab, in the Input JSON panel, paste the Current JSON Output code that you copied from the Data Mapper Extract.
    3. 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.
        
        ![To populate the MATCHED MAPPINGS column from input mappings and output mappings columns, select Auto Match.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_6.png)
    4. To match the input and output fields, click **Auto Match**.
        
        If the fields don't match automatically, drag fields from the Input column to the Output column.
        
        ![The MATCHED MAPPINGS column is populated when the fields from the Input column and the Output column are matched. I](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_7.png)
    5. Save your changes.
    6. Additionally, you can define formulas in a Data Mapper to add text for the hyperlinks or to add text and hyperlinks. When you define a formula, you map its output to the output JSON (for extracts and transforms).
        
        See [Use Formulas in Data Mappers](https://help.salesforce.com/s/articleview?id=xcloud.os_use_formulas_in_dataraptors.htm&type=5)​.
        
        ![The defined formulas in a Data Mapper. For example, the Formula field has Weather Forecast and the Formula Result Path field has weather link.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_8.png)
    7. Click **Quick Match**.
        
        The fields in the INPUT MAPPINGS column come from the data you defined on the FORMULAS tab. The fields in the OUTPUT MAPPINGS column come from the tokens in the document template.
        
        ![The INPUT MAPPINGS and OUTPUT MAPPINGS columns.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_9.png)
    8. If the fields don't match automatically, drag fields from the INPUT MAPPINGS column to the OUTPUT MAPPINGS column.
        
        ![Drag fields on the matched mappings columns to match the fields manually.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_10.png)
    9. Save your changes.
        
        ![The Matched Mapping column is populated when the fields from the input column and the output column are matched.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_13.png)
    10. On the PREVIEW tab, verify the hyperlink tokens.
        
        Based on the mapping that you provided, notice that for some hyperlink tokens, only the URL is listed, and for some hyperlink tokens, both the URL and text are available.
        
        ![The PREVIEW tab where the mapping you provided is executed.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-document_generation-264-0-0-production-enus/f76d5573-56ce-4576-b4b2-7a4f1f2e622b/resources-product/images/doc_gen/clm238__dynamihyperlink_12.png)