You are here:
InsProductAsyncRatingService:startAsyncRating
Asynchronously calculate product prices based on a list of product IDs.
Class: InsProductAsyncRatingService
Method: startAsyncRating
This service is built for Group Benefit Large Volume Product Rating use cases.
How It Works
- The service takes a list of product IDs.
- The service determines if each product is configured for Census Based Rating or Summary Based Rating (based on the
PricingStrategyType__cfield) . - The service calls the
InsuranceRatingPtc.rateCensusservice to calculate the price for all the products TheInsuranceRatingPtc.rateCensusservice is an asynchronous service so it doesn't return the price immediately. Instead, it returns anasynRequestIdfor each product.
Inputs
| Input | Description |
|---|---|
groupClassIds
|
Optional. A list of group class IDs. The sequence should be the same as |
productCategories
|
Optional. A list of product categories. The sequence should be the same as |
productIds
|
Required. A list of the product IDs. |
userInputs
|
Required. The set of input data the rating procedure uses to get the price of the product. For a Map <String, Object>, the same set of input data is used for all of the products. For a List<Map<String, Object>>, the size of the List should be the same as the size of Selecting coverages with |
Remote Options
| Option | Description |
|---|---|
censusId
|
Required. The ID of the group census. |
effectiveDate
|
The effective date used for rating. Uses the "YYYY-MM-DD HH:MM:SS" format. Default is today's date. |
Input JSON
Here's the sample input JSON:
{
"productIds": ["01tRO000000k6RyYAI", "01t8a000006UC27AAG"],
"userInputs": [{
"DentalCoverage.copay": 100
}, {
"CancerCoverage.deductible": 2000
}],
"groupClassIds": ["0rEDI0000000IEe2AM", "0rEDI0000000IEe4Hr"],
"productCategories": ["Dental", "Medical"]
}Options JSON
Here's the sample options JSON:
{
"censusId": "0rfRO00000009WTYAY",
"effectiveDate": "2023-06-22 00:00:00",
"calculateTaxesAndFees": true
}
Output JSON
Here's the sample output JSON:
{
"asyncRequestId": {
"01tRO000000k6RyYAI": "8zk9f00000Q5jUEHNS",
"01t8a000006UC27AAG": "8zk9f00000Q5jUEYHQ"
}
}
