Add and configure metadata for fields, variables, and variables sets in a contract document

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 3 minutes to read
  • As a contract configurator, add and configure metadata for fields, variable, and variable sets to pre-fill the information in the contract document.

    Before you begin

    The Microsoft Word add-in for ServiceNow Contracts must have been configured. For more information, see Configure the Microsoft Word add-in for ServiceNow Contracts.

    A contract template must exist that is active and is in the Draft or Editing state. For more information, see Create a contract template to contain content controls.

    Role required: sn_cm_core.contract_config and canvas_user

    About this task

    The metadata added for fields, variable, and variable sets act as placeholders for values that will be used in the contract document.
    • The metadata of type Field mapping gets its value from the table the contract template is associated with.
    • The metadata of type Variables gets its value from the record producer

    Procedure

    1. Open the document in which you want to mark the content controls in Microsoft Word.
    2. From the Microsoft Word ribbon, select the ServiceNow Contracts add-in.
    3. In the login screen enter the credentials of the ServiceNow instance from which you downloaded the manifest file.
    4. On the add-in screen in the Templates tab, select the contract template to which you want to add the metadata.
      Only templates that have been created in the global application scope are visible.
    5. In the Microsoft Word document, place the cursor where you want to add the metadata.
    6. In the Metadata tab, select Create metadata mapping.
    7. On the Create mapping form in the Type field, select the type of metadata you want to add, either field mapping or variables.
      Type of metadataFields available
      Field mapping
      • Mapping field- Fields of the table to which the contract template is associated.
      • Field Name- The field is automatically set to the value of the Mapping Field. You can also modify the value.
      Variables
      • Record producer- The record producer from which you want to add the variable. For example, if you want to add a variable from a contract request for a non-disclosure agreement, select the record producer for a non-disclosure agreement.
      • Variable- The variable of the record producer that you want to add.
      • Variable set row- The row value of the variable set. The field is displayed only when the selected value in Variable is a set of values.

        For example, the Signatory variable is a set of variables for Title, Name, and email address. You can visualize this data set in rows and columns.

        Signatory variables

        If you wanted to map the variable to Beth Anglin, you would enter Row2 as the value in the Variable set row field.

      • Field Name- This field is automatically populated depending on the values for Variable and Variable set row. You can also modify the value. The maximum character limit for the field name is 200.
        Note:

        Validation errors might occur for the following reasons:

        • The field name is not unique.
        • You have mapped metadata to a field that has already been mapped.
    8. Select Create.
      • The metadata is added and displayed as a tile with the field name as the title.

        Metadata added using the add-in

      • The metadata is synced to the ServiceNow instance.
      Note:

      If you have included the sys_id variable, you need to adjust this script to display it correctly. For more information, see Display the sys_id display value in generated contract documents.

    9. Optional: Add the metadata to other locations in the document or the header or footer of the Word document by selecting the tile and moving it to the desired location.
    10. Optional: View the metadata by logging in to your ServiceNow instance and navigating to the Template Mappings related list of the contract template.