Loading
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Insurance
InsPolicyService:createPolicyTerms

InsPolicyService:createPolicyTerms

Create policy terms in the AssetTerm__c or InsurancePolicyTerm__c (for Salesforce FSC) object for all the power attributes at the Policy and PolicyCoverage level. A power attribute is an attribute that has an attribute class, attribute scope, applicable item, and applicable actions.

Class: InsPolicyService

Method: createPolicyTerms

How It Works

  1. The service receives the assetId as input.

  2. The service retrieves all the power attributes assigned at the policy level and policy coverage level.

  3. Depending on the assetID input, the service creates the policy terms in the AssetTerm__c or InsurancePolicyTerm__c object for the power attributes. If assetID is an ID of InsurancePolicy object, the policy terms are created in InsurancePolicyTerm__c object, else the policy terms are created in AssetTerm__c object.

Remote Options

Option

Description

assetId

Required

Asset (policy) Ids

scopes

Optional

Comma-separated string, or a string list for which the power attribute is applicable. It works as a filter. If you specify the scopes parameter, the service creates only the attributes of the given scopes. Possible values include:

  • Policy

  • Policy Coverage

  • Claim

  • Claim Coverage

Input JSON

Here's the format of the input JSON:

{ 
   "assetId":"",
   "scopes":""
}

See the following example of input JSON.

{ 
   "assetId":"02i6g000000h3T6AAI"
}

Output JSON

Here's the format of the output JSON:

{  
   "policyTermCreationErrors": {},
   "policyTermIds": []
   "inactivatedPolicyTerms": []
}

See the following example of output JSON.

{
  "policyTermCreationErrors": {
    "a3w6g000000TxurAAC_COLLISION": "Invalid decimal: No Coverage"
  },
  "policyTermIds": [
    "a5X6g000001LeUUEA0",
    "a5X6g000001LeUVEA0",
    "a5X6g000001LeUWEA0",
    "a5X6g000001LeUXEA0",
    "a5X6g000001LeUYEA0",
    "a5X6g000001LeUZEA0"
  ]
  "inactivatedPolicyTerms": [
    "a5X6g000001LeUVEA0"
  ]
}

Results Description

fieldInfo Detailed information about the Policy fields

policyVersions A list of policies for comparison

 
Loading
Salesforce Help | Article