Configuring data mapping

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 4 minutes to read
  • Configure the work order templates to fetch data from a source table to populate fields in a work order form while creating a work order. The source table can be case, incident, change, or others depending on the source of origin for a work order.

    You first create a table map to specify the fields to be copied from the source table to the work order table and then link the table mapping to a work order template. The extension points in template management, enables your work order template to process the followings configuration. For more information, see Extension points in Field Service Management.

    Create field mapping from a source table to a work order

    Create a table map to configure the fields that are copied from a source table to the work order fields. The source of a work order can be a case, change, incident, or others.

    Before you begin

    You must activate the Template Management for Field Service plugin (com.snc.fsm_template_management).

    Role required: admin

    About this task

    Table mapping ensures that when a work order is created from its source, the information from the source table is copied to the appropriate target fields in the work order.

    Procedure

    1. Navigate to All > Field Service > Template Management > Table Mapping.
    2. Click New.
    3. On the form, fill in the fields.
      Table 1. CSM Table Map form
      Fields Description
      Mapping Name The table map name.
      API Name The API for this table map.

      This field is automatically set.

      Source Table The source table for the map. For example,case, incident, change, or more.
      Active Option to enable the mapping from the source to the target tables.
      Application Read only. The application for this table map.

      This field is automatically set.

      Advanced Field Mapping Option to enable the advanced field mapping.
      Target Table The target table for the map. For example, wm_order.
      Use Advanced Condition Option to enable the advanced condition mapping, which uses a script.

      If enabled, add a script in the Advanced Condition field.

      Advanced Condition The script to use if the Use Advanced Condition field is enabled.
      Conditions Use the condition builder to select the conditions that apply to the table map.
      Order Order of priority for processing multiple matching map definitions simultaneously to resolve dependencies.
      • If there is only one matching table map, the system uses that map.
      • If there are multiple matching table maps with the same order, the system uses the map with the older created date.
      • If there are multiple matching table maps with different orders, the system uses the map with the highest order.
      Advanced Field Mapping Option to map fields using advanced scripts.
      Note:
      • If the same source or target field is configured in both the basic and advanced field mappings, the advanced field mapping overrides the basic field mapping.
      • If the fields configured in the basic and advanced field mapping are different, the field configurations in the advanced field mapping are appended to the field configurations in the basic field mapping.

      This field is available only when the method of mapping is advanced and Advanced Field Mapping option is selected.

    4. Click Submit.
      The table map is created by mapping the selected source table to the work order table.
    5. Create field mapping to copy information from the source field to an appropriate field in the work order.
      1. In the Basic Field Mapping related list, select New.
      2. On the form, fill in the fields.
        Table 2. CSM Field Map form
        Field Description
        Table Map The table map name that is used for mapping fields.

        This field is automatically set.

        Source Table The source table for the map.

        This field is available only when the method of mapping is basic and the Advanced option is not selected.

        Source Field Column on the source table for field mapping.

        This field is available only when the method of mapping is basic and the Advanced option is not selected.

        Application The application for this field map.

        This field is automatically set.

        Target Table The target table for the map. For example, wm_order.

        This field is automatically set.

        Target Field Columns on the work order table that you want to populate with the mapped source field value.
        Order Order of priority for processing mapped fields.
        Active Option to enable the mapping of information from the source field to the work order field.
        Advanced Option to map fields using advanced scripts.
        Note:
        • If the same source or target field is configured in both the basic and advanced field mappings, the advanced field mapping overrides the basic field mapping.
        • If the fields configured in the basic and advanced field mapping are different, the field configurations in the advanced field mapping are appended to the field configurations in the basic field mapping.
      3. Click Submit.
    6. Optional: To map more field, repeat step 5.

    Result

    The source and target tables are mapped and ready to copy information from the source field to an appropriate field in the work order.

    Enable work order template to fetch data from the source table

    Enable work order template to identify the source of work order and then map data from that source table to the work order fields. This can be achieved by associating a table map with the work order template.

    Before you begin

    Role required: admin

    Procedure

    1. Navigate to All > Field Service > Template Management > Attribute Mapping.
    2. Click New.
    3. On the form, fill in the fields.
      Table 3. Template Attribute Mapping form
      Field Description
      Table map Name of the mapping stored in the CSM table map.
      Order model Name of the work order template for which you want to use the table mapping configurations.
    4. Click Submit.

    Result

    The work order template is enabled to copy data from the source table to the corresponding work order fields based on the associated table mapping. You can find this newly created attribute mapping in the Template Attribute Mapping related list in the work order template form.