Merge codes

Merge codes are placeholders for text, data, or images in a file that are either entered manually, selected, or brought in automatically from a Customer Relationship Management (CRM) application. Upland Qvidian comes with predefined merge codes. You can add new merge codes in the Administration > Application Data > Merge Code page.

Merge codes are used in the following areas of Upland Qvidian:

  • The Data Entry, Structured Content, Selection Driven Content, and RFP Project pages in a created document.
  • Merge codes can be applied across the entire document, versus
  • The Customization tab in Build Package dialog box in a project.
  • The standard and bulk load Qvidian legacy add-in toolbars for Microsoft Word and PowerPoint.

    Note: For information on installing the legacy Qvidian add-in toolbars, see Legacy add-ins for Microsoft Office .

  • Merge code mapping to custom metadata and Salesforce fields.

Microsoft has a feature similar to Upland Qvidian merge codes called field codes. Field codes are enclosed in curly brackets {}. For additional information on creating and working with field codes in Microsoft Word, visit the Microsoft Support website.

Note: For more information on downloading merge codes directly from the Library, see Download Merge Codes.

Data types

A merge code's data type determines the type of value that can be entered or pulled in for the merge code, how the output of the value is formatted, and the way it will appear to users in created document and projects when added to a Data Entry Screen component.

Merge codes can be created with the following data types:

  • Text: The value can be any combination of alphanumeric characters. Users can either enter text or select an option from the dropdown menu. You must use this value as the data type when creating default or composite merge codes.
  • Date: The value must be whole numbers and will be converted to a date format, as set in International Settings on the Manage tab in created documents. Users can enter the date manually or click a calendar icon to select one from a calendar.
  • Numeric: The value can be any combination of numbers, decimal points, and plus and minus signs. Users can manually enter the value or use arrows to scroll up or down.
  • Currency: The value is a number with up to two decimal places. The user’s default currency symbol is automatically inserted in front of the value. Users can manually enter the value or use arrows to scroll up or down.

    Note: The default currency is set under Culture in the project's properties, or on the Manage > International tab in created documents.

  • Graphic: This code pulls in an image file. Users can select the image from the library or their computer.

Default merge codes

Default merge codes are merge codes with a single value that is controlled by the system administrator or content administrator. Default merge codes do not display on the Data Entry screen. When a default merge code is used in a library content record and that record is copied to the clipboard, downloaded or dropped into a project, the default value will display. Default merge codes must use the Text data type, even if the actual default value is a date, numeric, or currency. The default value does not display on the "Create Merge Code" dialog or on the Merge Codes grid. You can view or edit the default merge code by opening the merge code's properties and clicking Add Dropdown Value.

You may want to use a default merge code if you have a value that is used in multiple pieces of content that change regularly and you do not want to revise the content every time the value changes. For example, if the number of your company's clients frequently changes, you can create and add a default merge code named "NumberClients", and then add the number of clients as the dropdown value. That value will be used in all builds and will display when a content record containing this merge code is copied to the clipboard, downloaded or dropped into a project. If the number of clients changes, you can go into the merge code properties and update the number.

Example of the Merge Code Properties and Drop Down Values dialog box set up for a default merge code

The Merge Code Properties and Drop Down Values dialog box set up for the default merge code in the example above. Click to enlarge.

Composite merge codes

Composite merge codes are placeholders for multiple possible merge codes. When a composite merge code is created, the possible merge codes whose value may replace it are added as dropdown values. Then, the composite merge code is added to content and the merge codes are added to a Data Entry Screen. When the user completes the information in the Data Entry Screen, the first combination of possible merge codes for which the user has provided all values will populate the composite merge code.

You may want to use composite merge codes when:

  • You want to eliminate the need for multiple strings of merge codes in your content.
  • You are bringing in the sender’s information directly from the user record. This would be set in the Related To dropdown in the Merge Code’s properties.
  • You are pulling values from your CRM system. This would be set in the Related To dropdown in the Merge Code’s properties.
  • You would use any of the values individually in different parts of the content. For example, you might use the sender’s full name in the signature block on the cover letter, but only first name elsewhere in a sentence.

Example of a composite merge code

A <<FullName>> merge code could include the following values for a dropdown list:

