> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Consent Collection

Presents a consent agreement to the end user and records their acceptance, producing an auditable record of what was consented to and when. Use as a gate before any journey step that processes personal data.

This page documents the **Consent Collection** module, including its variants, capabilities, and the result values it returns.

## Consent Collection: Consent Collection

### Capabilities

The module returns the following capabilities.

#### Consent given

True when the end user affirmatively accepted the consent agreement presented to them. False in every other case, including a timeout.

| Detail  | Description |
| ------- | ----------- |
| Type    | Boolean     |
| Default | `isFalse`   |

#### Consent status

How the consent step concluded - accepted, actively declined, timed out, or never presented.

| Code            | Label         | Description                                                               |
| --------------- | ------------- | ------------------------------------------------------------------------- |
| `ACCEPTED`      | Accepted      | The end user was presented with the agreement and explicitly accepted it. |
| `DECLINED`      | Declined      | The consent step was submitted but no explicit acceptance was recorded.   |
| `TIMED_OUT`     | Timed Out     | The step timer fired before the end user submitted a response.            |
| `NOT_PRESENTED` | Not Presented | The consent agreement was never rendered to the end user.                 |

### Default outcomes

The module is pre-configured with the following default outcomes, which can be used in evaluation and routing logic within the journey designer.

| Outcome             | Condition                           | Description                                                                                                                           |
| ------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Consent Given`     | Consent Given isTrue                | The end user was presented with the consent agreement and explicitly accepted it.                                                     |
| `Error`             | —                                   | The module couldn't return a result.                                                                                                  |
| `Consent Not Given` | default, when no conditions matched | The end user didn't accept the consent agreement, whether they declined it, the step timed out, or the agreement was never presented. |

### Input payload

The following is a sample payload used to submit data to the **Consent Collection** module for processing.

```json JSON theme={null}
{
  "context": {
    "subject": {
      "consent": [
        {
          "type": "explicit",
          "url": "https://www.gbgplc.com/legal/consent/identity-verification-v1",
          "terms": "I agree that GBG may process my personal data to verify my identity.",
          "effectiveDate": "2026-08-31T09:00:00Z"
        }
      ]
    }
  }
}
```

| Field                   | Required | Description                                                                                                                 |
| ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `Consent/url`           | Yes      | A link to the consent agreement presented to the end user, stored so the exact wording consented to can be retrieved later. |
| `Consent/terms`         | No       | The text of the consent agreement presented to the end user.                                                                |
| `Consent/effectiveDate` | No       | The date and time the consent takes effect, in ISO 8601 format.                                                             |

### Sample response

The following is a sample response returned by the module.

```json JSON theme={null}
{
  "response": {
    "advice": {
      "consentGiven": true,
      "consentStatus": "ACCEPTED"
    },
    "outcome": "Consent Given"
  }
}
```
