Validate CML Model (POST)

Validate the active CML (Constraint Markup Language) model for the specified insurance products and related records. Returns validation status for each specified record along with resolution guidance when the CML configuration is incomplete or inconsistent.

Use this resource at design time to verify CML model integrity for Digital Insurance products. Provide a required list of product IDs and optional lists of product surcharge, insurance product clause, and underwriting rule IDs. The API checks that an active CML model exists for each product and that each related record’s product path or rule key is correctly declared in the active CML.

Validations include confirming that an active constraint expression set is associated with each root product; that surcharge and clause product paths are present in the CML association when no rule key is set; that rule keys for surcharges, clauses, and underwriting rules are declared in an active CML body; and that each referenced surcharge, clause, and underwriting rule record exists. An underwriting rule with a blank rule key is treated as a BRE-based rule and marked valid with an informational instruction.

When every record passes validation, isValid is true. When one or more records fail, isValid is false and results lists each record with its outcome. Per-record failures are returned in the response body with HTTP status 200. Examples include:

  • SF-INS-DSAV-00034 — no active CML model is associated with the product.
  • SF-INS-DSAV-00035 — the record’s product path is empty.
  • SF-INS-DSAV-00036 — one or more products in the product path aren’t referenced by the active CML model.
  • SF-INS-DSAV-00037 — the specified record wasn’t found.
  • SF-INS-DSAV-00039 — the record’s rule key isn’t declared in any active CML model.

Top-level errors are returned in errors when the request can’t be validated per record. A missing or empty productIds list returns SF-INS-DSAV-00033 with HTTP status 400. Insufficient access, or Design Advisor not enabled for the org, returns HTTP status 403. An unexpected failure returns HTTP status 500.

Resource 

1/connect/insurance/design-advisor/cml-model-validation

Resource Example 

Replace {yourInstance} with the My Domain name of your Salesforce org.

1https://{yourInstance}.salesforce.com/services/data/v68.0/connect/insurance/design-advisor/cml-model-validation

Available Version 

68.0

HTTP Methods 

POST

Request Body for POST 

JSON Example 

1{
2  "productIds": ["01txx0000006iPnAAI"],
3  "productSurchargeIds": ["0nSxx0000001DDDAAI"],
4  "productClauseIds": ["0nPxx0000001EEEAAI"],
5  "underwritingRuleIds": ["0nUxx0000001FFFAAI"]
6}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
productClauseIdsString[]List of insurance product clause IDs to validate against the active CML model identified by productIds.Optional68.0
productIdsString[]List of root product IDs to be validated. For each ID, the API verifies that the product has an active CML model associated with it.Required68.0
productSurchargeIdsString[]List of product surcharge IDs to validate against the active CML model that’s identified by productIds. For each surcharge, the API checks whether the record exists, and whether every segment of its ProductPath is referenced by the active CML association. Don’t specify this property if you don’t want to validate surcharges for the products.Optional68.0
underwritingRuleIdsString[]List of underwriting rule IDs to validate against the active CML model identified by productIds.Optional68.0

Response Body for POST 

Insurance CML Model Validation Response