> ## 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.

# How to use grouped and ungrouped modules

> Learn about grouped and ungrouped modules in GBG GO and when to use each type.

Module grouping in GBG GO allows you to control how modules run within a customer journey. Grouping modules also allows your journey to run faster, because they process in parallel rather than sequentially.

When modules are grouped, all required data must be provided upfront (prefill mode). If modules are not grouped, you can provide information sequentially as each module runs (adaptive mode).

For more information about modules, refer to the [How to configure module outcomes in GO](/docs/go-v1/guides/product-guides/configure-outcome-decisions).

## What are grouped modules?

Grouped modules are modules that you place inside a subgroup within your journey. When modules are grouped together, they run in parallel, meaning they all start processing at the same time.

## What are ungrouped modules?

Ungrouped modules are modules that you add directly to the main journey flow without placing them in a subgroup. When modules are ungrouped, they run sequentially, meaning each module starts processing only after the previous one has completed.

## Key differences

The table below summarises the main differences between grouped and non-grouped modules:

| Aspect              | Grouped modules                                                            | Non-grouped modules                                                        |
| ------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| Execution           | All modules start simultaneously, making the journey run faster.           | Modules execute one after another.                                         |
| Data requirements   | All required data must be provided upfront (prefill mode).                 | Data can be provided sequentially as each module executes (adaptive mode). |
| Use case            | When you have all customer data available at the start of the journey.     | When you need to collect data progressively through the journey.           |
| Journey progression | All modules in the group must be completed before moving to the next step. | Each module completes before the next one begins.                          |

To learn more about the prefill and adaptive modes, refer to [Key concepts](/docs/go-v1/get-started/key-concepts).

## When to use grouped modules

Use grouped modules when:

* You want to reduce the total journey execution time by processing multiple verifications simultaneously.
* You have all the required customer data available at the start of the journey.

## When to use ungrouped modules

Use non-grouped modules when:

* Each module's execution depends on the result of the previous module.
* You are using adaptive mode to submit customer data as the journey progresses.
* You want more control over the sequence of verification steps.

## Add modules to subgroups

To add modules to subgroups in GBG GO, follow these steps:

### Step 1: Create a group

1. Right-click on a module in your journey.
2. Click **Add to group**.

<Frame>
  <img src="https://mintcdn.com/gbg-loqate/dfmzNGmxbjm30Gt7/images/grouped-1.png?fit=max&auto=format&n=dfmzNGmxbjm30Gt7&q=85&s=03ff96ad6cee80165611f4dde72f3d4e" alt="Grouped 1 Pn" width="604" height="426" data-path="images/grouped-1.png" />
</Frame>

### Step 2: Add a module to the subgroup

1. Add a module to the subgroup.

<Frame>
  <img src="https://mintcdn.com/gbg-loqate/dfmzNGmxbjm30Gt7/images/grouped-2.png?fit=max&auto=format&n=dfmzNGmxbjm30Gt7&q=85&s=eab7c5802432d60badb54b14e3e1246f" alt="Grouped 2 Pn" width="576" height="595" data-path="images/grouped-2.png" />
</Frame>

### Step 3: Publish the journey

1. Click **Publish to Preview**.

## Example payload for grouped modules

The example below shows how to start a journey with grouped modules using the `/journey/start` endpoint. Note that all required customer data is included in the initial request:

```json JSON theme={null}
{
  "resourceId": "196844aa36e55c184d45b3f9628aa8z213a61bc98d69c2908c8571df9e518b28@3k4q7cua",
  "context": {
    "subject": {
      "identity": {
        "title": "Mr.",
        "firstName": "Elia",
        "middleNames": ["P"],
        "lastNames": ["HP"],
        "dateOfBirth": "2000-01-27",
        "gender": "Male",
        "currentAddress": {
          "country": "GBR",
          "postalCode": "BA133BN",
          "locality": "Westbury",
          "thoroughfare": "High Street",
          "building": "52",
          "administrativeArea": "Wilts"
        },
        "previousAddress": [],
        "phones": [
          {
            "type": "mobile",
            "number": "1234567890"
          }
        ],
        "emails": [
          {
            "type": "personal",
            "email": "john.doe@example.com"
          }
        ],
        "socials": [
          {
            "type": "facebook",
            "identity": "john.doe"
          }
        ]
      }
    }
  }
}
```

The context object contains all required customer information, because the grouped modules need this data to run in parallel.
