Configure the mapping extension file

The REST endpoint generator automatically adds the following mappers to claim_ext-1.0.mapping.json file:

  • Incident
    • description
    • id
    • lossParty
    • severity
  • Risk unit
    • RUnumber
    • description
    • id
    • policySystemId
  • Damageable
    • (none)

Configuring the incident

This is the syntax for a foreign key from a custom incident to a custom damageable.

"<CustomIncident>": {
  ...
   "<customDamageable>": {
     "path": "<CustomIncident>.<CustomDamageable>",
     "mapper": "#/mappers/<CustomDamagable>"
   },
   ...
},

For example, suppose you has a custom incident named TowableIncident_Ext that has a foreign key field to Towable_Ext. The mapping property for the foreign keys would be:

"TowableIncident_Ext": {
  ...
   "Towable_Ext": {
     "path": "TowableIncident_Ext.Towable_Ext",
     "mapper": "#/mappers/Towable_Ext"
   },
   ...
},

If the incident has additional business fields you wish to make readable, you must add them to the file manually. For most fields, you can find information on how to add them to a schema in Endpoint architecture.

Configuring the risk unit

This is the syntax for a foreign key from a custom risk unit to a custom damageable.

"<CustomRiskUnit>": {
  ...
   "<customDamageable>": {
     "path": "<CustomRiskUnit>.<CustomDamageable>",
     "mapper": "#/mappers/<CustomDamageable>"
   },
   ...
},

For example, suppose you has a custom risk unit named TowableRU_Ext that has a foreign key field to Towable_Ext. The mapping property for the foreign keys would be:

"TowableRU_Ext": {
  ...
   "Towable_Ext": {
     "path": " TowableRU_Ext.Towable_Ext",
     "mapper": "#/mappers/Towable_Ext"
   },
   ...
},

If the risk unit has additional business fields you wish to make readable, you must add them to the file manually. For most fields, you can find information on how to add them to a schema in Endpoint architecture.

Configuring the damageable

All fields in the damageable mapper must be added manually.

Guidewire recommends making the displayName property in the damageable schema readable. The syntax for this is:

"<CustomDamageable>":
  ...
  "properties":
    ...
    "displayName": {
      "path": "<CustomDamageable>.RestV1_SafeDisplayName"
    },

As an example of a damageable mapper, suppose you have a custom damageable named Towable_Ext that has the following readable fields:

  • PolicySystemId
  • PolicyTowable
  • LicensePlate (a business field)
  • TowableRU_Ext (a one-to-one to TowableRU_Ext)

The mapper for the damageable would be:

"Towable_Ext":
  ...
  "properties":
    "displayName": {
      "path": "Towable_Ext.RestV1_SafeDisplayName"
    },
    "policySystemId": {
      "path": "Towable_Ext.PolicySystemId"
    },
    "policyTowable": {
      "path": "Towable_Ext.PolicyTowable"
    },
    "licensePlate": {
      "path": "Towable_Ext.LicensePlate"
    },
    "towableRU_Ext": {
      "path": "Towable_Ext.TowableRU_Ext",
      "mapper": "#/mappers/TowableRU_Ext"
    }