---
schema_version: "1"
id: cc137a6a1783d7ca26ab0dca2a18d7a84130aa4aeedb8a918c330fb74747beaa
title: Generate Insurance Contract Transaction Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/insurance_developer_guide/actions_obj_generate_insurance_contract_txn.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.insurance_developer_guide.meta/insurance_developer_guide/actions_obj_generate_insurance_contract_txn.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3fa5bda46eae5016743ee5a4bbc0885715149c69ab65842e67b57c6768c9c7ba
description: Asynchronously generate insurance contract transactions (InsuranceContractTrxn and InsuranceContractTrxnDtl records) for the specified contract ID over a given date range.
---
# Generate Insurance Contract Transaction Action

Asynchronously generate insurance contract transactions (InsuranceContractTrxn and InsuranceContractTrxnDtl records) for the specified contract ID over a given date range.

This action is available in API version 68.0 and later.

## Supported REST HTTP Methods

**URI**: /services/data/vXX.X/actions/standard/generateInsuranceContractTrxn

Where XX.X is the latest API version.

**Formats**: JSON, XML

**HTTP Methods**: POST

**Authentication**: Authorization: Bearer TOKEN

Where TOKEN is your OAuth access token.

## Inputs

| Input | Type | Description |
| --- | --- | --- |
| contractId | string | Required. The ID of the insurance contract to generate transactions for |
| insuranceContractGenerateTxnInputRep | Apex-defined | Required. An Apex ConnectApi.InsuranceContractGenerateTrxnInputRepresentation record that contains the date range and an optional name for transaction rollup. |

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| insuranceContractGenerateTxnRep | Apex-defined | An Apex ConnectApi.InsuranceContractGenerateTrxnRepresentation record that contains details about the asynchronous job ID and success status. |

## Example

**POST**

This sample request is for the Generate Insurance Contract Transaction action.

{
  "inputs": \[
    {
      "contractId": "800xx0000004C92AAE",
      "insuranceContractGenerateTxnInputRep": {
        "name": "Q1-2026-Transactions",
        "fromDate": "2026-01-01",
        "toDate": "2026-03-31"
      }
    }
  \]
}

This sample response is for the Generate Insurance Contract Transaction action.

\[
  {
    "actionName": "generateInsuranceContractTrxn",
    "errors": null,
    "invocationId": null,
    "isSuccess": true,
    "outcome": null,
    "outputValues": {
      "isSuccess": true,
      "message": "Transaction generation started successfully",
      "jobIdentifier": "08Pxx0000000001EAA",
      "errors": null
    },
    "sortOrder": -1,
    "version": 1
  }
\]