cancelInsurancePolicy(insurancePolicyCancelInput, policyId)

Cancel a specific insurance policy by providing the cancellation details and the policy ID.

67.0

No

public static ConnectApi.InsurancePolicyCancellationRepresentation cancelInsurancePolicy(ConnectApi.InsurancePolicyCancellationInputRepresentation insurancePolicyCancelInput, String policyId)

insurancePolicyCancelInput

policyId

  • Type: String
  • ID of the insurance policy to cancel.

Type: ConnectApi.InsurancePolicyCancellationRepresentation

Use this method to cancel a specific insurance policy. Provide the cancellation effective date, reason, and target status in the input representation, along with the ID of the policy to cancel. The policy is canceled synchronously, and the response includes the transaction ID, impacted policy versions, and any errors.

The Apex example shows how to use the ConnectApi.InsuranceBrokerageFamily.cancelInsurancePolicy() method to cancel a specific insurance policy.

Class Definition

This Apex example shows how to cancel an insurance policy.

Usage Example

Use the CancelTestConnectAPI class to execute the cancel action and process the result.