{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":4048,"path":"build-workflows/workflow-studio/create-data-structure.md","title":"Create data structure","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create data structure\n\nOrganize multiple data variables into a structure to process them as a unit and identify the individual items within it.\n\n## Before you begin\n\n-   Role required: action\\_designer, flow\\_designer, or admin\n-   [Create an action in Workflow Studio](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-action.md) or [Create a subflow in Workflow Studio](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/create-subflow.md)\n\n## About this task\n\nA data structure is a collection of related data elements organized into a hierarchy. Each element in a data structure has its own data type and its own unique position in the hierarchy.\n\n## Procedure\n\n1.  Create a data variable.\n\n    | | |\n    |---|---|\n    |**Action or subflow input**|Click **Create Input**|\n    |**Action or subflow output**|Click **Create Output**|\n    |**XML parser step**|See [XML parser step](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/xml-parser-step-action-designer.md)|\n\n2.  Set **Type** to **Object**.\n\n    The top level of a data structure hierarchy must be an Object variable.\n\n3.  Click the **Add Child Item** icon.\n\n    Workflow Studio adds a child data variable to the bottom of the object list.\n\n    **Note:** You can insert a child item variable between existing variables by hovering your mouse pointer between two variables, and click the insert item icon \\(\\[Omitted image \"insert-child-icon.png\"\\] Alt text: Insert item icon\\) that appears.\n\n    When hovering your mouse pointer between a child and sibling variable, you will see a add child icon \\(\\[Omitted image \"insert-item-icon.png\"\\] Alt text: Insert child item icon\\). Click the left side of the icon to add a new sibling variable to the child's parent, or the right side to add another child variable under the current variable.\n\n4.  Set the child variable **Label** and **Type**.\n\n    To add another branch to the data structure hierarchy, set the Type to Object.\n\n5.  Repeat steps 3-4 for each data variable in the hierarchy.\n\n\n## What to do next\n\nUse the data structure to populate action, step, or subflow inputs. If you can reuse the data structure, save it as a template.\n\n**Parent Topic:**[Complex data](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/build-workflows/workflow-studio/complex-data.md)\n\n"}}