All Collections
Advanced
What is a TeamFlow Import Schema?
What is a TeamFlow Import Schema?
Drew Morris avatar
Written by Drew Morris
Updated over a week ago

A TeamFlow Import Schema is a configuration file that is used to easily create a diagram from your existing data sources such as a database, file or application you are already using.

Quick Start Guide

The easiest way to get started is to follow these steps:

  1. Fill out our Example Outline and save your Outline sheet as CSV.

  2. Download this Example TeamFlow Schema and save to your computer (right click and "save link as").

  3. Go to the TeamFlow app and click "New Diagram".

  4. Select the "Import" tab and then click "Data" from the toggle option.

  5. Give your diagram a name and then upload the "Example TeamFlow Schema" you downloaded above in Step 2.

  6. Upload your data that you exported from Step 1.

  7. Click "Create" and now you are ready to work with your new process.


In Depth Tutorial

In this segment we'll take a look at a generic schema and data taken from Microsoft Project that has been exported in the CSV format.

For this example we need to start by creating a simple TeamFlow Schema using the JSON format to create a diagram based on our data. First let's take a look at our swimlanes.

For all schemas we can use the following three lines to start the JSON file:

{
"type": "rows",
"source": "csv",
"diagramType": "process"
}

We can see that the relevant data that we could use to populate our swimlanes is Owner, Owner Title, and Department. In the following schema segment, we can see how to assign relevant data to a swimlane’s title, subtitle and label fields. It is necessary to add in the $. notation in each field when we assign the column to a field (ex. ”$.Owner”). This is based on the JSON Path, for more information on JSON Path notation please read here.

NOTE: When selecting data from your CSV column headers, the import process will automatically remove any non-alphanumeric characters such as spaces, punctuation, etc.

{
...
"swimlanes": {
"title": "$.Owner",
"subtitle": "$.Department",
"label": "$.InternalorExternal"
}
}

Whenever generating swimlanes from your data there are a few things to keep in mind. First, you must include at least a title for your swimlane. Secondly, the swimlanes will always show up in the order they appear in your data.

Next let’s look at mapping out the nodes as seen in the image above. By setting $.TaskName to title, we give each node a visible title in the Diagram. We also assign $.Type to assign the node type to specify if it is a task, meeting, decision, etc. In the same manner we can map out the other fields such as durationUnit, costBudget, outlineNumber, and costCurrency in the same manner. For a complete reference of all of the possible fields and their meaning, please see below in the REFERENCE section.

{
...
"nodes": {
"title": "$.TaskName",
"type": "$.TaskType",
"description": "$.Notes",
"duration": "$.Duration",
"durationUnit": "$.DurationUnit",
"costBudget": "$.EstCost",
"outlineNumber": "$.OutlineNumber",
"costCurrency": "USD"
}
}

Finally we can add in flags to further organize our data. In marking the field autoLink to "true" we are enabling TeamFlow to automatically link together the nodes in the order in which they are sorted. Which, in our situation, is best determined by using the autoSortBy field and assigning our OutlineNumber column. Finally we set which direction can be given for desc or asc in the autoSortDirection field. The full snippet of which can be see below.

{
...
"autoLink": true,
"autoSortBy": "$.OutlineNumber",
"autoSortDirection": "asc",
"autoSortType: "outline"
}

When we combine all of these various segments we get the full TeamFlow Schema that will accurately translate our data into its very own TeamFlow diagram.

Of course there are still many other fields in which we can utilize our data and can be found in the various segments throughout the knowledge base in greater detail.

{
"type": "rows",
"source": "csv",
"diagramType": "process",
"swimlanes": {
"title": "$.Owner",
"subtitle": "$.Department",
"label": "$.InternalorExternal"
},
"nodes": {
"title": "$.TaskName",
"type": "$.TaskType",
"description": "$.Notes",
"duration": "$.Duration",
"durationUnit": "$.DurationUnit",
"costBudget": "$.EstCost",
"outlineNumber": "$.OutlineNumber",
"costCurrency": "USD"
},
"autoLink": true,
"autoSortBy": "$.OutlineNumber",
"autoSortDirection": "asc",
"autoSortType": "outline"
}

Tutorial Downloads


Reference

Fields marked with * are required, everything else is optional.

Field

Type

Description

type*

rows (more coming soon)

The type of schema this is.

diagramType*

process (more coming soon)

The type of diagram this is for.

source*

csv (more coming soon)

The source type of the data.

swimlanes.title*

jsonpath

The "Name" field for your swimlane.

swimlanes.subtitle

jsonpath

The "Title" field for your swimlane that appears below the name.

swimlanes.label

jsonpath

The "Label" field for your swimlane that appears above the name.

swimlanes.flowdownSwimlanes

boolean

Whether or not these swimlanes should flowdown to all sublayers.

nodes.type

jsonpath or hardcoded value

The type of node such as a task, meeting, decision, etc.

nodes.title

jsonpath

The title for your node that displays on the diagram.

nodes.description

jsonpath

The description field for your node.

nodes.duration

jsonpath

This is the duration number for your data.

nodes.durationUnit

jsonpath or hardcoded value

The unit type of your duration data such as minutes, hours, days, weeks, months or years

nodes.durationModifier

number

This is a special field to take your duration data and divide it by this number. For example if your duration data is stored in seconds you can convert it to hours by dividing it by 3600.

nodes.costBudget

jsonpath

This is the numerical field of your cost budget data.

nodes.costCurrency

jsonpath or hardcoded value

This is the currency of the cost field which can be either USD, GBP or EUR or `$, £ or €. You can also specify the jsonpath of a field in your data.

nodes.assigned

jsonpath

This is a field of comma separated values of the name of the swimlane. Please note that if you are using swimlanes.subtitle or swimlanes.labelabove you must include the full name of the swimlane in the following syntax: {swimlanes.title}-{swimlanes.subtitle}-{swimlanes.label}

nodes.link

jsonpath

Using this field you can create more complex link relationships where you specify the node this node should link to by entering in the outlineNumber value of the linking node.

nodes.outlineNumber

jsonpath

This is the field used to determine the outline number for your node. Using the syntax of 1, 1.1, 1.1.1, etc. you can automatically create sublayers for your nodes.

nodes.milestoneColumn

jsonpath

This is a column in your data that can be used to automatically generate a milestone node between each "phase" or "section" in your rows.

nodes.timestampColumn

jsonpath

This is used with the autoCalculateDuration and autoDurationUnitflags to automatically calculate the duration between two consecutive nodes. This field should be a date or datetime value.

autoCalculateDuration

boolean

This is used to automatically determine the duration between two consecutive nodes based on a timestampColumn value.

autoDurationUnit

boolean

This is used in combination with the above field to automatically calculate the duration based on a timestampColumn from the node. This will automatically detect what is the best duration unit for that value.

autoLink

boolean

This is special logic that will automatically create a linking relationship between nodes in the order they appear or based on how they are sorted.

autoSortBy

jsonpath

This is used to determine which field should be the field to sort the data on. Not having a value here will use whatever order the rows are stored in the CSV.

autoSortDirection

asc / desc

This is used to determine which direction the sorting should go in whether it is ascending or descending.

autoSortType

string / number / date / outline

This is used to determine how to treat the data when sorting.

Did this answer your question?