---
schema_version: "1"
id: eab7c7a50650c02441811abe825f72c7ef8a70aad3ba31b6645ada33968d35e1
title: postInsuranceIssueContract(issueContractInputParam)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/apex_ConnectAPI_InsuranceGroupBenefitsFamily_postInsuranceIssueContract.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_ConnectAPI_InsuranceGroupBenefitsFamily_postInsuranceIssueContract.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6e64952978e0e51e72e3c87671a904fe8baa87b67a86c7da24e03ff8eb968eb1
description: Issue a group benefits contract from a quote synchronously to activate coverage.
---
# postInsuranceIssueContract(issueContractInputParam)

Issue a group benefits contract from a quote synchronously to activate coverage.

## API Version

68.0

## Requires Chatter

No

## Signature

public static ConnectApi.InsuranceIssueContractRepresentation postInsuranceIssueContract(ConnectApi.InsuranceIssueContractInputRepresentation issueContractInputParam)

## Parameters

**issueContractInputParam**

- Type: [ConnectApi.InsuranceIssueContractInputRepresentation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_input_insurance_issue_contract.htm "Input representation of the quote ID, optional contract dates and term, transaction detail level, and additional fields used to issue a group benefits contract from a quote.")
- Quote ID and optional contract dates, term, transaction detail level, and additional fields used to issue the contract.

## Return Value

Type: [ConnectApi.InsuranceIssueContractRepresentation](https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/apex_connectapi_output_insurance_issue_contract.htm "Output representation that's returned when a group benefits contract is issued synchronously from a quote.")

## Usage

Use this method to issue a group benefits contract from a quote synchronously. Specify the quote in quoteId.

To override dates derived from the quote, set contractStartDate and contractEndDate in yyyy-MM-dd format, or set contractTerm in months. Set transactionDetailLevel to PLAN\_LEVEL, COVERAGE\_LEVEL, or CHARGE\_LEVEL. The default value is PLAN\_LEVEL.

To stamp additional fields on Contract, InsuranceContract, or ContractGroupPlan, add items to additionalFields. For a contract group plan, set productPath to identify where in the product hierarchy the fields apply.

This method runs synchronously. Check isSuccess and contractId on the response. Errors are in the errors property.

## Example

This is a sample example that shows how to issue a contract from a quote, overrides the contract dates, sets plan-level transaction detail, and applies an enrollment start date on the insurance contract from Apex code.

// Issue a group benefits contract from a quote.

final String SOURCE\_QUOTE\_ID = '0Q0SB000000w6zV0AQ';

// Optional: additional fields for Contract / InsuranceContract / ContractGroupPlan.
ConnectApi.InsuranceApexStringRepresentation enrollmentStart =
    new ConnectApi.InsuranceApexStringRepresentation();
enrollmentStart.key = 'EnrollmentStartDate';
enrollmentStart.value = '2026-09-01';

ConnectApi.InsuranceContractItem insuranceContractItem = new ConnectApi.InsuranceContractItem();
insuranceContractItem.entity = 'InsuranceContract';
// insuranceContractItem.productPath = 'Health/Dental';
insuranceContractItem.fields = new List<ConnectApi.InsuranceApexStringRepresentation>{
    enrollmentStart
};

ConnectApi.InsuranceIssueContractInputRepresentation input =
    new ConnectApi.InsuranceIssueContractInputRepresentation();
input.quoteId = SOURCE\_QUOTE\_ID;
input.contractStartDate = '2026-09-01';       // optional; yyyy-MM-dd
input.contractEndDate = '2027-08-31';         // optional; yyyy-MM-dd
// input.contractTerm = 12;                   // optional
input.transactionDetailLevel = 'PLAN\_LEVEL';  // optional; PLAN\_LEVEL | COVERAGE\_LEVEL | CHARGE\_LEVEL
input.additionalFields = new List<ConnectApi.InsuranceContractItem>{ insuranceContractItem };

try {
    ConnectApi.InsuranceIssueContractRepresentation result =
        ConnectApi.InsuranceGroupBenefitsFamily.postInsuranceIssueContract(input);

    System.debug('isSuccess: ' + result.isSuccess);
    System.debug('contractId: ' + result.contractId);
    System.debug('message: ' + result.message);
    System.debug('errors: ' + result.errors);
} catch (Exception e) {
    System.debug('Error while issuing the contract: ' + e.getMessage());
}