CSV To Object Mapping Step
  • 21 Feb 2025
  • 2 Minutes to read
  • Dark
    Light

CSV To Object Mapping Step

  • Dark
    Light

Article summary

Step Details

Introduced in Version---
Last Modified in Version7.12.0
LocationData > Excel & CSV

The CSV To Object step allows users to map defined CSV data to a Data Structure in Decisions.






Properties

Inputs

PropertyDescriptionData Type
File InputThe CSV or excel file that is used as input.
FileData

Input Data

PropertyDescriptionData Type
Input File TypeDefines the type of file used as an input to the step. Currently, the options are Csv, Excel_xls, Excel_xlsx and AutoSelect
---
Worksheet IndexDetermines which worksheet that will be evaluated.
Int32
Ignore First LineIgnores the first line of the worksheet that is often used as headers in Excel files. Boolean
CSV DelimiterDetermines which delimiter will be added with the values for CSV files.
---

Outputs

PropertyDescriptionData Type
OUTPUTSList of the Object that the CSV was mapped to.List of ---

Output Data

PropertyDescriptionData Type
Output TypeThe desired Data Structure to map the CSV values to.---






Prerequisite:
Before proceeding with the example, download the following CSV file. This file will be imported into the example Flow. The imported file contains three rows with three fields: First Name, Last Name, and Email Address.

Example

In this example, a Flow will create an array of account objects from a CSV file using the CSV To Object Mapping step. Then, for each account in the array, the Flow will create an account in the Portal.

  1. In a Designer Project, click CREATE FLOW on the Global Action Bar and select Flow to create a new Flow.  
  2. From the Toolbox panel, attach a Create Data step to the Start step. On the Properties panel, click SHOW EDITOR.
     
  3. From the Data Definitions window, enter "File" under NAME and select FIleData as the TYPE. Click Save and close the window.
     
  4. On the Properties panel, click Choose a File under the File field and upload the CSV file.
     
  5. On the Toolbox panel, navigate to DATA > EXCEL & CSV. Attach a CSV to Object Mapping step to the Create Data step. Select Csv from the Input File Type dropdown list under the INPUT DATA category. Map in File to the File Input field. Enter "account" in the Output Type field and select Account. Click Show Item Mapping Editor.
     
  6. From the Mapping Editor, change the mapping for ITEM to Build Data.
  7. Click the pencil icon. Under Properties, check EmailAddress, First Name, and Last Name.
  8. Expand the _INPUT category on the left. Map Field01.TextValue to First Name, Field02.TextValue to Last Name, and Field03.TextValue to EmailAddress. Click OK.
  9. In the Toolbox panel, navigate to FLOW MANAGEMENT > ITERATION. Attach a ForEach Step step to the CSV to Object Mapping step. From the ForEach Step's Properties, map OUTPUTS to the Collection field.
  10. On the Next path, attach an AddNewAccount step from the INTEGRATION > INTERNAL SERVICES > ACCOUNTSERVICE category. Attach the Done path for the Add Account step to the ForEach Step, then attach the Done path for the ForEach step to the End step.
  11. Select the Add New Account step. From the Properties panel of the Add New Account step, change the account mapping to Build Data.
     
  12. Click the pencil icon and select EmailAddress, First Name, and Last Name from the Properties field.
  13. After selecting the Properties, map each field to its corresponding Item value.
  14. Constant map the member of field. Pick or add the Group and enter a Constant value for the password field.
     
  15. Click Save to save changes to the Flow.

Debug

  1. Click Debug from the top action bar. 
  2. Click START DEBUGGING. 
  3. From the Decisions Studio, navigate to System > Security > Accounts and verify that the accounts were created. 
    The Flow will run and create three accounts that correspond to the data within the spreadsheet. 




Related Information

Forum Posts:
CSV To Object Mapping Step

Training Video:
Dynamic Excel Creation


Was this article helpful?