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

# Loops

> Loops Scenario seeding parameters, nested fields, and examples

Use `loops` in `twins` and put this configuration under `seed_config.loops`.

Loops email platform: contacts, mailing lists, custom properties, campaigns, transactional templates, themes, components, and workflows.

## Example seed

This is the complete Scenario request body for [creating a Scenario](https://docs.argalabs.com/api-reference/post-create-a-scenario.md). You can also import it with `arga test-runner scenarios import --file scenario.json`.

```json theme={null}
{
  "name": "Loops eval fixture",
  "twins": [
    "loops"
  ],
  "seed_config": {
    "loops": {
      "team_name": "Example team",
      "mailing_lists": [
        {
          "id": "newsletter",
          "name": "Newsletter",
          "isPublic": true
        }
      ],
      "contact_properties": [
        {
          "name": "plan",
          "type": "string"
        }
      ],
      "contacts": [
        {
          "email": "alex@example.test",
          "firstName": "Alex",
          "plan": "pro",
          "mailingLists": {
            "newsletter": true
          }
        }
      ],
      "transactional_emails": [
        {
          "id": "receipt",
          "name": "Receipt",
          "subject": "Your receipt",
          "lmx": "<Paragraph>Thank you</Paragraph>",
          "published": true
        }
      ],
      "campaigns": [
        {
          "name": "Welcome",
          "mailingListId": "newsletter"
        }
      ],
      "workflows": [
        {
          "name": "Onboarding"
        }
      ],
      "themes": [
        {
          "id": "brand-theme",
          "name": "Brand",
          "styles": {
            "bodyYPadding": 24
          }
        }
      ],
      "components": [
        {
          "id": "footer-component",
          "name": "Footer",
          "lmx": "<Paragraph>Example team</Paragraph>"
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.loops`. Required nested fields are marked in their tables. Provider-native objects can contain service-specific fields beyond the representative record shapes below.

| Parameter | Type | Description |
| - | - | - |
| `team_name` | `string` | Team name. |
| `mailing_lists` | `object[]` | Mailing lists fixtures in provider-native format. |
| `contact_properties` | `object[]` | Contact properties fixtures in provider-native format. |
| `contacts` | `object[]` | Contacts fixtures in provider-native format. |
| `transactional_emails` | `object[]` | Transactional emails fixtures in provider-native format. |
| `campaigns` | `object[]` | Campaigns fixtures in provider-native format. |
| `workflows` | `object[]` | Workflows fixtures in provider-native format. |
| `themes` | `object[]` | Themes fixtures in provider-native format. |
| `components` | `object[]` | Components fixtures in provider-native format. |
| `api_key` | `string` | Synthetic API key accepted by the twin. |
| `base_time` | `string` | Reference clock for repeatable fixtures. Omit to use the current clock. |
| `rate_limit_per_second` | `integer` | Rate limit per second. Minimum: 1. Maximum: 10000. |
| `content_rate_limit_per_minute` | `integer` | Content rate limit per minute. Minimum: 1. Maximum: 10000. |
| `rate_limiting_enabled` | `boolean` | Enable request rate limiting. |
| `resources` | `map<string, object[]>` | Provider resource collections keyed by collection name. Preserve their native record fields and references. |
| `webhook_url` | `string or null` | Webhook url. |
| `webhook_secret` | `string` | Webhook secret. |
| `webhook_events` | `string[]` | Webhook events fixtures in provider-native format. |
| `failure_rules` | `object[]` | Deterministic failure-injection rules. |

## Resource fields

These tables describe the record shapes used by the example. Keep native field names and casing. Map keys such as property names, IDs, and metadata keys are supplied by your fixture.

### `mailing_lists[]`

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | Explicit resource identifier, when supported. |
| `name` | `string` | Human-readable name. |
| `isPublic` | `boolean` | Enable or set isPublic behavior. |

### `contact_properties[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |
| `type` | `string` | Type. |

### `contacts[]`

| Parameter | Type | Description |
| - | - | - |
| `email` | `string` | Main account email address. |
| `firstName` | `string` | FirstName. |
| `plan` | `string` | Plan. |
| `mailingLists` | `object` | MailingLists. |

### `transactional_emails[]`

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | Explicit resource identifier, when supported. |
| `name` | `string` | Human-readable name. |
| `subject` | `string` | Subject. |
| `lmx` | `string` | Lmx. |
| `published` | `boolean` | Enable or set published behavior. |

### `campaigns[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |
| `mailingListId` | `string` | MailingListId. |

### `workflows[]`

| Parameter | Type | Description |
| - | - | - |
| `name` | `string` | Human-readable name. |

### `themes[]`

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | Explicit resource identifier, when supported. |
| `name` | `string` | Human-readable name. |
| `styles` | `object` | Styles. |

### `components[]`

| Parameter | Type | Description |
| - | - | - |
| `id` | `string` | Explicit resource identifier, when supported. |
| `name` | `string` | Human-readable name. |
| `lmx` | `string` | Lmx. |

See [Scenario seeding](https://docs.argalabs.com/twins/seeding.md) for saving, provisioning, and resetting fixtures.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.