Defining the Header Fields (Release 9.2.4.4)

You can designate one or more columns individually as a Header Field when you import the CSV file as an array through an FTP connector.

You can designate columns of data within the CSV files as indicators of grouped data, thereby giving the flat CSV data a certain amount of structure. For example, a single CSV file might contain data representing multiple sales orders, with each sales order having multiple items. The CSV rows for a single sales order can be grouped together as long as the value in each of the designated header fields remains the same. A row containing a designated header field with a different value indicates a new group. Using this feature, you can create more hierarchical inputs for your orchestrations.

When you choose a header field, the Header Object and Detail Object fields will appear on the left. The data set variable name is used for the array name. The array will contain one header object for each group of rows containing the designated header fields. Each header object will also contain an array of detail data taking the name of the detail object.

The following example shows the output generated by converting a CSV file that had six lines and five columns into an array that has three SO Header objects, each containing a different number of lines in the SO Grid array.

An orchestration can now iterate over the SO Array in a step to call another orchestration to create a sales order with an object as input. This example will result in three sales orders with three, one, and two lines, respectively.

{

"SO Array": [

{

"SO Header": {

"Customer": "4242",

"Branch": "30",

"SO Grid": [

{

"ID": "1",

"Item_Number": "210",

"Quantity_Ordered": "5"

},

{

"ID": "2",

"Item_Number": "210",

"Quantity_Ordered": "4"

},

{

"ID": "3",

"Item_Number": "210",

"Quantity_Ordered": "3"

}

]

}

},

{

"SO Header": {

"Customer": "4243",

"Branch": "30",

"SO Grid": [

{

"ID": "4",

"Item_Number": "220",

"Quantity_Ordered": "2"

}

]

}

},

{

"SO Header": {

"Customer": "4242",

"Branch": "20",

"SO Grid": [

{

"ID": "5",

"Item_Number": "210",

"Quantity_Ordered": "2"

},

{

"ID": "6",

"Item_Number": "210",

"Quantity_Ordered": "1"

}

]

}

}

]

}