validatePricingSetup(insPricingSetupValidationInputRepresentation)

Validate pricing configuration, including transaction type resolution, procedure plan existence and effective dates, pricing procedure versions, and the context definition.

API Version

68.0

Requires Chatter

No

Signature

public static ConnectApi.InsPricingSetupValidationRepresentation validatePricingSetup(ConnectApi.InsPricingSetupValidationInputRepresentation insPricingSetupValidationInputRepresentation)

Parameters

insPricingSetupValidationInputRepresentation
Type: ConnectApi.InsPricing​Setup​Validation​InputRepresentation
Required. Input that optionally identifies a quote, transaction type, and product IDs to validate for pricing setup configuration.

Usage

Use this method at design time to confirm that pricing infrastructure is correctly configured before quote execution or product rating. Provide an optional quote ID, transaction type, and product IDs. The method validates procedure plans, pricing procedures, effective dates, and context definitions for the specified transaction.

When quoteId or transactionType is provided, quote-level checks confirm that the transaction type is valid and resolvable; that a quote-level procedure plan is defined; that procedure plan effective dates cover the quote’s date range; that the quote-level pricing procedure has an active version for the evaluation date; and that the procedure plan’s context definition is a valid Insurance context.

When productIds is provided, product-level checks confirm that a product-level procedure plan is defined for each product, that the product-level pricing procedure has an active version for the evaluation date, and that the product procedure plan’s context definition is a valid Insurance context.

When pricing setup is valid, isValid is true. When setup fails, isValid is false and errors lists the failures. Examples include:

  • SF-INS-DSAV-00062 — the transaction type isn’t valid or couldn’t be resolved.
  • SF-INS-DSAV-00063 — no quote-level procedure plan is defined for the transaction type.
  • SF-INS-DSAV-00064 — procedure plan effective dates aren’t valid for the request.
  • SF-INS-DSAV-00066 — no product-level procedure plan is defined for a submitted product.
  • SF-INS-DSAV-00067 — the quote-level pricing procedure doesn’t have an active version for the evaluation date.
  • SF-INS-DSAV-00068 — the product-level pricing procedure doesn’t have an active version for the evaluation date.

Example

This sample validates pricing setup from Apex.

ConnectApi.InsPricingSetupValidationInputRepresentation input =
    new ConnectApi.InsPricingSetupValidationInputRepresentation();
input.productIds = new List<String>{ '01txx0000006i3DAAQ' };

ConnectApi.InsPricingSetupValidationRepresentation result =
    ConnectApi.InsuranceDesignAdvisorFamily.validatePricingSetup(input);

System.debug('isValid=' + result.isValid);
System.debug('errors=' + result.errors);