---
schema_version: "1"
id: f541b75df2032dc22a74844f5f26629dcc708daac21d1341f46ce94810507e1a
title: Process Criteria Matching Response
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/life_sciences_dev_guide/actions_obj_process_criteria_matching_response.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.life_sciences_dev_guide.meta/life_sciences_dev_guide/actions_obj_process_criteria_matching_response.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5047182f340459afd67dcf864efa7fb16bc627459e235b7df4005d188611ac85
description: Parses a GPT-generated JSON response to evaluate each inclusion and exclusion criterion for a given Research Study Candidate, determining whether each criterion is matched or not. This action stores the GPT response in the Care Program Enrollment Evaluation Result entity and computes the number of matched inclusion criteria and exclusion criteria, returning these counts as output.
---
# Process Criteria Matching Response

Parses a GPT-generated JSON response to evaluate each inclusion and exclusion criterion for a given Research Study Candidate, determining whether each criterion is matched or not. This action stores the GPT response in the Care Program Enrollment Evaluation Result entity and computes the number of matched inclusion criteria and exclusion criteria, returning these counts as output.

This action is available in API version 62.0 and later.

## Special Access Rules

The Assign Candidate to Research Study Group 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/processCriteriaMatchingResp

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="d489027e109">Input</th>

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

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

            </tr>

          </thead>

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

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

              <td class="entry" headers="d489027e115" data-title="Description">Required
                <p class="p">ID of the research study candidate for which GPT
                  response is received.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d489027e109" data-title="Input"><span class="keyword parmname">gptResponse</span></td>

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

              <td class="entry" headers="d489027e115" data-title="Description">Required
                <p class="p">GPT Response of PromptTemplate Invocable action will
                  be input to this action.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Outputs

| Output | Type | Description |
| --- | --- | --- |
| matchedInclusionCount | string | Number of inclusion criteria matched. |
| matchedExclusionCount | string | Number of exclusion criteria matched. |

## Example

**POST**

This sample request is for the Process Criteria Matching Response action.

{
    "inputs": \[
        {
            "researchStudyCandidateId": "7evxx0000000001AAA",
            "gptResponse": {
                "EligibilityResponse": \[
                    {
                        "Id": "0bkxx0000000001AAA",
                        "EligibilityCriteria": "Adult SARI patients with 2019-ncov infection confirmed by PCR",
                        "Result": "Unknown",
                        "Reason": "No information provided"
                    },
                    {
                        "Id": "0bkxx000000001dAAA",
                        "EligibilityCriteria": "Age < 78",
                        "Result": "Match",
                        "Reason": "Patient is 50 years old."
                    },
                    {
                        "Id": "0bkxx000000003FAAQ",
                        "EligibilityCriteria": "Pregnant",
                        "Result": "Not Match",
                        "Reason": "Patient is male."
                    },
                    {
                        "Id": "0bkxx000000004rAAA",
                        "EligibilityCriteria": "Allergic to Gluten",
                        "Result": "Match",
                        "Reason": "Patient has Gluten Allergy."
                    }
                \]
            }
        }
    \]
}

This sample response is for the Process Criteria Matching Response action.

{
  "inclusionCriteriaMatchCount": 1,
  "exclusionCriteriaMatchCount": 1
}