deepCloneGroupCensus(groupCensusDeepCloneInputRepresentation, censusId)

Clone a group census and its hierarchy, including members, member plans, and plan attributes. Use this method to copy quoting-phase census data into an enrollment-type census, apply field-level overrides, and optionally filter or remap member plan references.

68.0

No

public static ConnectApi.GroupCensusDeepCloneRepresentation deepCloneGroupCensus(ConnectApi.GroupCensusDeepCloneInputRepresentation groupCensusDeepCloneInputRepresentation, String censusId)

groupCensusDeepCloneInputRepresentation

censusId

  • Type: String
  • ID of the source group census to clone.

Type: ConnectApi.GroupCensusDeepCloneRepresentation

Use this method to clone a group census and its hierarchy, including members, member plans, and plan attributes. Specify the source census in censusId. All properties on the input representation are optional.

To clone only the member plans that belong to a quote, set quoteId on memberPlanFilter. To remap those plans from quote line items to contract group plans, set contractId on memberPlanReferenceMapping. To stamp new field values on the cloned census, put field API names and values in targetGroupCensusOverrides.

To clone the full hierarchy with no filters, mappings, or overrides, pass an empty input representation. The method runs asynchronously. Use the requestId in the response to track the job. Errors that occur while validating or scheduling the job are in the errors property.

This is an example to clone a group census from Apex code. It limits the clone to member plans on a specified quote, remaps those quote line item references to contract group plans, and stamps name and status values on the target census.

This example clones the full hierarchy with no filters, mappings, or overrides.