---
schema_version: "1"
id: e7a70393de00d870e3bb8472e75485fd294e9017e61f7d8b4d5421e670b67324
title: CreateInsuranceRatingOptions Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 47adf864f945663caeb57168dd921f8ba344588cd39cb5ffc9149bad0f1ad7c1
description: Contains options for creating an insurance rating. Use this class to control pricing execution, configuration rules, and the response data, such as context JSON, product details, rating results, when running a rating operation.Learn more about the constructors that are available with the CreateInsuranceRatingOptions class.Creates an options instance for rating with explicit control over pricing, configuration rules, and which data is returned in the response.Creates an options instance with the default settings for creating an insurance rating.Set the properties in the CreateInsuranceRatingOptions class to create insurance ratings.Indicates whether to run product configuration rules (true) or not (false).Indicates whether to execute pricing for the rating (true) or not (false).Indicates whether to include context as JSON in the response (true) or not (false).Indicates whether to include product details in the response (true) or not (false).Indicates whether to include rating results in the response (true) or not (false).
---
# CreateInsuranceRatingOptions Class

Contains options for creating an insurance rating. Use this class to control pricing execution, configuration rules, and the response data, such as context JSON, product details, rating results, when running a rating operation.

## Namespace

[runtime\_industries\_insurance](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_namespace_runtime_industries_insurance.htm "The runtime_industries_insurance namespace provides Options classes to control optional input parameters for managing insurance operations, such as creating and updating insurance quotes, generating insurance clauses, and running insurance ratings. Use these classes when calling Insurance APIs from Apex to control pricing, configuration rules, qualification rules, and product catalog validation.")

## Usage

Use the CreateInsuranceRatingOptions class when using the [Create Insurance Rating](https://developer.salesforce.com/docs/atlas.en-us.264.0.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_create_insurance_rating.htm) invocable action to create an insurance rating so that you can specify which operations to run and what response data to include.

## Example

Create a CreateInsuranceRatingOptions instance and set properties, then use it (or a serialized map) as ratingOptions when calling the [Create Insurance Rating](https://developer.salesforce.com/docs/atlas.en-us.264.0.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_create_insurance_rating.htm) invocable action from Apex.

// Build rating options for createInsuranceRating
runtime\_industries\_insurance.CreateInsuranceRatingOptions ratingOptions =
    new runtime\_industries\_insurance.CreateInsuranceRatingOptions(
        true,   // executePricing
        true,   // executeConfigurationRules
        false,  // returnContextJSON
        true,   // returnProductDetails
        true    // returnRatingResults
    );
// Pass ratingOptions when invoking the createInsuranceRating action
action.setInvocationParameter('ratingOptions', ratingOptions);

- **[CreateInsuranceRatingOptions Constructors](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_constructors)**  
    Learn more about the constructors that are available with the CreateInsuranceRatingOptions class.
- **[CreateInsuranceRatingOptions Properties](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_properties)**  
    Set the properties in the CreateInsuranceRatingOptions class to create insurance ratings.

## CreateInsuranceRatingOptions Constructors

Learn more about the constructors that are available with the CreateInsuranceRatingOptions class.

The CreateInsuranceRatingOptions class includes these constructors.

- **[CreateInsuranceRatingOptions(executePricing, executeConfigurationRules, returnContextJSON, returnProductDetails, returnRatingResults)](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_ctor)**  
    Creates an options instance for rating with explicit control over pricing, configuration rules, and which data is returned in the response.
- **[CreateInsuranceRatingOptions()](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_ctor_2)**  
    Creates an options instance with the default settings for creating an insurance rating.

### CreateInsuranceRatingOptions(executePricing, executeConfigurationRules, returnContextJSON, returnProductDetails, returnRatingResults)

Creates an options instance for rating with explicit control over pricing, configuration rules, and which data is returned in the response.

#### Signature

public CreateInsuranceRatingOptions(Boolean executePricing, Boolean executeConfigurationRules, Boolean returnContextJSON, Boolean returnProductDetails, Boolean returnRatingResults)

#### Parameters

**executePricing**

- Type: Boolean
- Indicates whether to execute pricing for the rating (true) or not (false). The default value is true.

**executeConfigurationRules**

- Type: Boolean
- Indicates whether to run product configuration rules (true) or not (false). The default value is false.

**returnContextJSON**

- Type: Boolean
- Indicates whether to include context as JSON in the response (true) or not (false). The default value is false.

**returnProductDetails**

- Type: Boolean
- Indicates whether to include product details in the response (true) or not (false). The default value is false.

**returnRatingResults**

- Type: Boolean
- Indicates whether to include rating results in the response (true) or not (false). The default value is false.

### CreateInsuranceRatingOptions()

Creates an options instance with the default settings for creating an insurance rating.

#### Signature

public CreateInsuranceRatingOptions()

## CreateInsuranceRatingOptions Properties

Set the properties in the CreateInsuranceRatingOptions class to create insurance ratings.

The following are properties for CreateInsuranceRatingOptions.

- **[executeConfigurationRules](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_executeConfigurationRules)**  
    Indicates whether to run product configuration rules (true) or not (false).
- **[executePricing](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_executePricing)**  
    Indicates whether to execute pricing for the rating (true) or not (false).
- **[returnContextJSON](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_returnContextJSON)**  
    Indicates whether to include context as JSON in the response (true) or not (false).
- **[returnProductDetails](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_returnProductDetails)**  
    Indicates whether to include product details in the response (true) or not (false).
- **[returnRatingResults](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_class_runtime_industries_insurance_CreateInsuranceRatingOptions.htm#apex_runtime_industries_insurance_CreateInsuranceRatingOptions_returnRatingResults)**  
    Indicates whether to include rating results in the response (true) or not (false).

### executeConfigurationRules

Indicates whether to run product configuration rules (true) or not (false).

#### Signature

public Boolean executeConfigurationRules {get; set;}

#### Property Value

Type: Boolean

### executePricing

Indicates whether to execute pricing for the rating (true) or not (false).

#### Signature

public Boolean executePricing {get; set;}

#### Property Value

Type: Boolean

### returnContextJSON

Indicates whether to include context as JSON in the response (true) or not (false).

#### Signature

public Boolean returnContextJSON {get; set;}

#### Property Value

Type: Boolean

### returnProductDetails

Indicates whether to include product details in the response (true) or not (false).

#### Signature

public Boolean returnProductDetails {get; set;}

#### Property Value

Type: Boolean

### returnRatingResults

Indicates whether to include rating results in the response (true) or not (false).

#### Signature

public Boolean returnRatingResults {get; set;}

#### Property Value

Type: Boolean