Comparing two jobs on the same policy

Comparing two jobs on the same policy in PolicyCenter

PolicyCenter supports the ability to compare two jobs on the same policy. In the base configuration, this information can be viewed in the user interface from the policy's Policy Transactions screen by selecting the two jobs and clicking the Compare button. The information appears on a screen whose label is "Differences Between Pending Policy Transactions".

As is the case when comparing a job to its base policy, the organization of LOB-specific information shown on this screen is defined in an LOB-specific "DiffTree" XML file. For example, the organization of information for Personal Auto policies is defined in PADiffTree.XML. For more information on DiffTree XML files and how to configure them, see the Configuration Guide.

Comparing two jobs on the same policy in PolicyCenter in Cloud API

To retrieve this information from Cloud API, use the following endpoint:

  • POST /policy/v1/policies/{policyId}/compare-jobs

The request body must identify the ids of the jobs to compare. The syntax for the request body is:

{
  "data": {
    "attributes": {
        "job1": {
            "id": "<id-of-first-job>"
        },
        "job2": {
            "id": "<id-of-second-job>"
        }
    }
  }
}

The /compare-jobs endpoint returns a CompareJobAttributes resource, which details the differences between the two jobs.

Structure of the CompareJobAttributes resource

The CompareJobAttributes resource has the following structure:

  • diffTree
    • Information about the differences between the selected jobs

The diffTree node in the CompareJobAttributes resource has the same structure as the diffTree node in the JobReviewDiffs resource for the /review-diffs endpoint.

  • The diffTree section may have information that is LOB-agnostic (such as "Policy Info" or "Line Coverages") and/or information that is LOB-specific (such as "Vehicles").
  • Every node in the diffTree has a changeType field, which can have one of four values:
    • Add - The node defines an entity not present in the policy that is being added by the job.
    • Remove - The node defines an entity present in the policy that is being removed by the job.
    • Change - The node defines a field whose value is being changed by the job.
    • Window - The node defines an entity whose effective window is being changed.
  • In the base configuration, changes of type Add, Remove, and Change can be made through the user interface and can be done for any type of job. Changes of type Window cannot be made through the user interface (though they can be made using Gosu), and can only be done for certain types of jobs, such as General Liability and Worker's Compensation.