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

# Extract live data with RWS Connect Live

> Learn how to read your SOAP system in real time and use the result like any other API source

[RWS Connect](/en/core-concepts/rws-connect) tables give you a curated, stored copy of your legacy system's data, refreshed on a schedule. **RWS Connect Live** answers a different question: *what does my system say right now?* One REST call goes in, one SOAP call reaches your system at that exact moment, and clean JSON comes back — no tables, no waiting for the next refresh.

That makes Live the right tool for **monitoring**: an integration that checks, every hour, that every new hire really arrived in your HR platform can't work on yesterday's snapshot. It's also the right tool for any integration that needs the current state of the source, not the last extraction.

## What you'll build

You'll configure an integration extract that reads this month's new hires **live** from a SOAP payroll system, and get them as JSON records ready for transformations, filters and loads like any other API source.

Time required: approximately 10 minutes.

## Prerequisites

* Access to an RWS Integration Workspace
* RWS Connect Live enabled for your account, with the `x-api-key` provided by RWS
* Your system's credentials stored with RWS, and its address approved for your account (to set this up, email [connect@rwsintegration.com](mailto:connect@rwsintegration.com))
* The SOAP operation you want to call: its address, action and request XML (from your system's documentation, or ask RWS)

The examples use a fictional payroll system at `https://payroll.example.com`. Replace the addresses, XML and credentials with your system's.

## Step 1: Create the Connection

You only do this once. The same Connection serves **every** Live integration you'll ever build — which system and which operation to call are chosen later, per integration.

1. In the sidebar, click **Connections**
2. Click **New Connection**
3. Configure the connection:

| Field          | Value                                |
| -------------- | ------------------------------------ |
| Name           | `RWS Connect Live`                   |
| Type           | `API`                                |
| URL            | `https://connect.rwsintegration.com` |
| Base Path      | `/v1/live/soap`                      |
| Authentication | `Simple`                             |
| Headers        | `x-api-key`: the key provided by RWS |

4. Click **Save**

## Step 2: Configure the Extract

Everything about the SOAP call travels as query parameters, so it all lives in one place: your integration's extract configuration.

1. In your integration, expand the **Extract** section
2. Configure these fields:

| Field      | Value              |
| ---------- | ------------------ |
| Connection | `RWS Connect Live` |
| Method     | `GET`              |
| Path       | `/`                |

3. Add the **Query Params** that describe the call. First, which operation to call:

| Parameter            | Value                                                       |
| -------------------- | ----------------------------------------------------------- |
| `x_soap_host`        | `https://payroll.example.com`                               |
| `x_soap_path`        | `/v2/employmentcontractservice`                             |
| `x_soap_action`      | `example.com/api/v2/EmploymentContractService/ListOnDemand` |
| `x_soap_auth_header` | your system's login block — see below                       |
| `x_body_template`    | the operation's request XML — see below                     |

The `x_soap_auth_header` is the authentication block your system expects, exactly as it appears in a working SOAP request — with one difference: credentials are referenced **by name**, never written in:

```xml theme={null}
<soapenv:Header xmlns:dto="payroll.example.com/svc/dto">
  <dto:Authentication>
    <dto:UserToken>
      <dto:Password>{PAYROLL_PASSWORD}</dto:Password>
      <dto:User>{PAYROLL_USER}</dto:User>
      <dto:TenantGuid>YOUR-TENANT-GUID</dto:TenantGuid>
    </dto:UserToken>
  </dto:Authentication>
</soapenv:Header>
```

<Info>
  Names like `{PAYROLL_USER}` are filled by RWS at call time, from the credentials stored securely for your account — the same ones your Connect pipelines use. Passwords never appear in your configuration and never travel in the request.
</Info>

The `x_body_template` is the operation's request XML, with `{slots}` where values change per run:

```xml theme={null}
<v2:ListOnDemand xmlns:v2="payroll.example.com/api/v2">
  <v2:filter>
    <v2:CurrentPage>{page}</v2:CurrentPage>
    <v2:CompanyCode>{company_code}</v2:CompanyCode>
    <v2:HiredSince>{start_date}</v2:HiredSince>
  </v2:filter>
</v2:ListOnDemand>
```

4. Now add the parameters that fill those slots — plain query params with the same names:

| Parameter      | Value                                             |
| -------------- | ------------------------------------------------- |
| `company_code` | `2`                                               |
| `start_date`   | `{{ today.subtract(30.day).format(YYYY-MM-DD) }}` |
| `x_record_tag` | `EmploymentContract`                              |

`x_record_tag` names the XML element that becomes your records: every `<EmploymentContract>` in the response turns into one JSON item. [Dynamic parameters](/en/features/extract/dynamic-parameters) like `today.subtract(30.day)` work here like anywhere else.

5. Set the **Datapoint Path in Response** to `items`

6. Set the **Pagination**:

| Field                  | Value    |
| ---------------------- | -------- |
| Pagination Type        | `Simple` |
| Initial page parameter | `page`   |
| Initial page value     | `1`      |
| Pagination end type    | `Object` |

The `page` parameter fills the `{page}` slot in the body template, and the extraction stops by itself on the first empty page.

## Step 3: Check the preview

The **Extract Preview** panel should show status `200 OK` and your records as clean JSON — `snake_case` names, nested the way your system structures them, all values as text:

```json theme={null}
{
  "items": [
    {
      "registration": "202060",
      "hire_date": "2026-08-03T00:00:00",
      "person": {
        "person_id": "584210",
        "name": "Ana Souza",
        "cpf": "000.000.000-00"
      },
      "company": { "code": "2", "description": "Example HQ" }
    },
    {
      "registration": "202061",
      "hire_date": "2026-08-04T00:00:00",
      "person": {
        "person_id": "584211",
        "name": "Bruno Lima",
        "cpf": "000.000.000-00"
      },
      "company": { "code": "2", "description": "Example HQ" }
    }
  ]
}
```

From here on it's a normal integration: [transform](/en/core-concepts/data-mapping), [filter](/en/core-concepts/data-filtering), [enrich](/en/features/extract/enrichment) and load as usual.

## Optional quality guards

Four extra parameters protect the call against surprises in the response. All optional, all one-liners:

| Parameter      | What it solves                                                                                                                         |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `x_list_paths` | An element that *can* repeat should always arrive as a list, even when there's just one — declare its path here and it will            |
| `x_explode`    | Turn one record into one item per element of a list inside it — one item per vacation period, for example                              |
| `x_error_tag`  | Some systems report errors inside a normal-looking response. Name the error element and the call fails loudly instead of looking empty |
| `x_expect_tag` | An element every valid response must contain. If it's missing, the call fails instead of silently returning zero records               |

## Live or tables?

| You need                                                                       | Use                                                 |
| ------------------------------------------------------------------------------ | --------------------------------------------------- |
| The current state, right now — monitoring, audits, real-time checks            | **RWS Connect Live**                                |
| History, snapshots over time, analytics, data combined from several operations | [RWS Connect tables](/en/core-concepts/rws-connect) |

They share the same api key and complement each other: many customers feed dashboards from the tables and run their [monitoring](/en/core-concepts/monitoring) on Live.

## When something goes wrong

Live fails loudly and tells you why. A key that isn't enabled gets a clear `403` asking you to contact RWS. A misconfigured call gets a `400` naming exactly the parameter to fix. And if your system returns an error — even one disguised inside a normal response — you get a clear error, never a silent empty success.

## What you learned

* **One Connection, every integration**: the system, operation and XML are query parameters, so a single `RWS Connect Live` connection serves everything
* **Credentials stay with RWS**: templates reference names like `{PAYROLL_USER}`; values are filled securely at call time
* **`x_record_tag` turns XML into records**, delivered as nested `snake_case` JSON under `items`
* **Pagination just works**: the page parameter fills a `{slot}` and extraction stops on the first empty page

## Next steps

<CardGroup cols={2}>
  <Card title="Monitoring" icon="chart-line" href="/en/core-concepts/monitoring">
    Watch your integrations and business flows
  </Card>

  <Card title="Dynamic Parameters" icon="brackets-curly" href="/en/features/extract/dynamic-parameters">
    Date windows like "the last 30 days"
  </Card>

  <Card title="RWS Connect" icon="plug-circle-bolt" href="/en/core-concepts/rws-connect">
    Your legacy data as stored, queryable tables
  </Card>

  <Card title="Enrichment" icon="layer-group" href="/en/features/extract/enrichment">
    Complete each record with data from other APIs
  </Card>
</CardGroup>
