postInsuranceCreateCensus(createCensusInputParam, contractId)

Generate a group census from the policies on an existing group benefits contract.

API Version

67.0

Requires Chatter

No

Signature

public static ConnectApi.InsuranceGenerateCensusRepresentation postInsuranceCreateCensus(ConnectApi.InsuranceGenerateCensusInputRepresentation createCensusInputParam, String contractId)

Parameters

createCensusInputParam
Type: ConnectApi.InsuranceGenerateCensusInputRepresentation
Census name and type, optional policy date, filters, and generation options used to create the group census.
contractId
Type: String
ID of the insurance contract whose policies are used to generate the group census.

Usage

Use this method to generate a group census from the policies on an existing group benefits contract. Specify the contract in contractId and the census type in censusType, such as Enrollment or Quote. Optionally set censusName.

This method runs asynchronously and returns a requestId that you can use to track the job. To retry a failed run, pass that requestId on the next call.

Set policyEffectiveDate in yyyy-MM-dd format to select the policy version. The date must fall between the version's effectiveFromDate and effectiveToDate. Use filter to limit the census to root contract group plans, contacts, or person accounts. Set shouldGenerateCsv to create a CSV file of the census details. Set shouldIncludeMemberPlans to include insurance plan details for each member.

Check isSuccess, groupCensusId, and requestId on the response. Errors are in the errors property.

Example

This example starts generating an enrollment census from a contract, filters by person account, and includes member plan details and a CSV file.