Configuring Cloud API PolicyContactRole entities for Cloud Retrofit

This topic only applies to PolicyCenter.

When you use the cloud retrofit with APD App process, you need to complete additional steps for policy contract role entities that are attached to the policy line.
  • In the template configuration, define policy contact role entities that are attached to the policy line as a coverable if the entity has child entities. Define policy contact role entities that are attached to the policy line as an exposure if the entity has no child entities. For more information, see Cloud API template gen config YAML files.
  • If two policy contact role entities share a child entity and that shared child entity is also a coverable or an exposure, complete the following additional steps:
    • In the template configuration, use the childTypeName property to provide a unique name for each field. For more information, see The types property fields.
    • In the codegen configuration, use the collectionUrlPart property to generate endpoints that share the collection uri part but have different parent uri parts. For more information, see Cloud API codegen type-level overrides.
  • If policy contact role fields are synced with account contact role fields, complete additional steps to ensure that the product template and associated endpoints generate as expected. See Handling fields that sync to AccountContactRole
Note: These steps need to be performed in addition to the steps mentioned in the Cloud API Cloud Retrofit with APD App process.

Handling fields that sync to AccountContactRole

PolicyContactRole entities can have fields that sync to their associated AccountContactRole. In this case, you need to complete additional configuration to ensure that the product template and associated endpoints generate as expected during the cloud retrofit with APD App process.

PolicyContactRole entities can have fields that sync to their associated AccountContactRole. In this case, you need to complete additional configuration to ensure that the product template and associated endpoints generate as expected during the cloud retrofit with APD App process.

For PolicyContactRole entity fields that sync to the AccountContactRole, an "Internal" suffix is often added on the entity property. The "Internal" suffix indicates that Gosu helper classes handle the AccountContactRole syncing process, and that Gosu setter and getter methods manage the retrieval and updates to the synced data.

For policy contact role fields that are synced to account contact role fields, complete the following steps during the cloud retrofit with APD app process:
  1. Configure the internal field name to appear in the product template with the name of the field that it synchronizes with. See Step 1: Expose and map internal fields to synced field name in product.
  2. Configure the code generation file to map the data from the synced field back to the internal field name. See Step 2: Map synced field data back to the internal field.
Note: These steps need to be performed in addition to the steps mentioned in the Cloud API Cloud Retrofit with APD App process.

Step 1: Expose and map internal fields to synced field name in product

In the template_gen_config.lob_prefix.yaml file, complete the following for each PolicyContactRole entity field that syncs with an AccountContactRole entity field:

  1. Configure the fieldName property with the name you want to give the field in the APD product. For example, you can remove the "Internal" suffix from the entity field name.
  2. Set the ignored property to false.
For more information on the fields you need to configure, see The types property fields.
For example, PolicyDriver entity is a policy contact role entity with three internal fields that are synced to fields in the account contact role entity and each internal field includes a fieldName and ignored property setting:
PolicyDriver:
    handling: exposure
    fields:
      ExcludedInternal:
        fieldName: Excluded
        ignored: false
      LicenseNumberInternal:
        fieldName: LicenseNumber
        ignored: false
      LicenseStateInternal:
        fieldName: LicenseState
        ignored: false

Step 2: Map synced field data back to the internal field

In the lob_prefix_codegen_config_ext-1.0.yaml file, configure the generated code to use the appropriate Gosu getter and setter methods for the "Internal" suffixed PolicyContactRole field.

Complete the following steps for each PolicyContactRole entity field that syncs with an AccountContactRole entity field:
  1. Configure the getterProperty to the AccountContactRole field or the name that matches the Gosu getter method.
  2. Configure the nameOverride to be the PolicyContactRole field with the "Internal" suffix.
  3. Configure the schemaPropertyName to the schema property name of the AccountContactRole field.
  4. Configure the setterProperty to the field name of the AccountContactRole field or the name that matches the Gosu setter method.
For more information on the fields you need to configure, see Cloud API codegen field-level overrides.
For example, PAPolicyDriver entity is a policy contact role entity with three fields that are synced to fields in the account contact role entity. Map the data provided in the Excluded field, LicenseNumber field and LicenseState field to their associated PolicyContactRole fields by configuring the getterProperty, nameOverride, schemaPropertyName, and setterProperty properties.
PAPolicyDriver:
    fields:
      Excluded:
        mapperHandling:
          getterProperty: Excluded
        nameOverride: ExcludedInternal
        nullable: false
        schemaHandling:
          schemaPropertyName: excluded
        updaterHandling:
          setterProperty: Excluded
      LicenseNumber:
        mapperHandling:
          getterProperty: LicenseNumber
        nameOverride: LicenseNumberInternal
        schemaHandling:
          schemaPropertyName: licenseNumber
        updaterHandling:
          setterProperty: LicenseNumber
      LicenseState:
        mapperHandling:
          getterProperty: LicenseState
        nameOverride: LicenseStateInternal
        schemaHandling:
          schemaPropertyName: licenseState
        updaterHandling:
          setterProperty: LicenseState