<<FirstName>> <<MiddleName>> <<LastName>>

<<FirstName>> <<LastName>>

<<LastName>>

Upland Qvidian will then select the first format for which the user has provided all values. If, for example, only the Last Name and First Name values are provided, the second choice in the dropdown is used (i.e. John Smith). The dropdown entries can contain punctuation between the codes (spaces, commas, etc.). For more examples of composite merge codes and the merge codes that can be added as dropdown values with them, see the table below.

Composite merge code Dropdown values
<<clientContactFullName>>

<<clientSalutation>> <<clientContactFirstName>> <<clientContactMiddleName>> <<clientContactLastName>>

<<clientSalutation>> <<clientContactFirstName>> <<clientContactLastName>>

<<clientContactFirstName>> <<clientContactLastName>>

<<clientFullName>>

<<clientContactFirstName>> <<clientContactLastName>>

<<clientContactLastName>>

<<senderFullName>>

<<senderFirstName>> <<senderLastName>>

<<senderLastName>>

<<senderCityStZip>>

<<senderCity>>, <<senderState>> <<senderZip>>

<<senderCity>>, <<senderState>>

<<senderState>> <<senderZip>>

Sentence and list merge codes

Sentence and list merge codes are placeholders for text associated with a Selection Driven Content item. When you create a selection group, the application creates two merge codes based off the group name, <<GroupNameSentence>> and << GroupNameList>>. In each item you add to the group, you can enter text to replace those merge codes. When a user selects an item from the selection list, the sentence or list text associated with the Selection list item they choose replaces the merge code in the document. The sentence merge code displays the sentence text for all the selected items with a comma between them and an and between the last two. The list merge code displays the list text for all the selected items with a return between each.

You do not need to include a content record with the selection item to use Sentence and list merge codes; they may be used on their own.

Sentence and list merge codes will not appear in the list of merge codes you can download from Architecture > Merge Codes, because they are created and managed in the Selection Driven Content component of a document type and are associated with the selection lists within those components. However, they will be available in the Insert Merge Codes dialog box that display when you select Insert Field from your Qvidian Add-in toolbar.

Example of a sentence and list merge code

Your company's proposal includes a cover letter that summarizes the business issues a client may face, and a summary that restates the issues as a benefit of your company's solution. In a Selection Driven Content component in your proposal document type, you add a group to the Selection List called Business Issues. When the group is added, it automatically creates two merge codes named <<BusinessIssuesSentence>> and <<BusinessIssuesList>>. You add an item titled "Lack of Resources" and enter "a lack of resources" in the Sentence Merge Code Text field and "Reducing the need for additional resources" in the List Merge Code Text field.

Then, you use the <<BusinessIssuesSentence>> merge code in a sentence in your cover letter and the list merge code in a list on your summary page as follows:

"Looking forward, you have mentioned several challenges you want us to focus on, including<<BusinessIssuesSentence>>."

"Our solution helps your business by:

  • <<BusinessIssuesList>>"

When the user creates a document, and they select Lack of Resources as a business issue, the sentence and list text you entered for the item populates this sentence in the cover letter and the list in the summary. The cover letter sentence and summary will read as follows:

"Looking forward, you have mentioned several challenges you want us to focus on, including a lack of resources."

"Our solution helps your business by:

  • Reducing the need for additional resources"

Selection Group Properties dialog box Selection Item Properties dialog box

The Selection Group Properties (left) and Selection Item Properties (right) dialog boxes set up as described in the example above. Click to enlarge.

Best practices for naming merge codes

  • Use names that content managers and end users can easily recognize with or without the context of the content. For example: <<ProjectManagerName>> instead of <<InsertNameHere>>.
  • Use only alphanumeric characters and underscores.
  • Avoid spaces directly before or after the brackets, which could result in a mismatch. For example: <<Good>> vs <<Bad >>.
  • Spaces can be used in the name. However, a code without spaces may be more recognizable as a placeholder and will not break when text is wrapped. For example, <<TotalProposedCostOfOwnership>> vs <<Total proposed cost of ownership>>.
  • Dashes can be used. Keep in mind that Microsoft Word can be configured to change the type of dash, em dash (—) or en dash (–), as you type, so you are more likely to experience issues if the dash in your code doesn’t match the dash in the content.