Following steps demonstrate how to read data from the a .CSV file which can be further passed to a Services Request (Form Service, Data Service or a custom database connector).
We will be creating the connector for FTP server and read a CSV file which has AddressBook Numbers.
The output of this will be sent to a Form Service request which will return AddressBook Number, Alpha Name and Search Type for that AB number from P01012. Also, we will be using iterate over to read each row from the CSV file
Step 1 -
Login into OrchestratorStudio and Click on the Tools link
Step 2 -
Select Connections where we will be defining the FTP server details
Step 3 -
Enter your FTP server details. Please make sure to validate the FTP server details using tools like - WinSCP
Step 4 -
Click on Service Request and select Connector option. This will be used for defining CSV file details and selecting the field’s data to be imported.
a) Select the FTP connection name from the drop-down which we had created in the previous step.
b) Enter the Source file name which is located in your FTP Server locations share path example. /E920
c) Check Import CSV as Array and CSV have Headers options.
The Import CSV as Array option helps to read all the rows from the CSV file and using the header it becomes easy to recognize the fields.
d) Define Data Set variable name. This is similar to the concept of the array which will hold the value for a row from the CSV file and will be used for iteration purpose in further steps.
e) Upload your CSV file as a sample/reference to create a variable name for each of the row headers/columns
Save this Connector Service Request.
Shown below is the Structure of ABN1.csv file:
Step 5 -
Creating Form Service Request
Create a Service Request which will take input (AddressBook number) from the CSV file and will return associated AddressBook Number and Alpha Name from P01012 Application
Return Fields –
Step 6 -
Now we need to map the Connector and Form Service to an Orchestration. Click on the navigation panel and select Orchestration.
Enter the name of the Orchestration and under Orchestration steps, select Service Request and click on the + icon.
Click on the drop-down and select the previously created FTP connector.
Now, we will add Form Service to Orchestration as Step After the connector using the same steps.
Orchestration after adding Connector and Form Service Request.
If you highlight the Form Request, orchestration will show the required inputs to the form request.
Now, we will map the output from the connector to the Form Service Request.
Here AB is data set variable define under the Connector service and Address Number is a variable name which holds AB number for the CSV row.
In order to read all the rows (one by one) from the CSV, we will select the Data set variable (AB) from iterate over option.
Orchestration Output –
Highlight the Form Service Request and Click on Define Output button.
Select the Output fields -
Save this Orchestration.
Testing Orchestration using Orchestrator Client-
There is no manual input for this Orchestration as it will read the AddressBook number from the CSV and return the Alpha Name, Search Type and AddressBook Number.