---
sourceDocument: Australia Workflow Data Fabric
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/integrate-applications

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Workflow Data Fabric

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Design considerations

# Data Stream action design considerations {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 4 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Data Stream Action Design Considerations

This content outlines essential design considerations for creating and integrating Data Stream actions within ServiceNow flows.
Adhering to these guidelines is crucial to avoid errors and enhance performance.
Show full answer Show less  

## Key Features

* **Pagination Logic:** Implement pagination according to third-party requirements and ensure the use of the correct data types. Utilize the `getNextPage` variable effectively.
* **Preprocessing Scripts:** Avoid scripts that pause or call a MID Server to maintain a constant connection to the response stream.
* **Data Type Conversion:** Convert pagination variable data types when performing mathematical operations to prevent errors.
* **Configuration Page Options:** Be cautious when clearing options, as this will remove associated steps and data from the Data Stream outline.
* **Attachment Size Limits:** Keep returned page sizes under one GB to avoid issues during data retrieval.
* **Retry Policy:** Understand the limitations of retry policies, including maximum delays and the non-support of waiting states during retries.
* **Flow Logic Compatibility:** Certain actions that pause the flow or run on a MID Server cannot be added to Data Stream For Each logic blocks.
* **Reporting Considerations:** Disable reporting when processing large records to prevent performance bottlenecks.

## Key Outcomes

By following these design considerations, ServiceNow customers can ensure that their Data Stream actions function efficiently, reducing the likelihood of performance issues and errors during execution. Proper configuration leads to smoother integration within flows and more effective data management, boosting overall operational efficiency.  
Follow these considerations when creating a Data Stream action and
when adding a Data Stream action to a
flow to prevent errors and performance issues.

## Considerations when creating a Data Stream action {#data-stream-design__section_hvq_j32_1hb}

Create Data Stream actions with these considerations in mind.  

Write pagination logic according to third-party requirements

:   Evaluate and understand the format required by your third-party endpoint. For example, you may need to write a script that sets the built-in `getNextPage` variable to true as long as there is a `nextPage` token in the response. If the response does not contain the token, then set the variable to false. Access variables in script using bracket or dot notation. For example, `variables['getNextPage']`. This variable only accepts the Boolean data type. The default value is false.

Ensure that preprocessing scripts do not call a MID Server or pause the
action.
:   Data Stream actions require a constant connection to the response stream. They do not support preprocessing scripts that pause the action to call a MID Server or pause the action to wait for a condition or duration. A preprocessing script that pauses the action for any reason returns an error message.

Convert pagination variable data types to perform math operations

:   Pagination variables only support the string data type. To perform math operations, you must convert the value to an integer, perform any required operations, then convert it back to a string.

        variables['offset'] = (parseInt(variables['offset']) + parseInt(variables['limit'])).toString();

Ensure that the pagination script has an end condition
:   Avoid infinite loops in pagination requests by creating a condition that sets the `getNextPage` variable to false. Cancel any long-running flows. Always test Data Stream actions before using them in production.

Clear configuration page options carefully
:   Clearing an option in a configuration page removes the step from the Data Stream outline and deletes all data associated with the step.

Consider the size of each page returned
:   When configuring pagination options, try to ensure that the size of each page returned is
    under one GB. This ensures that flow designers who use the action won't encounter size limit
    issues when retrieving data from a MID Server. If the action returns more than
    one GB of data per page, the flow designer may need to increase the attachment size limit.
For more information, see [MID Server support for Data Stream actions](https://www.servicenow.com/docs/5WiCpQdvCrm7JVWUWCToGg "Get data through a ServiceNow MID Server when running a Data Stream action.").  
Note:  
* Nesting Data Stream actions is not supported.
* When using the retry policy, ensure that you are aware of these considerations:
  * Only a fixed time interval strategy is honoured for the data stream actions.
  * The total delay (count multiplied by the interval) can't exceed 30 seconds. For example, if you want retry for a maximum of 3 times, the maximum delay for each retry is 10 seconds.
  * Data stream step doesn't go into the waiting state during retry.
  {#data-stream-design__ul_h4r_swq_h4b}
{#data-stream-design__ul_jq5_crr_vnb}

## Considerations when adding a Data Stream action to a flow {#data-stream-design__section_eg5_p5z_c3b}

Add a Data Stream
action to a flow with these considerations in mind.  

Do not add actions with wait conditions to a Data Stream For
Each logic block

:   You cannot add an action that pauses the flow to a Data Stream For Each flow logic block. Data Stream actions require a constant connection to the response stream. For example, you cannot use the Ask for Approval or Wait for Condition actions within Data Stream For Each flow logic.

    Some actions and steps always pause a flow and cannot be added to Data Stream For
    Each flow logic blocks. However, some actions and steps may pause the flow depending on how
    they are configured. Check the action configuration to ensure it does not pause the flow at
    runtime.  

    |-|-|
    | Always pauses the flow (unsupported with Data Stream actions) | Ask for Approval action |
    | Always pauses the flow (unsupported with Data Stream actions) | Ask for Approval step |
    | Always pauses the flow (unsupported with Data Stream actions) | Wait for Condition action |
    | Always pauses the flow (unsupported with Data Stream actions) | Wait for Condition step |
    | May pause the flow depending on configuration | Create Catalog Task action |
    | May pause the flow depending on configuration | Create Task action |
    | May pause the flow depending on configuration | Create Task step |
    [ ]

    {#data-stream-design__table_mwj_dgw_3jb}

Do not add actions that run on the MID Server to a Data Stream For
Each logic block

:   Some actions and steps always run on a MID Server and cannot be added to
    Data Stream
    For Each flow logic blocks. However, some actions and steps may run on a MID Server depending on how they are configured. Check the action configuration
    to ensure it does not run on the MID Server at runtime.

    |-|-|
    | Always runs on a MID Server (unsupported with Data Stream actions) | JDBC step |
    | Always runs on a MID Server (unsupported with Data Stream actions) | PowerShell step |
    | Always runs on a MID Server (unsupported with Data Stream actions) | SSH step |
    | May run on a MID Server depending on configuration | REST step |
    | May run on a MID Server depending on configuration | Script step |
    | May run on a MID Server depending on configuration | SOAP step |
    [ ]

    {#data-stream-design__table_r4b_thw_3jb}

Turn off reporting when consuming a large number of records in the For Each logic
block
:   Iterating over a large number of records can be resource intensive, especially when the For Each logic block includes complex actions for each iteration. To avoid performance issues, turn off reporting using the com.snc.process_flow.reporting.level system property. For more information, see [Workflow Studio flow system properties](https://www.servicenow.com/docs/access?context=flow-designer-system-properties&version=australia&pubname=australia-build-workflows&ft:locale=en-US).

