Creating scheduled items
Identifying a scheduled item's definition
To create a scheduled item, you must know the product definition for the scheduled
item. This includes the names of the ScheduledItemPropertyPattern
values, their data types, and valid choice values, when relevant.
This information is available from the Product Definition API. To retrieve
it, execute a GET /productdefinition/v1/lines/{lineId}/coverages
request. This request returns information about all of the line-level coverages. It
also contains information about coverages with scheduled items.
For example, suppose you are working with the homeowners line in the
previous example. The code for this line is HOPLine
. The following
request retrieves information about the line-level coverages.
GET /productdefinition/v1/lines/HOPLine/coverages
If a coverage includes scheduled items, it has a
scheduledItemProperties
array. For example, the following is a
snippet of the product definition for the Scheduled Personal Property coverage.
{
"attributes": {
"clauseType": "coverage",
"description": "Scheduled Personal Property",
"id": "HOPScheduledPersonalProperty",
"name": "Scheduled Personal Property",
"scheduledItemProperties": [
<ScheduledItemPropertyPatterns are defined here>
]
This array contains every defined ScheduledItemPropertyPattern
for
the coverage. In most cases, the most relevant fields are the id
,
name
, and valueType
.
Non-choice property pattern examples
For example, these are the non-choice ScheduledItemPropertyPattern
values for Scheduled Personal Property. (Fields other than id
,
name
, and valueType
have been omitted.)
{
"attributes": {
"clauseType": "coverage",
"description": "Scheduled Personal Property",
"id": "HOPScheduledPersonalProperty",
"name": "Scheduled Personal Property",
"scheduledItemProperties": [
{
"id": "Description",
"name": "Description",
"valueType": "shorttext"
},
{
"id": "SerialNo",
"name": "Serial No",
"valueType": "shorttext"
},
{
"id": "Appraiser",
"name": "Appraiser",
"valueType": "shorttext"
},
{
"id": "AppraisalInfo",
"name": "Appraisal Information",
"valueType": "shorttext"
},
{
"id": "DateOfAppraisal",
"name": "Date Of Appraisal",
"valueType": "dateonly"
},
{
"id": "HOPScheduledPersonalPropertyItemLimit",
"name": "Limit",
"valueType": "Decimal"
},
{
"id": "HOPScheduledPersonalPropertyItemAppraisedValue",
"name": "Appraised Value",
"valueType": "Decimal"
},
...
]
Choice property pattern examples
If a
ScheduledItemPropertyPattern
value has a
valueType
of choice
, it has an additional
choices
array. Properties are listed in alphabetical order, so
the choice
array appears before the description
,
id
, and valueType
fields. Be aware that when
GETting or POSTing a scheduled item, the valueType
is listed as
choice
. But in the product definition, the
valueType
is listed as Option
.
ScheduledItemPropertyPattern
values for Scheduled
Personal Property. (Fields other than id
, name
, and
valueType
have been omitted.){
"attributes": {
"clauseType": "coverage",
"description": "Scheduled Personal Property",
"id": "HOPScheduledPersonalProperty",
"name": "Scheduled Personal Property",
"scheduledItemProperties": [
{
"choices": [
{
"code": "cameras",
"description": "Cameras"
},
{
"code": "fine_arts",
"description": "Fine Arts"
},
{
"code": "jewelry",
"description": "Jewelry"
},
...
],
"id": "HOPScheduledPersonalPropertyItemType",
"name": "Type",
"valueType": "Option"
},
{
"choices": [
{
"code": "HOPScheduledPersonalPropertyItemDeductible0",
"description": "$0"
},
{
"code": "HOPScheduledPersonalPropertyItemDeductible1000",
"description": "$1,000"
},
{
"code": "HOPScheduledPersonalPropertyItemDeductible5000",
"description": "$5,000"
},
...
],
"id": "HOPScheduledPersonalPropertyItemDeductible",
"name": "Deductible",
"valueType": "Option"
},
{
"choices": [
{
"code": "ReplCost",
"description": "Replacement cost"
},
{
"code": "ACV",
"description": "Actual cash value"
}
],
"id": "HOPScheduledPersonalPropertyItemValuation",
"name": "Valuation Method"
"valueType": "Option"
},
...
]
Creating a scheduled item
When POSTing a scheduled item, each field in the properties
map must
be set to the id
of one of the
ScheduledItemPropertyPattern
values. It must then be followed
by one of the <X>value
fields (such as
stringValue
or choiceValue
) based on the
property's valueType
.
There is no single set of property values that are required for all scheduled items. Both the required and possible values vary based on the structure of the line of business. In some cases, a scheduled item may have no required values.
As an example, suppose PolicyCenter requires the following values for a
HOPScheduledPersonalProperty
scheduled item from the previous
example: Description
,
HOPScheduledPersonalPropertyItemType
. The following request
would create a minimal scheduled item of a 10-carat diamond appraised at $5000 for
policy pc:505.
Command
POST /job/v1/jobs/pc:505/lines/HOPLine/coverages/HOPScheduledPersonalProperty/scheduled-items
Request body
{
"data": {
"attributes": {
"properties": {
"Description": {
"stringValue": "10-carat diamond",
},
"HOPScheduledPersonalPropertyItemType": {
"choiceValue": {
"code": "jewelry"
}
},
"HOPScheduledPersonalPropertyItemAppraisedValue": {
"decimalValue": "5000"
}
}
}
}
}