---
schema_version: "1"
id: 6e1a8af3c8fb197bd004ee7bae65b6960efe55c0ec0e24c580f6fb13cf5437ba
title: Generate Research Study Blocks Action
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/life_sciences_dev_guide/actions_obj_generate_research_study_blocks.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/actions_obj_generate_research_study_blocks.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3996f6ccad4b646b8bb5964ca7c1404a8761ac3883b50a76addd1341b09c110a
description: Generate research study randomization block records to link each block with a specific research study comparison group by using the randomization process.
---
# Generate Research Study Blocks Action

Generate research study randomization block records to link each block with a specific research study comparison group by using the randomization process.

The Generate Research Study Blocks action generates blocks during the design time to verify the randomized assignment of groups and to test the required block multipliers.

This action is available in API version 61.0 and later.

## Special Access Rules

The Generate Research Study Blocks action is available in Enterprise and Unlimited Editions with Life Sciences Cloud and the Participant Enrollment Add-On license. Additionally, the org must be enabled with Research Study Randomization.

## Supported REST HTTP Methods

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

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

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d488537e109">Input</th>

              <th class="featureTableHeader  " id="d488537e112">Type</th>

              <th class="featureTableHeader  " id="d488537e115">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d488537e109" data-title="Input"><span class="keyword parmname">researchStudy​RandomizationId</span></td>

              <td class="entry" headers="d488537e112" data-title="Type">string</td>

              <td class="entry" headers="d488537e115" data-title="Description">Required.<p class="p">ID of the research study randomization record that you want to generate the blocks for.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d488537e109" data-title="Input"><span class="keyword parmname">researchStudy​TargetCandidateCount</span></td>

              <td class="entry" headers="d488537e112" data-title="Type">integer</td>

              <td class="entry" headers="d488537e115" data-title="Description">Required.
                <p class="p">Number of candidates that you want to generate the blocks for. </p>
              </td>

            </tr>

          </tbody>

        </table>

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| researchStudy​RandomizationBlockIds | string | List of generated research study randomization block IDs. |

## Example

**POST**

This sample request is for the Generate Research Study Blocks action.

{
  "inputs": \[
    {
      "researchStudyRandomizationId": "1Rdxx0000004CguCAE",
      "researchStudyTargetCandidateCount": 10
    }
  \]
}

This sample response is for the Generate Research Study Blocks action.

\[
  {
    "actionName": "generateResearchStudyBlocks",
    "errors": null,
    "invocationId": null,
    "isSuccess": true,
    "outputValues": {
      "researchStudyRandomizationBlockIds": \[
        "1Mtxx0000004CLw",
        "1Mtxx0000004CLx",
        "1Mtxx0000004CLy"
      \]
    },
    "sortOrder": -1,
    "version": 1
  }
\]

#### See Also

- [_Salesforce Help_: Enable Participant Management](https://help.salesforce.com/s/articleView?id=ind.lsc_admin_enable_participant_management.htm&type=5&language=en_US "Salesforce Help: Enable Participant Management - HTML (New Window)")
- [_Salesforce Help_: Enroll Participants Using Block Generation](https://help.salesforce.com/s/articleView?id=ind.lsc_admin_participant_management_create_using_block_generation.htm&type=5&language=en_US "Salesforce Help: Enroll Participants Using Block Generation - HTML (New Window)")