> For the complete documentation index, see [llms.txt](https://docs.laminar.run/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.laminar.run/building-an-integration/advanced/workflows/global-workflow-object.md).

# Global Workflow Object

## Global Workflow Object Structure

<details>

<summary>View an example Global Workflow Object</summary>

```json
{
  "step_1": {
    "data": {
      "totalUsers": 4,
      "averageAge": 31.25,
      "totalItemsSold": 81,
      "users": [
        {
          "name": "Alice",
          "email": "alice@example.com",
          "totalSpent": 22
        },
        {
          "name": "Bob",
          "email": "bob@example.com",
          "totalSpent": 20
        },
        {
          "name": "Charlie",
          "email": "charlie@example.com",
          "totalSpent": 24
        }
      ]
    },
    "response": {
      "message": "Received POST request",
      "contents": {
        "totalUsers": 4,
        "averageAge": 31.25,
        "totalItemsSold": 81,
        "users": [
          {
            "name": "Alice",
            "email": "alice@example.com",
            "totalSpent": 22
          },
          {
            "name": "Bob",
            "email": "bob@example.com",
            "totalSpent": 20
          },
          {
            "name": "Charlie",
            "email": "charlie@example.com",
            "totalSpent": 24
          }
        ]
      }
    }
  },
  "step_2": {
    "data": {
      "lam.result": [
        {
          "lam.workflowId": 49,
          "lam.payload": {
            "lam.queryParams": {
              "email": "alice@example.com"
            },
            "lam.body": {
              "name": "Alice",
              "email": "alice@example.com",
              "totalSpent": 22
            }
          }
        },
        {
          "lam.workflowId": 49,
          "lam.payload": {
            "lam.queryParams": {
              "email": "charlie@example.com"
            },
            "lam.body": {
              "name": "Charlie",
              "email": "charlie@example.com",
              "totalSpent": 24
            }
          }
        }
      ]
    },
    "response": {}
  }
}
```

</details>

The Global Workflow Object is tailored to keep track of data transformations and responses throughout the workflow's execution:

* **Input** (optional): Initial data input passed via [POST request ](broken://pages/NDYlc2hgJScoYlXk42FV)if the workflow starts with a flow that has no source.
* **Flow Steps**: Each flow within the workflow contributes to this object, where each step might include:
  * **Data**: This part holds the results of data transformations by the flow.
  * **Response**: Stores the output or response received from the destination API after the data is processed and sent.

## Usage and Functionality

* **Sequential Execution**: Each flow accesses and possibly modifies the Global Workflow Object, allowing subsequent flows to utilize the transformed data and responses from previous steps.
* **Conditional Logic**: The object structure supports workflows where flows can be dynamically adjusted or skipped based on conditions evaluated during the workflow execution.
